Commit Graph

17 Commits

Author SHA1 Message Date
shahondin1624 c4f5f8e7fb Merge pull request 'fix(MemberService): wrap multi-step writes in database transactions' (#203) from fix/missing-database-transactions into main
Database Portability Tests / Unit Tests (PlatformHelper) (push) Failing after 38s
Database Portability Tests / Integration (mysql) (push) Has been skipped
Database Portability Tests / Integration (postgres) (push) Has been skipped
Database Portability Tests / Integration (sqlite) (push) Has been skipped
Database Portability Tests / Verify no MySQL-specific SQL (push) Successful in 6s
2026-04-29 22:11:02 +02:00
shahondin1624 e1d24d4d54 fix(MemberService): wrap multi-step writes in database transactions
Add IDBConnection dependency to MemberService and wrap create(),
update(), and softDelete() in transactions (beginTransaction/commit/
rollback). This ensures atomicity when inserting/updating members
alongside sub-entities (addresses, phones, emails) — a failure at
any step now rolls back the entire operation instead of leaving
orphaned records.

(Closes #203)
2026-04-29 22:08:38 +02:00
shahondin1624 ccda3ee570 Fix findArchived() filtering all members in memory (Closes #202)
Database Portability Tests / Unit Tests (PlatformHelper) (pull_request) Failing after 42s
Database Portability Tests / Integration (mysql) (pull_request) Has been skipped
Database Portability Tests / Integration (postgres) (pull_request) Has been skipped
Database Portability Tests / Integration (sqlite) (pull_request) Has been skipped
Database Portability Tests / Verify no MySQL-specific SQL (pull_request) Successful in 5s
Replace in-memory array_filter with a dedicated SQL query
WHERE deleted_at IS NOT NULL in MemberMapper::findArchived().

This fixes broken pagination (limit/offset now apply to archived
members only), eliminates unnecessary data transfer, and follows
the same pattern as the countArchived() fix from #201.
2026-04-29 21:13:32 +02:00
shahondin1624 d4e25fe739 Fix countArchived() loading all members into memory (Closes #201)
Database Portability Tests / Unit Tests (PlatformHelper) (pull_request) Failing after 38s
Database Portability Tests / Integration (mysql) (pull_request) Has been skipped
Database Portability Tests / Integration (postgres) (pull_request) Has been skipped
Database Portability Tests / Integration (sqlite) (pull_request) Has been skipped
Database Portability Tests / Verify no MySQL-specific SQL (pull_request) Successful in 5s
Replace in-memory filtering with a SQL COUNT(*) query in the mapper,
matching the pattern of the existing countAll() method.
2026-04-29 19:13:52 +02:00
shahondin1624 ee569250ad Fix N+1 query problem in MemberService (Closes #200)
Database Portability Tests / Unit Tests (PlatformHelper) (push) Failing after 40s
Database Portability Tests / Integration (mysql) (push) Has been skipped
Database Portability Tests / Integration (postgres) (push) Has been skipped
Database Portability Tests / Integration (sqlite) (push) Has been skipped
Database Portability Tests / Verify no MySQL-specific SQL (push) Successful in 5s
- MemberMapper: 8 new *WithRelations() methods that fetch members with
  addresses, phones, and emails in a single query using LEFT JOINs
- MemberMapper: addJoinClauses() and fetchWithRelations() private helpers
  that handle JOIN duplication (one member × multiple sub-entities)
- MemberService: refactored findAll, findByFamily, findByStatus, search,
  findByBirthdayThisMonth, findWithUnpaidFees, findFiltered, fullTextSearch
  to delegate to joined mapper methods
- MemberService: added arrayToMember() and arrayToAddress() helpers so
  buildMatchContext() works with flat-array results from fullTextSearch
- MemberServiceTest: updated all existing tests to mock new method names
  and return flat-array format with nested sub-entities
- MemberServiceTest: added 10 new tests covering joined methods, backward
  compatibility, and correct shape of returned data
- Moved issue-200 plan from open/ to done/
2026-04-28 21:35:42 +02:00
shahondin1624 5a3e1c9ef2 feat: bulk-reveal encrypted Allergien on member list (admin-only) (#198)
Database Portability Tests / Unit Tests (PlatformHelper) (push) Failing after 35s
Database Portability Tests / Integration (mysql) (push) Has been skipped
Database Portability Tests / Integration (postgres) (push) Has been skipped
Database Portability Tests / Integration (sqlite) (push) Has been skipped
Database Portability Tests / Verify no MySQL-specific SQL (push) Successful in 4s
2026-04-17 21:58:15 +02:00
shahondin1624 d960361ba0 fix: surface real errors + restore sub-entity saves on member update (#196)
Database Portability Tests / Unit Tests (PlatformHelper) (push) Failing after 37s
Database Portability Tests / Integration (mysql) (push) Has been skipped
Database Portability Tests / Integration (postgres) (push) Has been skipped
Database Portability Tests / Integration (sqlite) (push) Has been skipped
Database Portability Tests / Verify no MySQL-specific SQL (push) Successful in 4s
2026-04-17 21:31:07 +02:00
shahondin1624 6ca14beada feat: additive quickfilters, role filters, address columns, saved filters & fix all tests
- Make quickfilters combinable (status + rolle + birthday + unpaid fees with AND logic)
- Add Mitglieder/Erziehungsberechtigte role quickfilters
- Add PLZ and Wohnort columns from primary address for KJR reports
- Add saved filter system (localStorage-persisted, create/apply/delete)
- Backend: unified findFiltered() in MemberMapper/MemberService/MemberController
- Fix all 75 pre-existing test failures (constructor mismatches, optional geburtsdatum,
  DsgvoController body reading, FileController lagerFiles API, CalDavBackend stub)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-11 17:45:07 +02:00
shahondin1624 27cedd849d feat: add Juleica number and expiry date with calendar reminder (Closes #160) (#191) 2026-04-10 19:43:06 +02:00
shahondin1624 4316c5f2b5 feat: make Geburtsdatum optional for members (Closes #162) (#190) 2026-04-10 19:38:26 +02:00
shahondin1624 64ece89101 fix: imported records cannot be edited after import (Closes #161) (#189) 2026-04-10 19:33:18 +02:00
shahondin1624 b93b8a73d2 fix: wire AuditService into all CRUD operations (Closes #126) (#137) 2026-04-09 15:40:37 +02:00
shahondin1624 bc404609c3 feat: add soft deletion logic with sensitive data purge and archive (Closes #61) 2026-04-07 15:07:03 +02:00
shahondin1624 832e3487dc feat: add preset quick filter chips to member list (Closes #34) 2026-04-07 14:01:31 +02:00
shahondin1624 fc8a4f534f feat: add global search bar with full-text member search (Closes #33) 2026-04-07 13:57:18 +02:00
shahondin1624 9f1dd057db feat: add E.164 phone validation and PhoneInput component (Closes #25) (#85) 2026-04-07 13:19:02 +02:00
shahondin1624 938dc79a04 feat: add MemberService with CRUD, validation, and soft-delete (Closes #21) (#70) 2026-04-07 11:39:42 +02:00