Implement dropdown to show/hide columns in member overview closes #209 #240

Merged
moritz merged 28 commits from feature/209_hide_field_dropdown into main 2025-12-03 19:01:15 +01:00
Showing only changes of commit 3b038d451d - Show all commits

View file

@ -405,8 +405,9 @@ defmodule MvWeb.MemberLive.Index do
defp prepare_dynamic_cols(socket) do
visible_custom_field_ids = socket.assigns[:visible_custom_field_ids] || []
# Use all_custom_fields to allow users to enable globally hidden custom fields
dynamic_cols =
socket.assigns.custom_fields_visible
socket.assigns.all_custom_fields
|> Enum.filter(fn custom_field -> custom_field.id in visible_custom_field_ids end)
|> Enum.map(fn custom_field ->
%{