feat(WEB): 공정 단계 API 연동 - mock 데이터 제거
- actions.ts: 목데이터/스텁 함수를 실제 API 호출로 교체 (CRUD + reorder) - actions.ts: ApiProcessStep 타입 + transformStepApiToFrontend 변환 추가 - actions.ts: ApiProcess에 steps 관계 매핑 추가 - ProcessListClient: 단계 수 workSteps → steps 기반으로 변경 - ProcessDetail: 드래그&드롭 후 reorder API 호출 추가
This commit is contained in:
@@ -329,7 +329,7 @@ export default function ProcessListClient({ initialData = [], initialStats }: Pr
|
||||
<TableCell className="font-medium">{process.processCode}</TableCell>
|
||||
<TableCell>{process.processName}</TableCell>
|
||||
<TableCell>{process.department}</TableCell>
|
||||
<TableCell className="text-center">{process.workSteps.length}</TableCell>
|
||||
<TableCell className="text-center">{process.steps?.length ?? 0}</TableCell>
|
||||
<TableCell className="text-center">{itemCount > 0 ? itemCount : '-'}</TableCell>
|
||||
<TableCell className="text-center" onClick={(e) => e.stopPropagation()}>
|
||||
<Badge
|
||||
@@ -383,7 +383,7 @@ export default function ProcessListClient({ initialData = [], initialStats }: Pr
|
||||
infoGrid={
|
||||
<div className="grid grid-cols-2 gap-x-4 gap-y-3">
|
||||
<InfoField label="담당부서" value={process.department} />
|
||||
<InfoField label="단계" value={`${process.workSteps.length}개`} />
|
||||
<InfoField label="단계" value={`${process.steps?.length ?? 0}개`} />
|
||||
<InfoField label="품목" value={itemCount > 0 ? `${itemCount}개` : '-'} />
|
||||
</div>
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user