fix: 프로젝트 전체 TypeScript 타입에러 408개 수정 (tsc --noEmit 0 errors)
- 공통 템플릿 타입 수정 (IntegratedDetailTemplate, UniversalListPage) - 페이지(app/[locale]) 타입 호환성 수정 (80개) - 재고/자재 모듈 타입 수정 (StockStatus, ReceivingManagement) - 생산 모듈 타입 수정 (WorkOrders, WorkerScreen, WorkResults) - 주문/출고 모듈 타입 수정 (ShipmentManagement, Orders) - 견적/단가 모듈 타입 수정 (Quotes, Pricing) - 건설 모듈 타입 수정 (49개, 17개 하위 모듈) - HR 모듈 타입 수정 (CardManagement, VacationManagement 등) - 설정 모듈 타입 수정 (PermissionManagement, AccountManagement 등) - 게시판 모듈 타입 수정 (BoardManagement, BoardList 등) - 회계 모듈 타입 수정 (VendorManagement, BadDebtCollection 등) - 기타 모듈 타입 수정 (CEODashboard, clients, vehicle 등) - 유틸/훅/API 타입 수정 (hooks, contexts, lib) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -214,7 +214,7 @@ export function WorkOrderCreate() {
|
||||
processId: formData.processId!, // 공정 ID (FK → processes.id)
|
||||
scheduledDate: formData.shipmentDate,
|
||||
assigneeIds: formData.assignees.map(id => parseInt(id)),
|
||||
memo: formData.note || undefined,
|
||||
note: formData.note || undefined,
|
||||
});
|
||||
|
||||
if (result.success) {
|
||||
@@ -518,10 +518,11 @@ export function WorkOrderCreate() {
|
||||
config={workOrderCreateConfig}
|
||||
mode="create"
|
||||
isLoading={isLoadingProcesses}
|
||||
isSubmitting={isSubmitting}
|
||||
onBack={handleCancel}
|
||||
onCancel={handleCancel}
|
||||
onSubmit={handleSubmit}
|
||||
onSubmit={async (_data: Record<string, unknown>) => {
|
||||
await handleSubmit();
|
||||
return { success: true };
|
||||
}}
|
||||
renderForm={renderFormContent}
|
||||
/>
|
||||
|
||||
|
||||
@@ -366,10 +366,10 @@ export function WorkOrderEdit({ orderId }: WorkOrderEditProps) {
|
||||
config={dynamicConfig}
|
||||
mode="edit"
|
||||
isLoading={isLoading}
|
||||
isSubmitting={isSubmitting}
|
||||
onBack={handleCancel}
|
||||
onCancel={handleCancel}
|
||||
onSubmit={handleSubmit}
|
||||
onSubmit={async (_data: Record<string, unknown>) => {
|
||||
return handleSubmit();
|
||||
}}
|
||||
renderForm={renderFormContent}
|
||||
/>
|
||||
|
||||
|
||||
@@ -286,7 +286,7 @@ export async function createWorkOrder(
|
||||
// ===== 작업지시 수정 =====
|
||||
export async function updateWorkOrder(
|
||||
id: string,
|
||||
data: Partial<WorkOrder>
|
||||
data: Partial<WorkOrder> & { assigneeIds?: number[] }
|
||||
): Promise<{ success: boolean; data?: WorkOrder; error?: string }> {
|
||||
try {
|
||||
const apiData = transformFrontendToApi(data);
|
||||
|
||||
@@ -78,13 +78,9 @@ export function InspectionReportModal({
|
||||
{ id: '2', no: 2, status: 'waiting', productName: '메쉬 스크린', floorCode: '2층/FSS-03', specification: '6,400 X 5,200', quantity: 4, unit: 'EA' },
|
||||
{ id: '3', no: 3, status: 'completed', productName: '광폭 와이어', floorCode: '3층/FSS-05', specification: '12,000 X 4,500', quantity: 1, unit: 'EA' },
|
||||
],
|
||||
currentStep: { key: 'cutting', label: '절단', order: 2 },
|
||||
completedSteps: ['material_input'],
|
||||
totalProgress: 25,
|
||||
currentStep: 2,
|
||||
issues: [],
|
||||
memo: '',
|
||||
createdAt: '2026-01-20T09:00:00',
|
||||
updatedAt: '2026-01-29T14:00:00',
|
||||
note: '',
|
||||
});
|
||||
|
||||
useEffect(() => {
|
||||
|
||||
@@ -34,7 +34,6 @@ import {
|
||||
import { ListMobileCard, InfoField } from '@/components/organisms/MobileCard';
|
||||
import { toast } from 'sonner';
|
||||
import { getWorkResults, getWorkResultStats } from './actions';
|
||||
import { PROCESS_TYPE_LABELS } from '../WorkOrders/types';
|
||||
import type { WorkResult, WorkResultStats } from './types';
|
||||
import { isNextRedirectError } from '@/lib/utils/redirect-error';
|
||||
|
||||
@@ -207,7 +206,7 @@ export function WorkResultList() {
|
||||
{ key: 'lotNo', label: '로트번호', className: 'min-w-[150px]' },
|
||||
{ key: 'workDate', label: '작업일', className: 'w-[100px]' },
|
||||
{ key: 'workOrderNo', label: '작업지시번호', className: 'min-w-[140px]' },
|
||||
{ key: 'processType', label: '공정', className: 'w-[80px]' },
|
||||
{ key: 'processName', label: '공정', className: 'w-[80px]' },
|
||||
{ key: 'productName', label: '품목명', className: 'min-w-[180px]' },
|
||||
{ key: 'specification', label: '규격', className: 'w-[100px]' },
|
||||
{ key: 'productionQty', label: '생산수량', className: 'w-[80px] text-center' },
|
||||
@@ -216,7 +215,7 @@ export function WorkResultList() {
|
||||
{ key: 'defectRate', label: '불량률', className: 'w-[80px] text-center' },
|
||||
{ key: 'inspection', label: '검사', className: 'w-[60px] text-center' },
|
||||
{ key: 'packaging', label: '포장', className: 'w-[60px] text-center' },
|
||||
{ key: 'worker', label: '작업자', className: 'w-[80px]' },
|
||||
{ key: 'workerName', label: '작업자', className: 'w-[80px]' },
|
||||
],
|
||||
|
||||
// 서버 사이드 페이지네이션
|
||||
@@ -279,7 +278,7 @@ export function WorkResultList() {
|
||||
<TableCell>{item.workOrderNo}</TableCell>
|
||||
<TableCell>
|
||||
<Badge variant="outline" className="text-xs">
|
||||
{PROCESS_TYPE_LABELS[item.processType]}
|
||||
{item.processName}
|
||||
</Badge>
|
||||
</TableCell>
|
||||
<TableCell className="max-w-[200px] truncate">{item.productName}</TableCell>
|
||||
@@ -310,7 +309,7 @@ export function WorkResultList() {
|
||||
<span className="text-muted-foreground">-</span>
|
||||
)}
|
||||
</TableCell>
|
||||
<TableCell>{item.worker}</TableCell>
|
||||
<TableCell>{item.workerName}</TableCell>
|
||||
</TableRow>
|
||||
);
|
||||
},
|
||||
@@ -342,7 +341,7 @@ export function WorkResultList() {
|
||||
title={item.productName}
|
||||
statusBadge={
|
||||
<Badge variant="outline" className="text-xs">
|
||||
{PROCESS_TYPE_LABELS[item.processType]}
|
||||
{item.processName}
|
||||
</Badge>
|
||||
}
|
||||
infoGrid={
|
||||
@@ -350,7 +349,7 @@ export function WorkResultList() {
|
||||
<InfoField label="작업일" value={item.workDate} />
|
||||
<InfoField label="작업지시번호" value={item.workOrderNo} />
|
||||
<InfoField label="규격" value={item.specification} />
|
||||
<InfoField label="작업자" value={item.worker} />
|
||||
<InfoField label="작업자" value={item.workerName} />
|
||||
<InfoField label="생산수량" value={`${item.productionQty}개`} />
|
||||
<InfoField label="양품수량" value={`${item.goodQty}개`} />
|
||||
<InfoField
|
||||
|
||||
@@ -175,6 +175,7 @@ export function WorkCard({
|
||||
|
||||
{/* 공정상세 섹션 (토글) */}
|
||||
<ProcessDetailSection
|
||||
workOrderId={order.id ?? ''}
|
||||
isExpanded={isExpanded}
|
||||
materialRequired={true}
|
||||
onMaterialInput={() => onMaterialInput(order)}
|
||||
|
||||
@@ -64,13 +64,9 @@ export function WorkLogModal({ open, onOpenChange, workOrderId, processType }: W
|
||||
{ id: '2', no: 2, status: 'waiting', productName: '메쉬 스크린', floorCode: '2층/FSS-03', specification: '6,400 X 5,200', quantity: 4, unit: 'EA' },
|
||||
{ id: '3', no: 3, status: 'completed', productName: '광폭 와이어', floorCode: '3층/FSS-05', specification: '12,000 X 4,500', quantity: 1, unit: 'EA' },
|
||||
],
|
||||
currentStep: { key: 'cutting', label: '절단', order: 2 },
|
||||
completedSteps: ['material_input'],
|
||||
totalProgress: 25,
|
||||
currentStep: 2,
|
||||
issues: [],
|
||||
memo: '',
|
||||
createdAt: '2026-01-20T09:00:00',
|
||||
updatedAt: '2026-01-29T14:00:00',
|
||||
note: '',
|
||||
});
|
||||
|
||||
// 모달 열릴 때 데이터 fetch
|
||||
|
||||
Reference in New Issue
Block a user