From 0a07d2578e6c1e5e8dcd46cdbf5b5c5fa06cfcf4 Mon Sep 17 00:00:00 2001 From: web Date: Tue, 23 Sep 2025 04:40:35 -0700 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20fix:=20Update=20subscribe=20name?= =?UTF-8?q?=20fallback=20to=20return=20'--'=20instead=20of=20'Unknown'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/admin/app/dashboard/order/page.tsx | 3 +++ apps/admin/store/subscribe.ts | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/apps/admin/app/dashboard/order/page.tsx b/apps/admin/app/dashboard/order/page.tsx index 7480937..444ad38 100644 --- a/apps/admin/app/dashboard/order/page.tsx +++ b/apps/admin/app/dashboard/order/page.tsx @@ -58,6 +58,9 @@ export default function Page() { accessorKey: 'subscribe_id', header: t('subscribe'), cell: ({ row }) => { + if (row.original.type === 4) { + return t(`type.${row.getValue('type')}`); + } const name = getSubscribeName(row.getValue('subscribe_id')); const quantity = row.original.quantity; return name ? `${name} × ${quantity}` : ''; diff --git a/apps/admin/store/subscribe.ts b/apps/admin/store/subscribe.ts index 5352813..e363d60 100644 --- a/apps/admin/store/subscribe.ts +++ b/apps/admin/store/subscribe.ts @@ -44,7 +44,7 @@ export const useSubscribeStore = create((set, get) => ({ // Getters getSubscribeName: (subscribeId?: number) => { - if (!subscribeId) return 'Unknown'; + if (!subscribeId) return '--'; const subscribe = get().subscribes.find((s) => s.id === subscribeId); return subscribe?.name ?? `Subscribe ${subscribeId}`; },