summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorjoonhoekim <26rote@gmail.com>2025-06-02 02:27:56 +0000
committerjoonhoekim <26rote@gmail.com>2025-06-02 02:27:56 +0000
commite5f4a774fabc17b5b18d50c96f5695d89dcabc86 (patch)
treeb1ef756d93f8e8d1d67998a5694aab379e34b5bc /app
parent37611339fea096e47aaa42311a13a6313b4200db (diff)
(김준회) 기술영업 조선 RFQ 에러 처리 및 필터와 소팅 처리
Diffstat (limited to 'app')
-rw-r--r--app/[lng]/partners/(partners)/techsales/rfq-ship/page.tsx52
1 files changed, 5 insertions, 47 deletions
diff --git a/app/[lng]/partners/(partners)/techsales/rfq-ship/page.tsx b/app/[lng]/partners/(partners)/techsales/rfq-ship/page.tsx
index 5b0ffb61..12ff9a81 100644
--- a/app/[lng]/partners/(partners)/techsales/rfq-ship/page.tsx
+++ b/app/[lng]/partners/(partners)/techsales/rfq-ship/page.tsx
@@ -7,17 +7,13 @@ import { authOptions } from "@/app/api/auth/[...nextauth]/route";
import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card";
import { Button } from "@/components/ui/button";
import { LogIn } from "lucide-react";
-import { DataTableSkeleton } from "@/components/data-table/data-table-skeleton";
import { Shell } from "@/components/shell";
-import { getValidFilters } from "@/lib/data-table";
-import { type SearchParams } from "@/types/table";
-import { searchParamsVendorRfqCache } from "@/lib/techsales-rfq/validations";
import {
TECH_SALES_QUOTATION_STATUSES,
TECH_SALES_QUOTATION_STATUS_CONFIG
} from "@/db/schema";
-import { getQuotationStatusCounts, getVendorQuotations } from "@/lib/techsales-rfq/service";
+import { getQuotationStatusCounts } from "@/lib/techsales-rfq/service";
import { VendorQuotationsTable } from "@/lib/techsales-rfq/vendor-response/table/vendor-quotations-table";
export const metadata: Metadata = {
@@ -25,13 +21,7 @@ export const metadata: Metadata = {
description: "기술영업 RFQ 견적서를 관리합니다.",
};
-interface VendorQuotationsPageProps {
- searchParams: SearchParams;
-}
-
-export default async function VendorQuotationsPage({
- searchParams,
-}: VendorQuotationsPageProps) {
+export default async function VendorQuotationsPage() {
// 세션 확인
const session = await getServerSession(authOptions);
@@ -73,29 +63,9 @@ export default async function VendorQuotationsPage({
);
}
- // 검색 파라미터 파싱 및 검증
- const search = searchParamsVendorRfqCache.parse(searchParams);
- const validFilters = getValidFilters(search.filters);
-
// 견적서 상태별 개수 조회
const statusCountsPromise = getQuotationStatusCounts(vendorId.toString());
- // 견적서 목록 조회
- const quotationsPromise = getVendorQuotations(
- {
- flags: search.flags,
- page: search.page,
- perPage: search.perPage,
- sort: search.sort,
- filters: validFilters,
- joinOperator: search.joinOperator,
- search: search.search,
- from: search.from,
- to: search.to,
- },
- vendorId.toString()
- );
-
return (
<Shell variant="fullscreen" className="h-full">
{/* 고정 헤더 영역 */}
@@ -135,21 +105,9 @@ export default async function VendorQuotationsPage({
{/* 견적서 테이블 */}
<div className="flex-1 min-h-0 overflow-hidden">
- <React.Suspense
- fallback={
- <DataTableSkeleton
- columnCount={12}
- searchableColumnCount={2}
- filterableColumnCount={3}
- cellWidths={["10rem", "15rem", "12rem", "12rem", "8rem"]}
- shrinkZero
- />
- }
- >
- <div className="h-full overflow-auto">
- <VendorQuotationsTable promises={Promise.all([quotationsPromise.then(result => ({ data: result.data, pageCount: result.pageCount }))])} />
- </div>
- </React.Suspense>
+ <div className="h-full overflow-auto">
+ <VendorQuotationsTable vendorId={vendorId.toString()} />
+ </div>
</div>
</div>
</Shell>