From a1c32edb6eef43b35e4177ec64a3568728c0bdca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B9=80=EB=B3=B4=EA=B3=A4?= Date: Sun, 22 Mar 2026 12:39:32 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20[worker-screen]=20=EC=82=AC=EC=9D=B4?= =?UTF-8?q?=EB=93=9C=EB=B0=94+=EC=83=81=EC=84=B8=20=EC=98=81=EC=97=AD?= =?UTF-8?q?=EC=97=90=20=EC=9E=91=EC=97=85=EC=A7=80=EC=8B=9C=20=EC=A7=84?= =?UTF-8?q?=ED=96=89=EC=83=81=ED=83=9C=20=EB=B1=83=EC=A7=80=20=ED=91=9C?= =?UTF-8?q?=EC=8B=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../production/WorkerScreen/index.tsx | 39 +++++++++++++++---- 1 file changed, 32 insertions(+), 7 deletions(-) diff --git a/src/components/production/WorkerScreen/index.tsx b/src/components/production/WorkerScreen/index.tsx index 9af68185..6f6b746e 100644 --- a/src/components/production/WorkerScreen/index.tsx +++ b/src/components/production/WorkerScreen/index.tsx @@ -100,8 +100,16 @@ interface SidebarOrder { priority: 'urgent' | 'priority' | 'normal'; subType?: 'slat' | 'jointbar' | 'bending' | 'wip'; bdCode?: string; // 재공품 BD- 코드 (예: BD-ST-24) + status?: string; // 작업지시 상태 (waiting/in_progress/completed) } +const WO_STATUS_BADGE: Record = { + completed: { label: '완료', className: 'bg-gray-500 text-white' }, + in_progress: { label: '진행중', className: 'bg-green-100 text-green-700' }, + waiting: { label: '대기', className: 'bg-yellow-100 text-yellow-700' }, + pending: { label: '대기', className: 'bg-gray-100 text-gray-600' }, +}; + const SUB_TYPE_TAGS: Record = { slat: { label: '슬랫', className: 'bg-blue-100 text-blue-700' }, jointbar: { label: '조인트바', className: 'bg-purple-100 text-purple-700' }, @@ -472,6 +480,7 @@ export default function WorkerScreen() { priority: (wo.isUrgent ? 'urgent' : (wo.priority <= 3 ? 'priority' : 'normal')) as SidebarOrder['priority'], subType: isWip ? 'wip' as const : undefined, bdCode, + status: wo.status, }; }); }, [filteredWorkOrders]); @@ -890,6 +899,7 @@ export default function WorkerScreen() { salesManager: apiOrder.salesManager || '-', managerPhone: apiOrder.managerPhone || '-', shippingDate: apiOrder.dueDate ? new Date(apiOrder.dueDate).toLocaleDateString('ko-KR') : '-', + status: apiOrder.status || '-', }; } @@ -904,6 +914,7 @@ export default function WorkerScreen() { salesManager: first.salesManager || '-', managerPhone: first.managerPhone || '-', shippingDate: first.dueDate ? new Date(first.dueDate).toLocaleDateString('ko-KR') : '-', + status: first.status || '-', }; }, [filteredWorkOrders, selectedSidebarOrderId, activeProcessTabKey]); @@ -1514,7 +1525,14 @@ export default function WorkerScreen() { {/* 수주 정보 */} -

수주 정보

+
+

수주 정보

+ {orderInfo?.status && WO_STATUS_BADGE[orderInfo.status] && ( + + {WO_STATUS_BADGE[orderInfo.status].label} + + )} +
@@ -1806,12 +1824,19 @@ function SidebarContent({ )} >
-

{order.siteName}

- {tag && ( - - {tag.label} - - )} +

{order.siteName}

+
+ {order.status && WO_STATUS_BADGE[order.status] && ( + + {WO_STATUS_BADGE[order.status].label} + + )} + {tag && ( + + {tag.label} + + )} +
{order.bdCode && (

{order.bdCode}