From 53b4f43b14e6a687099f290f090da8c6f3f5ce24 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B6=8C=ED=98=81=EC=84=B1?= Date: Mon, 9 Feb 2026 16:03:41 +0900 Subject: [PATCH] =?UTF-8?q?fix(WEB):=20=EA=B2=AC=EC=A0=81=EB=B2=88?= =?UTF-8?q?=ED=98=B8=20=ED=91=9C=EC=8B=9C=20=EC=88=98=EC=A0=95,=20type=20r?= =?UTF-8?q?e-export=20=EC=A0=9C=EA=B1=B0,=20=EB=B0=9C=EC=A3=BC=EC=B2=98=20?= =?UTF-8?q?=EA=B2=80=EC=83=89=20=ED=99=9C=EC=84=B1=ED=99=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - quotes/types.ts: QuoteFormDataV2에 quoteNumber 필드 추가 및 transformApiToV2 매핑 - quotes/actions.ts: 'use server' 파일에서 불허되는 type re-export 제거 - ReceivingDetail.tsx: SupplierSearchModal 주석 해제하여 발주처 검색 활성화 --- .env.example_ | 57 +++++++++++++++++++ .env.production_ | 33 +++++++++++ env.local | 33 +++++++++++ .../ReceivingManagement/ReceivingDetail.tsx | 4 +- src/components/quotes/actions.ts | 2 - src/components/quotes/types.ts | 3 + 6 files changed, 127 insertions(+), 5 deletions(-) create mode 100644 .env.example_ create mode 100644 .env.production_ create mode 100644 env.local diff --git a/.env.example_ b/.env.example_ new file mode 100644 index 00000000..182473ff --- /dev/null +++ b/.env.example_ @@ -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에 커밋되지 않음 \ No newline at end of file diff --git a/.env.production_ b/.env.production_ new file mode 100644 index 00000000..fad23d61 --- /dev/null +++ b/.env.production_ @@ -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 \ No newline at end of file diff --git a/env.local b/env.local new file mode 100644 index 00000000..ac476840 --- /dev/null +++ b/env.local @@ -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 \ No newline at end of file diff --git a/src/components/material/ReceivingManagement/ReceivingDetail.tsx b/src/components/material/ReceivingManagement/ReceivingDetail.tsx index 0af167f1..72453949 100644 --- a/src/components/material/ReceivingManagement/ReceivingDetail.tsx +++ b/src/components/material/ReceivingManagement/ReceivingDetail.tsx @@ -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 컴포넌트 생성 필요 - */} {/* 수입검사 성적서 모달 (읽기 전용) */}