summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
Diffstat (limited to 'app')
-rw-r--r--app/[lng]/evcp/(evcp)/vendors/[id]/info/bid-history/page.tsx56
1 files changed, 56 insertions, 0 deletions
diff --git a/app/[lng]/evcp/(evcp)/vendors/[id]/info/bid-history/page.tsx b/app/[lng]/evcp/(evcp)/vendors/[id]/info/bid-history/page.tsx
new file mode 100644
index 00000000..82fd5514
--- /dev/null
+++ b/app/[lng]/evcp/(evcp)/vendors/[id]/info/bid-history/page.tsx
@@ -0,0 +1,56 @@
+import { Separator } from "@/components/ui/separator";
+import { getBidHistory } from "@/lib/vendors/service";
+import { type SearchParams } from "@/types/table";
+import { getValidFilters } from "@/lib/data-table";
+import { searchParamsBidHistoryCache } from "@/lib/vendors/validations";
+import { VendorBidHistoryTable } from "@/lib/vendors/bid-history-table/bid-history-table";
+
+interface BidHistoryPageProps {
+ params: {
+ lng: string;
+ id: string;
+ };
+ searchParams: Promise<SearchParams>;
+}
+
+export default async function BidHistoryPage(props: BidHistoryPageProps) {
+ const resolvedParams = await props.params;
+ const lng = resolvedParams.lng;
+ const id = resolvedParams.id;
+
+ const idAsNumber = Number(id);
+
+ // SearchParams 파싱 (Zod)
+ const searchParams = await props.searchParams;
+ const search = searchParamsBidHistoryCache.parse(searchParams);
+ const validFilters = getValidFilters(search.filters);
+
+ const promises = Promise.all([
+ getBidHistory(
+ {
+ ...search,
+ filters: validFilters,
+ },
+ idAsNumber
+ ),
+ ]);
+
+ // 렌더링
+ return (
+ <div className="space-y-6">
+ <div>
+ <h3 className="text-lg font-medium">입찰 히스토리</h3>
+ <p className="text-sm text-muted-foreground">
+ 협력업체의 입찰 참여 이력을 확인할 수 있습니다.
+ </p>
+ </div>
+ <Separator />
+ <div>
+ <VendorBidHistoryTable
+ promises={promises}
+ lng={lng}
+ />
+ </div>
+ </div>
+ );
+}