fix: adds shoe/hide for group column

This commit is contained in:
carla 2026-02-20 08:45:21 +01:00
parent 01f62297fc
commit dbdac5870a
6 changed files with 66 additions and 22 deletions

View file

@ -28,7 +28,8 @@ defmodule MvWeb.MemberLive.Index.FieldVisibility do
alias Mv.Membership.Helpers.VisibilityConfig
# Single UI key for "Membership Fee Status"; only this appears in the dropdown.
@pseudo_member_fields [:membership_fee_status]
# Groups is also a pseudo field (not a DB attribute, but displayed in the table).
@pseudo_member_fields [:membership_fee_status, :groups]
# Export/API may accept this as alias; must not appear in the UI options list.
@export_only_alias :payment_status
@ -201,7 +202,7 @@ defmodule MvWeb.MemberLive.Index.FieldVisibility do
"""
@spec get_visible_member_fields_computed(%{String.t() => boolean()}) :: [atom()]
def get_visible_member_fields_computed(field_selection) when is_map(field_selection) do
computed_set = MapSet.new(@pseudo_member_fields)
computed_set = MapSet.new([:membership_fee_status])
field_selection
|> Enum.filter(fn {field_string, visible} ->