From 4644ae298d40263ffce5fb15a2bf1f5cb3b7bb9b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B6=8C=ED=98=81=EC=84=B1?= Date: Fri, 13 Feb 2026 03:41:51 +0900 Subject: [PATCH] =?UTF-8?q?refactor(WEB):=EA=B3=B5=EC=A0=95=20=EB=8B=A8?= =?UTF-8?q?=EA=B3=84=20completion=5Ftype=20=ED=95=9C=EA=B8=80=E2=86=92?= =?UTF-8?q?=EC=98=81=EB=AC=B8=20=EC=BD=94=EB=93=9C=20=EC=A0=84=ED=99=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - StepCompletionType을 영문 코드로 변경 (click_complete 등) - STEP_COMPLETION_TYPE_LABELS 라벨 맵 추가 - StepDetail, StepForm, actions 변환 로직 적용 --- .../process-management/StepDetail.tsx | 3 ++- src/components/process-management/StepForm.tsx | 2 +- src/components/process-management/actions.ts | 2 +- src/types/process.ts | 17 ++++++++++++----- 4 files changed, 16 insertions(+), 8 deletions(-) diff --git a/src/components/process-management/StepDetail.tsx b/src/components/process-management/StepDetail.tsx index b620d30c..4831ee58 100644 --- a/src/components/process-management/StepDetail.tsx +++ b/src/components/process-management/StepDetail.tsx @@ -32,6 +32,7 @@ import { AlertDialogTitle, } from '@/components/ui/alert-dialog'; import type { ProcessStep } from '@/types/process'; +import { STEP_COMPLETION_TYPE_LABELS } from '@/types/process'; interface StepDetailProps { step: ProcessStep; @@ -149,7 +150,7 @@ export function StepDetail({ step, processId }: StepDetailProps) {
유형
-
{step.completionType}
+
{STEP_COMPLETION_TYPE_LABELS[step.completionType] || step.completionType}
diff --git a/src/components/process-management/StepForm.tsx b/src/components/process-management/StepForm.tsx index 3c18ddd1..cd951dd4 100644 --- a/src/components/process-management/StepForm.tsx +++ b/src/components/process-management/StepForm.tsx @@ -101,7 +101,7 @@ export function StepForm({ mode, processId, initialData }: StepFormProps) { // 완료 정보 const [completionType, setCompletionType] = useState( - initialData?.completionType || '클릭 시 완료' + initialData?.completionType || 'click_complete' ); // 검사 설정 diff --git a/src/components/process-management/actions.ts b/src/components/process-management/actions.ts index 2f59a5cb..1ccd1566 100644 --- a/src/components/process-management/actions.ts +++ b/src/components/process-management/actions.ts @@ -605,7 +605,7 @@ function transformStepApiToFrontend(apiStep: ApiProcessStep): ProcessStep { order: apiStep.sort_order, connectionType: (apiStep.connection_type as ProcessStep['connectionType']) || '없음', connectionTarget: apiStep.connection_target ?? undefined, - completionType: (apiStep.completion_type as ProcessStep['completionType']) || '클릭 시 완료', + completionType: (apiStep.completion_type as ProcessStep['completionType']) || 'click_complete', }; } diff --git a/src/types/process.ts b/src/types/process.ts index 7a9e2198..7851c508 100644 --- a/src/types/process.ts +++ b/src/types/process.ts @@ -172,8 +172,8 @@ export const PROCESS_CATEGORY_OPTIONS: Record = { + selection_complete: '선택 완료 시 완료', + click_complete: '클릭 시 완료', + inspection_complete: '검사완료 시 완료', +}; + // 연결 도달 옵션 export const STEP_CONNECTION_TARGET_OPTIONS: { value: string; label: string }[] = [ { value: '입고완료 자재 목록', label: '입고완료 자재 목록' },