fix(WEB): 견적번호 표시 수정, type re-export 제거, 발주처 검색 활성화

- quotes/types.ts: QuoteFormDataV2에 quoteNumber 필드 추가 및 transformApiToV2 매핑
- quotes/actions.ts: 'use server' 파일에서 불허되는 type re-export 제거
- ReceivingDetail.tsx: SupplierSearchModal 주석 해제하여 발주처 검색 활성화
This commit is contained in:
2026-02-09 16:03:41 +09:00
parent d014227e9c
commit 53b4f43b14
6 changed files with 127 additions and 5 deletions

View File

@@ -26,7 +26,7 @@ import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card';
import { Input } from '@/components/ui/input';
import { DatePicker } from '@/components/ui/date-picker';
import { Label } from '@/components/ui/label';
// import { SupplierSearchModal } from './SupplierSearchModal';
import { SupplierSearchModal } from './SupplierSearchModal';
import {
Select,
SelectContent,
@@ -862,7 +862,6 @@ export function ReceivingDetail({ id, mode = 'view' }: Props) {
}}
/>
{/* 발주처 검색 모달 - TODO: SupplierSearchModal 컴포넌트 생성 필요
<SupplierSearchModal
open={isSupplierSearchOpen}
onOpenChange={setIsSupplierSearchOpen}
@@ -873,7 +872,6 @@ export function ReceivingDetail({ id, mode = 'view' }: Props) {
}));
}}
/>
*/}
{/* 수입검사 성적서 모달 (읽기 전용) */}
<InspectionModalV2

View File

@@ -29,10 +29,8 @@ import type {
QuoteListParams,
QuoteStatus,
ProductCategory,
BomCalculationResultItem,
BomCalculationResult,
} from './types';
export type { BomCalculationResult, BomCalculationResultItem };
import { transformApiToFrontend, transformFrontendToApi } from './types';
// ===== 페이지네이션 타입 =====

View File

@@ -696,6 +696,7 @@ export interface LocationItem {
*/
export interface QuoteFormDataV2 {
id?: string;
quoteNumber?: string; // 견적번호
registrationDate: string;
writer: string;
clientId: string;
@@ -965,6 +966,7 @@ export function transformApiToV2(apiData: QuoteApiData): QuoteFormDataV2 {
// 변환된 Quote 데이터 타입 (camelCase)
const transformed = apiData as unknown as {
quoteNumber?: string;
registrationDate?: string;
createdBy?: string;
clientId?: string;
@@ -981,6 +983,7 @@ export function transformApiToV2(apiData: QuoteApiData): QuoteFormDataV2 {
return {
id: String(apiData.id),
quoteNumber: apiData.quote_number || transformed.quoteNumber || '',
// raw API: registration_date, transformed: registrationDate
registrationDate: formatDateForInput(apiData.registration_date || transformed.registrationDate),
// raw API: creator?.name, transformed: createdBy