refactor(member-live): modularize the overview and drop the superseded in-memory paths
Extract the cookie parser, export-payload builder and fee-status helper into their own modules and remove the filter/sort/load helpers the database pushdown made dead, so the overview LiveView stays a thin coordinator over focused units.
This commit is contained in:
parent
c2cb3edab8
commit
77fc11a0b0
17 changed files with 375 additions and 875 deletions
|
|
@ -294,7 +294,7 @@ defmodule MvWeb.MemberExportController do
|
|||
|> Ash.Query.new()
|
||||
|> Ash.Query.select(select_fields)
|
||||
|> load_custom_field_values_query(parsed.custom_field_ids_union)
|
||||
|> maybe_load_cycles(need_cycles, parsed.show_current_cycle)
|
||||
|> maybe_load_cycles(need_cycles)
|
||||
|> maybe_load_groups(need_groups)
|
||||
|> maybe_load_membership_fee_type(need_membership_fee_type)
|
||||
|
||||
|
|
@ -338,10 +338,10 @@ defmodule MvWeb.MemberExportController do
|
|||
end
|
||||
end
|
||||
|
||||
defp maybe_load_cycles(query, false, _show_current), do: query
|
||||
defp maybe_load_cycles(query, false), do: query
|
||||
|
||||
defp maybe_load_cycles(query, true, show_current) do
|
||||
MembershipFeeStatus.load_cycles_for_members(query, show_current)
|
||||
defp maybe_load_cycles(query, true) do
|
||||
MembershipFeeStatus.load_cycles_for_members(query)
|
||||
end
|
||||
|
||||
defp maybe_load_groups(query, false), do: query
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue