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

@@ -87,6 +87,8 @@ const getEmptyRecord = (): Omit<BadDebtRecord, 'id' | 'createdAt' | 'updatedAt'>
assignedManagerId: null,
assignedManager: null,
settingToggle: true,
badDebtCount: 0,
badDebts: [],
files: [],
memos: [],
});
@@ -1015,7 +1017,7 @@ export function BadDebtDetail({ mode, recordId, initialData }: BadDebtDetailProp
<IntegratedDetailTemplate
config={dynamicConfig}
mode={isNewMode ? 'create' : (isViewMode ? 'view' : 'edit')}
initialData={formData}
initialData={formData as unknown as Record<string, unknown>}
itemId={recordId}
isLoading={isLoading}
headerActions={customHeaderActions}

View File

@@ -132,4 +132,13 @@ export const VENDOR_TYPE_LABELS: Record<string, string> = {
sales: '매출',
purchase: '매입',
both: '매출매입',
};
};
// ===== 요약 통계 =====
export interface BadDebtSummary {
totalCount: number;
totalAmount: number;
collectedAmount: number;
pendingAmount: number;
collectionRate: number;
}

View File

@@ -185,8 +185,8 @@ export function BillManagement({ initialVendorId, initialBillType }: BillManagem
}, [router]);
// 저장 핸들러 (선택된 항목의 상태 일괄 변경)
const handleSave = useCallback(async (selectedItems: BillRecord[]) => {
if (selectedItems.length === 0) {
const handleSave = useCallback(async (selectedItems: Set<string>) => {
if (selectedItems.size === 0) {
toast.warning('선택된 항목이 없습니다.');
return;
}
@@ -200,8 +200,8 @@ export function BillManagement({ initialVendorId, initialBillType }: BillManagem
let successCount = 0;
let failCount = 0;
for (const item of selectedItems) {
const result = await updateBillStatus(item.id, statusFilter as BillStatus);
for (const itemId of selectedItems) {
const result = await updateBillStatus(itemId, statusFilter as BillStatus);
if (result.success) {
successCount++;
} else {

View File

@@ -25,6 +25,7 @@ interface CardTransactionApiItem {
name: string;
} | null;
} | null;
usage_type?: string;
created_at: string;
updated_at: string;
}
@@ -67,6 +68,7 @@ function transformItem(item: CardTransactionApiItem): CardTransaction {
usedAt,
merchantName: item.merchant_name || item.description || '-',
amount: typeof item.amount === 'string' ? parseFloat(item.amount) : item.amount,
usageType: item.usage_type || '',
createdAt: item.created_at,
updatedAt: item.updated_at,
};

View File

@@ -473,7 +473,6 @@ export function CardTransactionInquiry({
hideSearch: true,
searchValue: searchQuery,
onSearchChange: setSearchQuery,
searchPlaceholder: '카드, 카드명, 사용자, 가맹점명 검색...',
dateRangeSelector: {
enabled: true,

View File

@@ -314,7 +314,6 @@ export function DepositManagement({ initialData, initialPagination }: DepositMan
hideSearch: true,
searchValue: searchQuery,
onSearchChange: setSearchQuery,
searchPlaceholder: '입금자명, 계좌명, 적요, 거래처 검색...',
// 공통 헤더 옵션
dateRangeSelector: {

View File

@@ -357,7 +357,6 @@ export function PurchaseManagement() {
hideSearch: true,
searchValue: searchQuery,
onSearchChange: setSearchQuery,
searchPlaceholder: '매입번호, 거래처명 검색...',
// 공통 헤더 옵션
dateRangeSelector: {

View File

@@ -360,7 +360,6 @@ export function SalesManagement({ initialData, initialPagination }: SalesManagem
hideSearch: true,
searchValue: searchQuery,
onSearchChange: setSearchQuery,
searchPlaceholder: '매출번호, 거래처명, 비고 검색...',
// 공통 헤더 옵션
dateRangeSelector: {

View File

@@ -374,7 +374,7 @@ export function VendorLedgerDetail({
<IntegratedDetailTemplate
config={vendorLedgerConfig}
mode="view"
initialData={vendorDetail || {}}
initialData={(vendorDetail || {}) as Record<string, unknown>}
itemId={vendorId}
isLoading={isLoading && !vendorDetail}
headerActions={customHeaderActions}

View File

@@ -566,7 +566,7 @@ export function VendorDetailClient({ mode, vendorId, initialData }: VendorDetail
<IntegratedDetailTemplate
config={dynamicConfig}
mode={templateMode}
initialData={initialData as Record<string, unknown>}
initialData={initialData as unknown as Record<string, unknown>}
itemId={vendorId}
onSubmit={handleSubmit}
onDelete={vendorId ? handleDelete : undefined}

View File

@@ -443,7 +443,7 @@ export function VendorManagementClient({ initialData, initialTotal }: VendorMana
key: 'sortBy',
label: '정렬',
type: 'single',
options: SORT_OPTIONS.filter(o => o.value !== 'all'),
options: SORT_OPTIONS,
},
],
initialFilters: {

View File

@@ -34,6 +34,7 @@ import type {
Vendor,
SortOption,
} from './types';
export type { Vendor } from './types';
import {
VENDOR_CATEGORY_OPTIONS,
VENDOR_CATEGORY_LABELS,

View File

@@ -39,6 +39,7 @@ export interface ClientApiData {
outstanding_amount: number;
bad_debt_total: number;
has_bad_debt: boolean;
is_overdue?: boolean;
created_at: string;
updated_at: string;
}

View File

@@ -351,7 +351,6 @@ export function WithdrawalManagement({ initialData, initialPagination }: Withdra
},
// 검색창 (공통 컴포넌트에서 자동 생성)
hideSearch: true,
searchValue: searchQuery,
onSearchChange: setSearchQuery,