From db3ebc3f82c4fee7e2d4f030d7967d8ee4535418 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:42:38 +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=8B=A8=EA=B3=84=20=EC=99=84=EB=A3=8C=20?= =?UTF-8?q?=EC=8B=9C=20=EC=83=9D=EC=82=B0=EC=9D=BC=EC=9E=90=20=EC=9E=90?= =?UTF-8?q?=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 - 어떤 단계든 완료 체크 시 생산일자가 비어있으면 오늘 날짜로 자동 저장 - 이미 생산일자가 설정되어 있으면 덮어쓰지 않음 --- src/components/production/WorkerScreen/index.tsx | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/components/production/WorkerScreen/index.tsx b/src/components/production/WorkerScreen/index.tsx index 705527fd..2c28c50d 100644 --- a/src/components/production/WorkerScreen/index.tsx +++ b/src/components/production/WorkerScreen/index.tsx @@ -1044,6 +1044,13 @@ export default function WorkerScreen() { })); toast.success(result.data.is_completed ? `${step.name} 완료` : `${step.name} 완료 취소`); + // 단계 완료 시 생산일자가 비어있으면 오늘로 자동 저장 + if (result.data.is_completed && !productionDate) { + const today = new Date().toISOString().slice(0, 10); + setProductionDate(today); + updateWorkOrderInfo(orderId, { scheduled_date: today }); + } + // 모든 단계 완료 시 작업지시 자동 완료 → 생산일자 저장 + 목록 새로고침 if (result.data.work_order_status_changed) { toast.success('모든 공정 단계 완료 — 작업지시가 자동 완료되었습니다.');