Membership Fee Type Resource & Settings closes #278 #291

Merged
moritz merged 11 commits from feature/278_membership_fee_settings into main 2025-12-18 14:17:10 +01:00
Owner

Description of the implemented changes

The changes were:

  • Bugfixing
  • New Feature
  • Breaking Change
  • Refactoring

Definition of Done

Code Quality

  • No new technical depths
  • Linting passed
  • Documentation is added were needed

Accessibility

  • New elements are properly defined with html-tags
  • Colour contrast follows WCAG criteria
  • Aria labels are added when needed
  • Everything is accessible by keyboard
  • Tab-Order is comprehensible
  • All interactive elements have a visible focus

Testing

  • Tests for new code are written
  • All tests pass
  • axe-core dev tools show no critical or major issues
## Description of the implemented changes The changes were: - [ ] Bugfixing - [x] New Feature - [ ] Breaking Change - [ ] Refactoring ## Definition of Done ### Code Quality - [ ] No new technical depths - [x] Linting passed - [x] Documentation is added were needed ### Accessibility - [ ] New elements are properly defined with html-tags - [ ] Colour contrast follows WCAG criteria - [ ] Aria labels are added when needed - [ ] Everything is accessible by keyboard - [ ] Tab-Order is comprehensible - [ ] All interactive elements have a visible focus ### Testing - [x] Tests for new code are written - [x] All tests pass - [x] axe-core dev tools show no critical or major issues
moritz added this to the Membership Fees milestone 2025-12-12 18:12:29 +01:00
moritz self-assigned this 2025-12-12 18:12:29 +01:00
moritz added 20 commits 2025-12-12 18:12:30 +01:00
fix(membership-fees): add DB constraints for enum and decimal precision
All checks were successful
continuous-integration/drone/push Build is passing
ebbf347e42
feat: implement calendar-based cycle calculation functions
All checks were successful
continuous-integration/drone/push Build is passing
822d06ed54
Add CalendarCycles module with functions for all interval types.
Includes comprehensive tests for edge cases.
refactor: improve CalendarCycles API and tests based on code review
All checks were successful
continuous-integration/drone/push Build is passing
b257c9897f
docs: fix CalendarCycles documentation to match actual implementation
All checks were successful
continuous-integration/drone/push Build is passing
ecddf55331
feat: implement automatic cycle generation for members
All checks were successful
continuous-integration/drone/push Build is passing
162d06da21
- Add CycleGenerator module with advisory lock mechanism
- Add SetMembershipFeeStartDate change for auto-calculation
- Extend Settings with include_joining_cycle and default_membership_fee_type_id
- Add scheduled job skeleton for future Oban integration
- Replace Application.get_env(:mv, :env) with :sql_sandbox config
- Remove redundant :env config from test.exs
- More explicit and less error-prone for test environment detection
- Log warnings when cycle generation fails in Member create/update
- Extract generate_fn to reduce code duplication
- Improves debuggability of silent failures
- Add warning logging for unexpected errors (not missing prerequisites)
- Use CalendarCycles.interval() type instead of generic atom()
- Update moduledoc to reflect actual usage (no where clause needed)
- Remove exit_date filter from generate_cycles_for_all_members query
- Inactive members now get cycles generated up to their exit_date
- Add tests for inactive member processing and exit_date boundary
- Document exit_date == cycle_start behavior (cycle still generated)
- Handle Task crashes in async_stream with {:exit, reason}
- Return {:error, {:partial_failure, successes, errors}} when some cycles fail
- Previously returned {:ok, successful} even on partial failures
- Improves debuggability and allows callers to handle partial failures
- Replace weak assertions (>= 0, if length > 0) with concrete expectations
- Remove unnecessary Process.sleep calls (tests run synchronously)
- Add get_member_cycles helper for direct cycle verification
- Tests now validate actual generated cycles instead of relying on async behavior
- Change algorithm to start from last existing cycle instead of start_date
- Deleted cycles (gaps) are no longer automatically filled
- Add test to verify gaps remain unfilled
- Update documentation to clarify gap handling behavior
- Add create_member_with_cycles helper that uses fixed 'today' date
- Update tests to use explicit 'today:' option instead of Date.utc_today()
- Prevents test failures when current date changes (e.g., in 2026+)
- Tests now explicitly delete and regenerate cycles with fixed dates
- Ensures consistent test behavior regardless of execution date
fix: handle Ash notifications in CycleGenerator transactions
All checks were successful
continuous-integration/drone/push Build is passing
e6ac5d1ab1
- Use return_notifications?: true when creating cycles within transaction
- Collect notifications and send them after transaction commits
- Prevents 'Missed notifications' warnings in test output
- Notifications are now properly sent via Ash.Notifier.notify/1
refactor: improve cycle generation code quality and documentation
All checks were successful
continuous-integration/drone/push Build is passing
82897d5cd3
- Remove Process.sleep calls from integration tests (tests run synchronously in SQL sandbox)
- Improve error handling: membership_fee_type_not_found now returns changeset error instead of just logging
- Clarify partial_failure documentation: successful_cycles are not persisted on rollback
- Update documentation: joined_at → join_date, left_at → exit_date
- Document PostgreSQL advisory locks per member (not whole table lock)
- Document gap handling: explicitly deleted cycles are not recreated
- Add interval immutability and deletion prevention validations
- Add settings validation for default_membership_fee_type_id
- Create MembershipFeeSettingsLive for admin UI with form handling
- Add comprehensive test coverage (unit, integration, settings)
fix: improve accessibility - WCAG 2 AA contrast and select label
Some checks failed
continuous-integration/drone/push Build is failing
5bdd769699
moritz added 1 commit 2025-12-12 18:17:07 +01:00
refactor: use Enum.map_join instead of Enum.map |> Enum.join
All checks were successful
continuous-integration/drone/push Build is passing
af7ae2b722
moritz changed title from Membership Fee Type Resource & Settings to Membership Fee Type Resource & Settings closes #278 2025-12-12 18:30:28 +01:00
moritz added 6 commits 2025-12-12 19:10:56 +01:00
moritz added a new dependency 2025-12-15 21:38:03 +01:00
moritz added a new dependency 2025-12-15 21:38:28 +01:00
moritz added 1 commit 2025-12-16 15:13:26 +01:00
Merge branch 'main' into feature/278_membership_fee_settings
All checks were successful
continuous-integration/drone/push Build is passing
651f518215
moritz added 1 commit 2025-12-16 16:47:04 +01:00
Merge branch 'main' into feature/278_membership_fee_settings
All checks were successful
continuous-integration/drone/push Build is passing
fb3b30a7e1
moritz force-pushed feature/278_membership_fee_settings from fb3b30a7e1 to f39fd49af3 2025-12-16 17:14:56 +01:00 Compare
moritz force-pushed feature/278_membership_fee_settings from f39fd49af3 to 1b4154ee64 2025-12-16 17:27:57 +01:00 Compare
moritz force-pushed feature/278_membership_fee_settings from 1b4154ee64 to d75e2b7a46 2025-12-18 11:54:26 +01:00 Compare
moritz merged commit ac786662b1 into main 2025-12-18 14:17:10 +01:00
moritz deleted branch feature/278_membership_fee_settings 2025-12-18 14:17:11 +01:00
Sign in to join this conversation.
No description provided.