Add boolean custom field filters to member overview closes #309 #362
No reviewers
Labels
No labels
bug
duplicate
enhancement
help wanted
high priority
invalid
L
low priority
M
medium priority
needs refinement
optional
question
S
UX research
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: local-it/mitgliederverwaltung#362
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feature/filter-boolean-custom-fields"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Description of the implemented changes
The changes were:
Implementation of filters for Boolean Custom Fields in the member overview. The existing
PaymentFilterComponenthas been extended to a genericMemberFilterComponentthat combines payment filters (All/Paid/Unpaid) and Boolean Custom Field filters (All/True/False).What has been changed?
Backend (
lib/mv_web/live/member_live/index.ex)boolean_custom_field_filtersinitialized as a mapmaybe_update_boolean_filters/2parsesbf_<id>=true|falseparameters with whitelisting and security validationget_boolean_custom_field_value/2extracts boolean values from various formats (Ash.Union, Map)apply_boolean_custom_field_filters/3filters members by Boolean Custom Field values with AND logicload_members/1after payment filtermount/3, all Boolean Custom Fields are loaded and sortedhandle_info({:boolean_filter_changed, ...})processes filter changes and updates URLbuild_query_params/6extended to include boolean filter parametersFrontend (
lib/mv_web/live/components/member_filter_component.ex)PaymentFilterComponenttoMemberFilterComponentmax-h-60 overflow-y-auto) for many fieldshandle_event("update_filters", ...)processes both filter typeshandle_event("reset_filters", ...)resets all filtersIntegration (
lib/mv_web/live/member_live/index.html.heex)cycle_status_filter,boolean_custom_fields,boolean_filters,member_countConstants (
lib/mv/constants.ex)boolean_filter_prefix(),max_boolean_filters(),max_uuid_length()Tests
Unit Tests (
test/mv_web/components/member_filter_component_test.exs):Integration Tests (
test/mv_web/member_live/index_test.exs):Definition of Done
Code Quality
Accessibility
fieldset,label,button)role="dialog"for dropdown panelaria-labelfor filter button, dropdown panel, fieldsetsaria-haspopup="true"andaria-expandedfor dropdown buttonaria-labelfor Yes/No buttonshas-[:focus-visible]:ring-2 has-[:focus-visible]:ring-primaryon all labelsTesting
Additional Notes
Security Considerations
Performance
Backward Compatibility
UI/UX
WIP: Add boolean custom field filters to member overview closes #309to Add boolean custom field filters to member overview closes #309