From 6a6f036877484b0d36dc7b1841ecacf3fe20e3b0 Mon Sep 17 00:00:00 2001 From: Jennie Robinson Faber Date: Thu, 30 Apr 2026 22:25:49 +0100 Subject: [PATCH] refactor(admin/members): dedupe STATUS_LABELS + reactive row update MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Promote inline STATUS_LABELS copies (admin/members/index.vue, member/account.vue) into app/config/memberStatus.js, matching the app/config/circles.js pattern. Drive admin/members/[id].vue status select from the same constant — completes the alignment started in 441a5f5. Use the softer member-facing copy as canonical: "Paused" / "Closed" instead of "Suspended" / "Cancelled". Also fix markSlackInvited's non-reactive Object.assign on a plain object inside a useFetch array — replace with index-find + element reassignment so the row UI refreshes without a manual reload. --- app/config/memberStatus.js | 8 ++++++++ app/pages/admin/members/[id].vue | 10 ++++++---- app/pages/admin/members/index.vue | 13 ++++--------- app/pages/member/account.vue | 8 +------- 4 files changed, 19 insertions(+), 20 deletions(-) create mode 100644 app/config/memberStatus.js diff --git a/app/config/memberStatus.js b/app/config/memberStatus.js new file mode 100644 index 0000000..04850e8 --- /dev/null +++ b/app/config/memberStatus.js @@ -0,0 +1,8 @@ +export const STATUS_LABELS = { + active: "Active", + pending_payment: "Payment setup incomplete", + suspended: "Paused", + cancelled: "Closed", +}; + +export const statusLabel = (s) => STATUS_LABELS[s] || "Pending"; diff --git a/app/pages/admin/members/[id].vue b/app/pages/admin/members/[id].vue index 567caf9..e082be7 100644 --- a/app/pages/admin/members/[id].vue +++ b/app/pages/admin/members/[id].vue @@ -63,10 +63,11 @@
@@ -242,6 +243,7 @@