fix: TypeScript 타입 오류 수정 및 설정 페이지 추가
- BOMItem Omit 타입 시그니처 통일 (useTemplateManagement, SectionsTab, ItemMasterContext) - HeadersInit → Record<string, string> 타입 변경 - Zustand useShallow 마이그레이션 (zustand/react/shallow) - DataTable, ListPageTemplate 제네릭 타입 제약 추가 - 설정 관리 페이지 추가 (직급, 직책, 휴가정책, 근무일정, 권한) - HR 관리 페이지 추가 (급여, 휴가) - 단가관리 페이지 리팩토링 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -26,7 +26,7 @@ export interface ClientApiResponse {
|
||||
business_no: string | null;
|
||||
business_type: string | null;
|
||||
business_item: string | null;
|
||||
is_active: "Y" | "N";
|
||||
is_active: boolean;
|
||||
created_at: string;
|
||||
updated_at: string;
|
||||
// 2차 추가 필드 (백엔드 완료 시 활성화)
|
||||
@@ -195,7 +195,7 @@ export function transformClientFromApi(api: ClientApiResponse): Client {
|
||||
businessType: api.business_type || "",
|
||||
businessItem: api.business_item || "",
|
||||
registeredDate: api.created_at ? api.created_at.split(" ")[0] : "",
|
||||
status: api.is_active === "Y" ? "활성" : "비활성",
|
||||
status: api.is_active ? "활성" : "비활성",
|
||||
groupId: api.client_group_id ? String(api.client_group_id) : null,
|
||||
// 2차 추가 필드
|
||||
clientType: api.client_type || "매입",
|
||||
@@ -234,7 +234,7 @@ export function transformClientToApiCreate(form: ClientFormData): Record<string,
|
||||
business_type: form.businessType || null,
|
||||
business_item: form.businessItem || null,
|
||||
client_group_id: form.groupId ? Number(form.groupId) : null,
|
||||
is_active: form.isActive ? "Y" : "N",
|
||||
is_active: form.isActive,
|
||||
// 2차 추가 필드
|
||||
client_type: form.clientType,
|
||||
mobile: form.mobile || null,
|
||||
@@ -271,7 +271,7 @@ export function transformClientToApiUpdate(form: ClientFormData): Record<string,
|
||||
business_type: form.businessType || null,
|
||||
business_item: form.businessItem || null,
|
||||
client_group_id: form.groupId ? Number(form.groupId) : null,
|
||||
is_active: form.isActive ? "Y" : "N",
|
||||
is_active: form.isActive,
|
||||
// 2차 추가 필드
|
||||
client_type: form.clientType,
|
||||
mobile: form.mobile || null,
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
'use client';
|
||||
|
||||
import { useState, useEffect, useCallback, useRef } from 'react';
|
||||
import type { ItemMaster } from '@/types/item';
|
||||
import type { ItemMaster, ItemType, PartType } from '@/types/item';
|
||||
import type { CustomTabResponse, TabColumnResponse } from '@/types/item-master-api';
|
||||
import { itemMasterApi } from '@/lib/api/item-master';
|
||||
|
||||
@@ -133,8 +133,8 @@ export function useItemList(): UseItemListResult {
|
||||
id: String(itemId ?? ''),
|
||||
itemCode: (item.code ?? item.item_code ?? '') as string,
|
||||
itemName: (item.name ?? item.item_name ?? '') as string,
|
||||
itemType: (item.type_code ?? item.item_type ?? '') as string,
|
||||
partType: item.part_type as string | undefined,
|
||||
itemType: (item.type_code ?? item.item_type ?? '') as ItemType,
|
||||
partType: item.part_type as PartType | undefined,
|
||||
unit: (item.unit ?? '') as string,
|
||||
specification: (item.specification ?? '') as string,
|
||||
// is_active가 null/undefined면 deleted_at 기준으로 판단 (삭제 안됐으면 활성)
|
||||
@@ -146,6 +146,7 @@ export function useItemList(): UseItemListResult {
|
||||
salesPrice: (item.sales_price ?? 0) as number,
|
||||
purchasePrice: (item.purchase_price ?? 0) as number,
|
||||
currentRevision: (item.current_revision ?? 0) as number,
|
||||
isFinal: Boolean(item.is_final ?? false),
|
||||
createdAt: (item.created_at ?? '') as string,
|
||||
updatedAt: (item.updated_at ?? '') as string,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user