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:
유병철
2026-01-30 10:07:58 +09:00
parent 8a5cbde5ef
commit a1f4c82cec
154 changed files with 832 additions and 536 deletions

View File

@@ -62,7 +62,10 @@ import { useDevFill } from "@/components/dev";
import { generateOrderData } from "@/components/dev/generators/orderData";
// 수주 폼 데이터 타입
// Index signature allows compatibility with Record<string, unknown> (required by actions API)
export interface OrderFormData {
[key: string]: unknown;
// 견적 정보
selectedQuotation?: QuotationForSelect;
@@ -208,7 +211,7 @@ export function OrderRegistration({
// 금액 계산
useEffect(() => {
const subtotal = form.items.reduce((sum, item) => sum + item.amount, 0);
const subtotal = form.items.reduce((sum, item) => sum + (item.amount ?? 0), 0);
const discountAmount = subtotal * (form.discountRate / 100);
const totalAmount = subtotal - discountAmount;
@@ -349,7 +352,7 @@ export function OrderRegistration({
}, []);
// 저장 핸들러
const handleSave = useCallback(async () => {
const handleSave = useCallback(async (): Promise<{ success: boolean; error?: string }> => {
// 유효성 검사
const errors = validateForm();
setFieldErrors(errors);
@@ -357,12 +360,16 @@ export function OrderRegistration({
const errorCount = Object.keys(errors).length;
if (errorCount > 0) {
toast.error(`입력 내용을 확인해주세요. (${errorCount}개 오류)`);
return;
return { success: false, error: `입력 내용을 확인해주세요. (${errorCount}개 오류)` };
}
setIsSaving(true);
try {
await onSave(form);
return { success: true };
} catch (e) {
const errorMsg = e instanceof Error ? e.message : '저장 중 오류가 발생했습니다.';
return { success: false, error: errorMsg };
} finally {
setIsSaving(false);
}
@@ -813,7 +820,7 @@ export function OrderRegistration({
{formatAmount(item.unitPrice)}
</TableCell>
<TableCell className="text-right font-medium">
{formatAmount(item.amount)}
{formatAmount(item.amount ?? 0)}
</TableCell>
<TableCell>
<Button
@@ -894,10 +901,8 @@ export function OrderRegistration({
config={config}
mode={isEditMode ? "edit" : "create"}
isLoading={false}
isSubmitting={isSaving}
onBack={onBack}
onCancel={onBack}
onSubmit={handleSave}
onSubmit={() => handleSave()}
renderForm={renderFormContent}
/>