summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
Diffstat (limited to 'app')
-rw-r--r--app/[lng]/evcp/(evcp)/vendors/[id]/info/basic/basic-info-client.tsx15
-rw-r--r--app/api/files/[...path]/route.ts3
2 files changed, 16 insertions, 2 deletions
diff --git a/app/[lng]/evcp/(evcp)/vendors/[id]/info/basic/basic-info-client.tsx b/app/[lng]/evcp/(evcp)/vendors/[id]/info/basic/basic-info-client.tsx
index 0e4dccf4..536bed95 100644
--- a/app/[lng]/evcp/(evcp)/vendors/[id]/info/basic/basic-info-client.tsx
+++ b/app/[lng]/evcp/(evcp)/vendors/[id]/info/basic/basic-info-client.tsx
@@ -25,7 +25,7 @@ import { AdditionalInfoDialog } from "@/components/vendor-regular-registrations/
import { getSiteVisitRequestsByVendorId } from "@/lib/site-visit/service";
import { fetchVendorRegistrationStatus } from "@/lib/vendor-regular-registrations/service";
import { getVendorAttachmentsByType, getVendorPeriodicGrade, getVendorTypeInfo } from "@/lib/vendor-info/service";
-import { downloadFile } from "@/lib/file-download";
+// downloadFile은 동적으로 import
import {
Table,
TableBody,
@@ -440,6 +440,8 @@ export default function BasicInfoClient({
// DocumentStatusDialog가 기대하는 형태로 데이터 구성
const dialogData = {
// 기본 정보
+ id: result.data.registration?.id || 0,
+ vendorId: parseInt(vendorId),
companyName: result.data.vendor.vendorName,
businessNumber: result.data.vendor.taxId,
representative: result.data.vendor.representativeName,
@@ -449,6 +451,14 @@ export default function BasicInfoClient({
// 문서 제출 현황 - documentSubmissions 속성으로 매핑
documentSubmissions: result.data.documentStatus,
+ // 문서별 파일 정보 추가
+ documentFiles: result.data.documentFiles || {
+ businessRegistration: [],
+ creditEvaluation: [],
+ bankCopy: [],
+ auditResult: []
+ },
+
// 기본계약 정보
basicContracts: result.data.basicContracts || [],
@@ -507,6 +517,9 @@ export default function BasicInfoClient({
// 첨부파일 다운로드 핸들러
const handleAttachmentDownload = async (filePath: string, fileName: string) => {
try {
+ // 동적으로 downloadFile 함수 import
+ const { downloadFile } = await import('@/lib/file-download')
+
const result = await downloadFile(filePath, fileName);
if (result.success) {
toast.success(`${fileName} 파일이 다운로드되었습니다.`);
diff --git a/app/api/files/[...path]/route.ts b/app/api/files/[...path]/route.ts
index 0bc2e22f..2b58ca43 100644
--- a/app/api/files/[...path]/route.ts
+++ b/app/api/files/[...path]/route.ts
@@ -49,7 +49,8 @@ const isAllowedPath = (requestedPath: string): boolean => {
'vendors/nda',
'vendors',
'pq',
- 'pq/vendor'
+ 'pq/vendor',
+ 'information'
];
return allowedPaths.some(allowed =>