From 3e85fbde628bb556e5f6a93cafd9ba4d53031461 Mon Sep 17 00:00:00 2001 From: joonhoekim <26rote@gmail.com> Date: Fri, 24 Oct 2025 15:18:36 +0900 Subject: (김준회) fix: SWP 초기 개발건 오류 수정 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../(partners)/swp-document-upload/page.tsx | 20 ++++++++++---------- .../swp-document-upload/vendor-document-page.tsx | 22 +++++++++------------- 2 files changed, 19 insertions(+), 23 deletions(-) (limited to 'app') diff --git a/app/[lng]/partners/(partners)/swp-document-upload/page.tsx b/app/[lng]/partners/(partners)/swp-document-upload/page.tsx index 25eb52aa..5b8a0be8 100644 --- a/app/[lng]/partners/(partners)/swp-document-upload/page.tsx +++ b/app/[lng]/partners/(partners)/swp-document-upload/page.tsx @@ -2,6 +2,7 @@ import { Suspense } from "react"; import { Skeleton } from "@/components/ui/skeleton"; import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@/components/ui/card"; import VendorDocumentPage from "./vendor-document-page"; +import { Shell } from "@/components/shell"; export const metadata = { title: "문서 조회 및 업로드", @@ -37,21 +38,20 @@ export default async function DocumentUploadPage({ const params = await searchParams; return ( -
+ {/* 헤더 */} - - - 문서 조회 및 업로드 - - 프로젝트별 할당된 문서를 조회하고 파일을 업로드할 수 있습니다. - - - +
+
+

+ SWP 문서 제출 +

+
+
{/* 메인 컨텐츠 */} }> -
+ ); } \ No newline at end of file diff --git a/app/[lng]/partners/(partners)/swp-document-upload/vendor-document-page.tsx b/app/[lng]/partners/(partners)/swp-document-upload/vendor-document-page.tsx index f2469c29..2431259d 100644 --- a/app/[lng]/partners/(partners)/swp-document-upload/vendor-document-page.tsx +++ b/app/[lng]/partners/(partners)/swp-document-upload/vendor-document-page.tsx @@ -12,9 +12,8 @@ import { fetchVendorDocuments, fetchVendorProjects, fetchVendorSwpStats, - type SwpTableFilters, - type SwpDocumentWithStats, } from "@/lib/swp/vendor-actions"; +import { type SwpTableFilters, type SwpDocumentWithStats } from "@/lib/swp/actions"; interface VendorDocumentPageProps { searchParams: { [key: string]: string | string[] | undefined }; @@ -91,9 +90,8 @@ export default function VendorDocumentPage({ searchParams }: VendorDocumentPageP } catch (err) { console.error("초기 데이터 로드 실패:", err); setError(err instanceof Error ? err.message : "데이터 로드 실패"); - } finally { - setIsLoading(false); } + setIsLoading(false); // finally 대신 여기서 호출 }; const loadDocuments = async () => { @@ -152,16 +150,16 @@ export default function VendorDocumentPage({ searchParams }: VendorDocumentPageP ); } - if (error) { - return ( - - {error} - - ); - } return (
+ {/* 에러 메시지 */} + {error && ( + + {error} + + )} + {/* 통계 카드 */}
@@ -209,7 +207,6 @@ export default function VendorDocumentPage({ searchParams }: VendorDocumentPageP filters={filters} onFiltersChange={handleFiltersChange} projects={projects} - mode="vendor" /> @@ -220,7 +217,6 @@ export default function VendorDocumentPage({ searchParams }: VendorDocumentPageP pageSize={pageSize} totalPages={totalPages} onPageChange={handlePageChange} - mode="vendor" /> -- cgit v1.2.3