refactor(admin/members): dedupe STATUS_LABELS + reactive row update
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.
This commit is contained in:
parent
1c8f30fe6f
commit
6a6f036877
4 changed files with 19 additions and 20 deletions
|
|
@ -315,6 +315,7 @@
|
|||
|
||||
<script setup>
|
||||
import { CONTRIBUTION_PRESETS, getGuidanceLabel, requiresPayment } from '~/config/contributions';
|
||||
import { STATUS_LABELS } from '~/config/memberStatus';
|
||||
|
||||
definePageMeta({
|
||||
middleware: "auth",
|
||||
|
|
@ -417,13 +418,6 @@ const circleOptions = [
|
|||
},
|
||||
];
|
||||
|
||||
const STATUS_LABELS = {
|
||||
active: "Active",
|
||||
pending_payment: "Setting up payment",
|
||||
suspended: "Paused",
|
||||
cancelled: "Closed",
|
||||
};
|
||||
|
||||
const formatStatus = (s) => STATUS_LABELS[s] || s;
|
||||
|
||||
const capitalise = (s) => (s ? s.charAt(0).toUpperCase() + s.slice(1) : s);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue