From 09dabd13af81b22c7561e095acc3be9a7555395f 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 18:36:10 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20[=EC=9E=91=EC=97=85=EC=9E=90=ED=99=94?= =?UTF-8?q?=EB=A9=B4]=20=EB=A7=88=EC=A7=80=EB=A7=89=20=EB=8B=A8=EA=B3=84?= =?UTF-8?q?=20=EC=99=84=EB=A3=8C=20=EC=8B=9C=20=EC=83=9D=EC=82=B0=EC=9D=BC?= =?UTF-8?q?=EC=9E=90=20=EC=9E=90=EB=8F=99=20=EC=A0=80=EC=9E=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 모든 공정 단계 완료(work_order_status_changed) 시 오늘 날짜로 생산일자 저장 - 검사 완료 시 + 마지막 단계 완료 시 양쪽 모두 적용 --- src/components/production/WorkerScreen/index.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/components/production/WorkerScreen/index.tsx b/src/components/production/WorkerScreen/index.tsx index 5c772479..705527fd 100644 --- a/src/components/production/WorkerScreen/index.tsx +++ b/src/components/production/WorkerScreen/index.tsx @@ -1044,9 +1044,12 @@ export default function WorkerScreen() { })); toast.success(result.data.is_completed ? `${step.name} 완료` : `${step.name} 완료 취소`); - // 모든 단계 완료 시 작업지시 자동 완료 → 목록 새로고침 + // 모든 단계 완료 시 작업지시 자동 완료 → 생산일자 저장 + 목록 새로고침 if (result.data.work_order_status_changed) { toast.success('모든 공정 단계 완료 — 작업지시가 자동 완료되었습니다.'); + const today = new Date().toISOString().slice(0, 10); + await updateWorkOrderInfo(orderId, { scheduled_date: today }); + setProductionDate(today); try { const refreshResult = await getMyWorkOrders(); if (refreshResult.success) setWorkOrders(refreshResult.data);