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:
57
.env.example_
Normal file
57
.env.example_
Normal file
@@ -0,0 +1,57 @@
|
||||
# ==============================================
|
||||
# API Configuration
|
||||
# ==============================================
|
||||
API_URL=https://api.5130.co.kr
|
||||
|
||||
# Frontend URL (for CORS)
|
||||
NEXT_PUBLIC_FRONTEND_URL=http://localhost:3000
|
||||
|
||||
# ==============================================
|
||||
# Authentication Mode
|
||||
# ==============================================
|
||||
# 인증 모드 선택: sanctum | bearer
|
||||
# - sanctum: 웹 브라우저 사용자 (HTTP-only 쿠키)
|
||||
# - bearer: 모바일/SPA (토큰 기반)
|
||||
NEXT_PUBLIC_AUTH_MODE=sanctum
|
||||
|
||||
# ==============================================
|
||||
# API Key (⚠️ 서버 사이드 전용 - 절대 공개 금지!)
|
||||
# ==============================================
|
||||
# 개발팀 공유: 팀 내부 문서에서 키 값 확인
|
||||
# 주기적 갱신: PHP 백엔드 팀에서 새 키 발급 시 업데이트 필요
|
||||
#
|
||||
# ⚠️ 주의사항:
|
||||
# 1. 절대 NEXT_PUBLIC_ 접두사 붙이지 말 것!
|
||||
# 2. Git에 커밋하지 말 것! (.gitignore에 포함됨)
|
||||
# 3. 브라우저에서 접근 불가 (서버 사이드 전용)
|
||||
#
|
||||
# 사용처:
|
||||
# - 서버 간 통신 (Next.js API Routes)
|
||||
# - 백그라운드 작업 (Cron, Scripts)
|
||||
# - 외부 시스템 연동
|
||||
API_KEY=your-secret-api-key-here
|
||||
|
||||
# ==============================================
|
||||
# Development Tools
|
||||
# ==============================================
|
||||
# DevToolbar: 개발/테스트용 폼 자동 채우기 도구
|
||||
# - true: 활성화 (화면 하단에 플로팅 툴바 표시)
|
||||
# - false 또는 미설정: 비활성화
|
||||
# 주의: 운영 환경에서는 반드시 false로 설정!
|
||||
NEXT_PUBLIC_DEV_TOOLBAR_ENABLED=false
|
||||
|
||||
# ==============================================
|
||||
# Puppeteer (로컬 PDF 생성용)
|
||||
# ==============================================
|
||||
# puppeteer-core는 Chromium을 번들하지 않으므로 로컬 Chrome 경로 필요
|
||||
# macOS: /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
|
||||
# Linux: /usr/bin/google-chrome-stable
|
||||
# Vercel에서는 @sparticuz/chromium이 자동 처리하므로 설정 불필요
|
||||
PUPPETEER_EXECUTABLE_PATH=/Applications/Google Chrome.app/Contents/MacOS/Google Chrome
|
||||
|
||||
# ==============================================
|
||||
# Development Notes
|
||||
# ==============================================
|
||||
# 1. .env.example을 복사하여 .env.local 생성
|
||||
# 2. .env.local에 실제 키 값 입력
|
||||
# 3. .env.local은 Git에 커밋되지 않음
|
||||
33
.env.production_
Normal file
33
.env.production_
Normal file
@@ -0,0 +1,33 @@
|
||||
# ==============================================
|
||||
# API Configuration
|
||||
# ==============================================
|
||||
NEXT_PUBLIC_API_URL=https://api.codebridge-x.com
|
||||
|
||||
# Frontend URL (for CORS)
|
||||
NEXT_PUBLIC_FRONTEND_URL=https://dev.codebridge-x.com
|
||||
|
||||
# ==============================================
|
||||
# Authentication Mode
|
||||
# ==============================================
|
||||
# 인증 모드: sanctum (웹 브라우저 쿠키 기반)
|
||||
NEXT_PUBLIC_AUTH_MODE=sanctum
|
||||
|
||||
# ==============================================
|
||||
# API Key (⚠️ 절대 Git에 커밋하지 말 것!)
|
||||
# ==============================================
|
||||
# 개발용 고정 키 (주기적 갱신 예정)
|
||||
# 발급일: 2025-11-07
|
||||
# 갱신 필요 시: PHP 백엔드 팀에 새 키 요청
|
||||
# ✅ 서버 전용 (클라이언트에 노출되지 않음)
|
||||
API_KEY=42Jfwc6EaRQ04GNRmLR5kzJp5UudSOzGGqjmdk1a
|
||||
|
||||
# ==============================================
|
||||
# Google Maps API Key
|
||||
# ==============================================
|
||||
NEXT_PUBLIC_GOOGLE_MAPS_API_KEY=AIzaSyAS3bAzmXlhhZHgO3buFiTGzavXZ6ubYq8
|
||||
|
||||
# ==============================================
|
||||
# Development Tools
|
||||
# ==============================================
|
||||
# DevToolbar: 개발/테스트용 폼 자동 채우기 도구
|
||||
NEXT_PUBLIC_DEV_TOOLBAR_ENABLED=true
|
||||
33
env.local
Normal file
33
env.local
Normal file
@@ -0,0 +1,33 @@
|
||||
# ==============================================
|
||||
# API Configuration
|
||||
# ==============================================
|
||||
NEXT_PUBLIC_API_URL=https://api.codebridge-x.com
|
||||
|
||||
|
||||
# Frontend URL (for CORS)
|
||||
NEXT_PUBLIC_FRONTEND_URL=http://localhost:3000
|
||||
|
||||
# ==============================================
|
||||
# Authentication Mode
|
||||
# ==============================================
|
||||
# 인증 모드: sanctum (웹 브라우저 쿠키 기반)
|
||||
NEXT_PUBLIC_AUTH_MODE=sanctum
|
||||
|
||||
# ==============================================
|
||||
# API Key (⚠️ 절대 Git에 커밋하지 말 것!)
|
||||
# ==============================================
|
||||
# 개발용 고정 키 (주기적 갱신 예정)
|
||||
# 발급일: 2025-11-07
|
||||
# 갱신 필요 시: PHP 백엔드 팀에 새 키 요청
|
||||
# ✅ 서버 전용 (클라이언트에 노출되지 않음)
|
||||
API_KEY=42Jfwc6EaRQ04GNRmLR5kzJp5UudSOzGGqjmdk1a
|
||||
|
||||
# ==============================================
|
||||
# Google Maps API Key
|
||||
# ==============================================
|
||||
NEXT_PUBLIC_GOOGLE_MAPS_API_KEY=AIzaSyAS3bAzmXlhhZHgO3buFiTGzavXZ6ubYq8
|
||||
|
||||
# ==============================================
|
||||
# Puppeteer (로컬 PDF 생성용)
|
||||
# ==============================================
|
||||
PUPPETEER_EXECUTABLE_PATH=/Applications/Google Chrome.app/Contents/MacOS/Google Chrome
|
||||
@@ -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
|
||||
|
||||
@@ -29,10 +29,8 @@ import type {
|
||||
QuoteListParams,
|
||||
QuoteStatus,
|
||||
ProductCategory,
|
||||
BomCalculationResultItem,
|
||||
BomCalculationResult,
|
||||
} from './types';
|
||||
export type { BomCalculationResult, BomCalculationResultItem };
|
||||
import { transformApiToFrontend, transformFrontendToApi } from './types';
|
||||
|
||||
// ===== 페이지네이션 타입 =====
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user