Move the member overview query into the Membership domain #590
Labels
No labels
bug
duplicate
enhancement
help wanted
high priority
invalid
L
low priority
M
medium priority
needs refinement
optional
question
S
security
technical improvement
UX Improvement
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
local-it/mitgliederverwaltung#590
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
Follow-up from #536 (Import/Export consolidation). There, the CSV and PDF exports were switched to load members through the same query as the member overview (
MvWeb.MemberLive.Index.OverviewQuery), so an export now contains exactly the members, in exactly the order, that the overview shows. To keep #536 focused, the query stayed in the web layer and the export controllers call it from there (option A of #536's solution options). This issue is the deliberately deferred option C.Problem
The query that decides which members match the overview's filters and in which order is domain logic, but it lives under
MvWeb.MemberLive.Index:MvWeb.MemberLive.Index.OverviewQuerybuilds the:overviewread with search, group, fee-type, boolean, date, as-of-date, custom-date and payment filters plus the sort and its tie-breakers.MvWeb.MemberLive.Index.DateFilter, which in turn usesCustomFieldValueLookupandFilterParams. Those modules mix query building with URL/param parsing.This conflicts with the guideline that domains encapsulate business logic and the web layer only calls into them (CODE_GUIDELINES.md §1.3).
Proposal
Mv.Membership.MemberOverviewQuery(exact name to be decided), taking a plain, validated options map.DateFilter/FilterParamsinto the domain-side filter expressions (move) and the web-side param parsing (stays inMvWeb).OverviewQuery(test/mv_web/live/member_live/index/overview_query_test.exs,index_*_query_test.exs,index_*_property_test.exs, …) to the new location.Out of scope
Acceptance criteria
Mv.*referencesMvWeb.*, and no export controller referencesMvWeb.MemberLive.*.just ci-devis green.Dependencies
After #536 is merged.