feat: Add member fee type filter to member list #461

Merged
moritz merged 4 commits from feat/feetype_filter into main 2026-03-09 14:45:49 +01:00
Owner

Description of the implemented changes

The changes were:

  • Bugfixing
  • New Feature
  • Breaking Change
  • Refactoring

Add a filter by membership fee type on the member list and refactor the filter component to satisfy Credo complexity rules.

What has been changed?

  • Member list (Index): Load membership fee types, add fee_type_filters state and URL params (fee_type_<uuid>=in|not_in), apply fee type filters in load_members, and extend build_query_params / reset_all_filters / handle_params for fee type filters.
  • MemberFilterComponent: New “Fee types” section (one row per fee type with All/Yes/No), new assigns and events (fee_type_filter_changed), and reset logic including fee type filters. Refactored handle_event("update_filters", ...) by extracting parse_payment_filter, parse_prefix_filters, parse_custom_boolean_filters, and dispatch_* helpers to reduce cyclomatic complexity below Credo’s limit.
  • Index template: Pass fee_types and fee_type_filters into the filter component.
  • Gettext: Ran mix gettext.extract and mix gettext.merge so new strings (e.g. “Fee types”) are in the POT and locale files.

Definition of Done

Code Quality

  • No new technical depths
  • Linting passed
  • Documentation is added where 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

Additional Notes

  • Fee type filter reuses the same pattern as the existing group filter (fieldset + legend, join buttons All/Yes/No, same styling and focus handling). If the group filter is already considered accessible and tested, the same checklist items likely apply to the new fee type block.
  • The refactor in MemberFilterComponent only restructures code (parse/dispatch helpers); behaviour and UI are unchanged.
## Description of the implemented changes The changes were: - [ ] Bugfixing - [x] New Feature - [ ] Breaking Change - [x] Refactoring Add a filter by membership fee type on the member list and refactor the filter component to satisfy Credo complexity rules. ## What has been changed? - **Member list (Index):** Load membership fee types, add `fee_type_filters` state and URL params (`fee_type_<uuid>=in|not_in`), apply fee type filters in `load_members`, and extend `build_query_params` / `reset_all_filters` / `handle_params` for fee type filters. - **MemberFilterComponent:** New “Fee types” section (one row per fee type with All/Yes/No), new assigns and events (`fee_type_filter_changed`), and reset logic including fee type filters. Refactored `handle_event("update_filters", ...)` by extracting `parse_payment_filter`, `parse_prefix_filters`, `parse_custom_boolean_filters`, and `dispatch_*` helpers to reduce cyclomatic complexity below Credo’s limit. - **Index template:** Pass `fee_types` and `fee_type_filters` into the filter component. - **Gettext:** Ran `mix gettext.extract` and `mix gettext.merge` so new strings (e.g. “Fee types”) are in the POT and locale files. ## Definition of Done ### Code Quality - [x] No new technical depths - [x] Linting passed - [x] Documentation is added where 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 ## Additional Notes - Fee type filter reuses the same pattern as the existing group filter (fieldset + legend, join buttons All/Yes/No, same styling and focus handling). If the group filter is already considered accessible and tested, the same checklist items likely apply to the new fee type block. - The refactor in `MemberFilterComponent` only restructures code (parse/dispatch helpers); behaviour and UI are unchanged.
moritz self-assigned this 2026-03-04 21:21:00 +01:00
moritz added 2 commits 2026-03-04 21:21:02 +01:00
- Filter by membership fee type in same style as groups (All/Yes/No per type)
- Index: load fee types, fee_type_filters, URL params, apply_fee_type_filters
- MemberFilterComponent: fee types section, events, reset, button label
- Refactor update_filters: extract parse/dispatch helpers to satisfy Credo complexity
Update gettext: extract and merge after fee type filter strings
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/promote/production Build is passing
d214789872
moritz added this to the Sprint 13: 19.02-26.02 project 2026-03-04 21:21:03 +01:00
moritz force-pushed feat/feetype_filter from d214789872 to 5ab73aada6 2026-03-09 13:19:31 +01:00 Compare
moritz added 2 commits 2026-03-09 14:32:34 +01:00
- Mv.Constants: group_filter_prefix/0, fee_type_filter_prefix/0
- MvWeb.MemberLive.Index.FilterParams: parse_in_not_in_value/1 for URL param parsing
Apply review feedback and fix Credo in fee type filter
Some checks reported errors
continuous-integration/drone/push Build was killed
91115103ae
- Index: use FilterParams and constants; fix parse recursion; validate fee type/group
  IDs; OR semantics for :in; build_query_params/reset_all_filters map-based API;
  alias order (Credo); Map.take list deprecation fix
- MemberFilterComponent: use FilterParams and constants; fee_type_filter_part
  helper (Credo nesting); in_not_in_filter_label_class; reset_all_filters map;
  button label for :not_in and combined filter count; fieldset borders
- Gettext: Fee types, filter count plural, 'without %{name}' (en/de)
moritz force-pushed feat/feetype_filter from 91115103ae to 8da22b3d88 2026-03-09 14:34:03 +01:00 Compare
moritz changed title from WIP: feat: Add member fee type filter to member list to feat: Add member fee type filter to member list 2026-03-09 14:34:21 +01:00
moritz merged commit a3e986ae58 into main 2026-03-09 14:45:49 +01:00
moritz deleted branch feat/feetype_filter 2026-03-09 14:45:50 +01:00
Sign in to join this conversation.
No description provided.