From e2d739d1d4771960bc3bedcc3153d292968713e3 Mon Sep 17 00:00:00 2001 From: jingchuan Date: Thu, 13 Aug 2026 09:08:33 +0800 Subject: [PATCH] fix(sample-progress): count only active managed samples --- .../src/app/intake/sample-progress/SampleProgressClient.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/furniture-3d-system/src/app/intake/sample-progress/SampleProgressClient.tsx b/furniture-3d-system/src/app/intake/sample-progress/SampleProgressClient.tsx index b50bf34a..dd78d7d4 100644 --- a/furniture-3d-system/src/app/intake/sample-progress/SampleProgressClient.tsx +++ b/furniture-3d-system/src/app/intake/sample-progress/SampleProgressClient.tsx @@ -36,6 +36,7 @@ export default function SampleProgressClient({ initialItems, currentUserName, em }), [items, keyword, status]) const totalPages = Math.max(1, Math.ceil(filtered.length / PAGE_SIZE)) const rows = filtered.slice((Math.min(page, totalPages) - 1) * PAGE_SIZE, Math.min(page, totalPages) * PAGE_SIZE) + const activeCount = items.filter((item) => !hiddenTerminalStatuses.has(item.status)).length const overdueCount = items.filter(isOverdue).length const statusCounts = SAMPLE_PROGRESS_STATUSES.map((value) => ({ value, count: items.filter((item) => item.status === value).length })) @@ -54,7 +55,7 @@ export default function SampleProgressClient({ initialItems, currentUserName, em
- } label="在管打样" value={`${items.length} 款`} tone="plain" /> + } label="在管打样" value={`${activeCount} 款`} tone="plain" /> } label="交期已超期" value={`${overdueCount} 款`} tone={overdueCount ? 'danger' : 'plain'} />