feat: add groups to export
This commit is contained in:
parent
31fc4f4d0c
commit
01f62297fc
6 changed files with 98 additions and 6 deletions
|
|
@ -1620,6 +1620,10 @@ defmodule MvWeb.MemberLive.Index do
|
|||
FieldVisibility.computed_member_fields()
|
||||
|> Enum.filter(&(&1 in member_fields_computed))
|
||||
|
||||
# Groups is always included in export if it's visible in the table
|
||||
# (groups column is always shown in the table, so we always include it in export)
|
||||
member_fields_with_groups = ordered_member_fields_db ++ ["groups"]
|
||||
|
||||
# Order custom fields like the table (same as dynamic_cols / all_custom_fields order)
|
||||
ordered_custom_field_ids =
|
||||
socket.assigns.all_custom_fields
|
||||
|
|
@ -1628,7 +1632,10 @@ defmodule MvWeb.MemberLive.Index do
|
|||
|
||||
%{
|
||||
selected_ids: socket.assigns.selected_members |> MapSet.to_list(),
|
||||
member_fields: Enum.map(ordered_member_fields_db, &Atom.to_string/1),
|
||||
member_fields: Enum.map(member_fields_with_groups, fn
|
||||
f when is_atom(f) -> Atom.to_string(f)
|
||||
f when is_binary(f) -> f
|
||||
end),
|
||||
computed_fields: Enum.map(ordered_computed_fields, &Atom.to_string/1),
|
||||
custom_field_ids: ordered_custom_field_ids,
|
||||
column_order:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue