refactor(WEB):공정 단계 completion_type 한글→영문 코드 전환
- StepCompletionType을 영문 코드로 변경 (click_complete 등) - STEP_COMPLETION_TYPE_LABELS 라벨 맵 추가 - StepDetail, StepForm, actions 변환 로직 적용
This commit is contained in:
@@ -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) {
|
||||
<div className="grid grid-cols-1 sm:grid-cols-2 gap-6">
|
||||
<div className="space-y-1">
|
||||
<div className="text-sm text-muted-foreground">유형</div>
|
||||
<div className="font-medium">{step.completionType}</div>
|
||||
<div className="font-medium">{STEP_COMPLETION_TYPE_LABELS[step.completionType] || step.completionType}</div>
|
||||
</div>
|
||||
</div>
|
||||
</CardContent>
|
||||
|
||||
@@ -101,7 +101,7 @@ export function StepForm({ mode, processId, initialData }: StepFormProps) {
|
||||
|
||||
// 완료 정보
|
||||
const [completionType, setCompletionType] = useState<StepCompletionType>(
|
||||
initialData?.completionType || '클릭 시 완료'
|
||||
initialData?.completionType || 'click_complete'
|
||||
);
|
||||
|
||||
// 검사 설정
|
||||
|
||||
@@ -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',
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user