From 0a59cf5c3378d5fa8b0745bb740f4bcf50a4fdff Mon Sep 17 00:00:00 2001 From: Moritz Date: Tue, 24 Feb 2026 10:34:12 +0100 Subject: [PATCH 01/12] Sort custom fields by name as default in read action Add `prepare build(sort: [name: :asc])` to the primary read action of CustomField. Prevents order changes when toggling the `required` flag. --- lib/membership/custom_field.ex | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/lib/membership/custom_field.ex b/lib/membership/custom_field.ex index 411e95d..ef6c79a 100644 --- a/lib/membership/custom_field.ex +++ b/lib/membership/custom_field.ex @@ -52,7 +52,8 @@ defmodule Mv.Membership.CustomField do use Ash.Resource, domain: Mv.Membership, data_layer: AshPostgres.DataLayer, - authorizers: [Ash.Policy.Authorizer] + authorizers: [Ash.Policy.Authorizer], + primary_read_warning?: false postgres do table "custom_fields" @@ -60,9 +61,13 @@ defmodule Mv.Membership.CustomField do end actions do - defaults [:read] default_accept [:name, :value_type, :description, :required, :show_in_overview] + read :read do + primary? true + prepare build(sort: [name: :asc]) + end + create :create do accept [:name, :value_type, :description, :required, :show_in_overview] change Mv.Membership.Changes.GenerateSlug From 2d01c70c163aa12b4142858f322c30c3738e4957 Mon Sep 17 00:00:00 2001 From: Moritz Date: Tue, 24 Feb 2026 10:34:17 +0100 Subject: [PATCH 02/12] Group cycle status buttons with DaisyUI join component Wrap Paid/Suspended/Unpaid buttons in a
and add join-item to each button. Delete button stays separate next to the group. --- .../show/membership_fees_component.ex | 82 ++++++++++--------- 1 file changed, 42 insertions(+), 40 deletions(-) diff --git a/lib/mv_web/live/member_live/show/membership_fees_component.ex b/lib/mv_web/live/member_live/show/membership_fees_component.ex index 1ce6f77..f6aa21d 100644 --- a/lib/mv_web/live/member_live/show/membership_fees_component.ex +++ b/lib/mv_web/live/member_live/show/membership_fees_component.ex @@ -214,47 +214,49 @@ defmodule MvWeb.MemberLive.Show.MembershipFeesComponent do <:action :let={cycle}> -
+
<%= if @can_update_cycle do %> - - - +
+ + + +
<% end %> <%= if @can_destroy_cycle do %>