From e5f4a774fabc17b5b18d50c96f5695d89dcabc86 Mon Sep 17 00:00:00 2001
From: joonhoekim <26rote@gmail.com>
Date: Mon, 2 Jun 2025 02:27:56 +0000
Subject: (김준회) 기술영업 조선 RFQ 에러 처리 및 필터와 소팅 처리
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../vendor-response/detail/project-info-tab.tsx | 9 +-
.../vendor-response/detail/quotation-tabs.tsx | 2 +-
.../vendor-response/quotation-editor.tsx | 6 +-
.../table/vendor-quotations-table-columns.tsx | 255 +++++++++++++++++----
.../table/vendor-quotations-table.tsx | 239 ++++++++++++++++---
5 files changed, 430 insertions(+), 81 deletions(-)
(limited to 'lib/techsales-rfq/vendor-response')
diff --git a/lib/techsales-rfq/vendor-response/detail/project-info-tab.tsx b/lib/techsales-rfq/vendor-response/detail/project-info-tab.tsx
index 7ba3320d..e4b1b8c3 100644
--- a/lib/techsales-rfq/vendor-response/detail/project-info-tab.tsx
+++ b/lib/techsales-rfq/vendor-response/detail/project-info-tab.tsx
@@ -48,7 +48,7 @@ interface ProjectInfoTabProps {
item?: {
id: number
itemCode: string | null
- itemName: string | null
+ itemList: string | null
} | null
biddingProject?: {
id: number
@@ -74,6 +74,8 @@ export function ProjectInfoTab({ quotation }: ProjectInfoTabProps) {
const projectSnapshot = rfq?.projectSnapshot
const seriesSnapshot = rfq?.seriesSnapshot
+ console.log("rfq: ", rfq)
+
if (!rfq) {
return (
diff --git a/lib/techsales-rfq/vendor-response/table/vendor-quotations-table-columns.tsx b/lib/techsales-rfq/vendor-response/table/vendor-quotations-table-columns.tsx
index 109698ea..cf1dac42 100644
--- a/lib/techsales-rfq/vendor-response/table/vendor-quotations-table-columns.tsx
+++ b/lib/techsales-rfq/vendor-response/table/vendor-quotations-table-columns.tsx
@@ -13,24 +13,46 @@ import {
TooltipProvider,
TooltipTrigger,
} from "@/components/ui/tooltip"
-import { DataTableColumnHeader } from "@/components/data-table/data-table-column-header"
import {
TechSalesVendorQuotations,
TECH_SALES_QUOTATION_STATUS_CONFIG
} from "@/db/schema"
import { AppRouterInstance } from "next/dist/shared/lib/app-router-context.shared-runtime"
+import { DataTableColumnHeaderSimple } from "@/components/data-table/data-table-column-simple-header"
interface QuotationWithRfqCode extends TechSalesVendorQuotations {
+ // RFQ 관련 정보
rfqCode?: string;
materialCode?: string;
dueDate?: Date;
rfqStatus?: string;
+
+ // 아이템 정보
itemName?: string;
+ itemShipbuildingId?: number;
+
+ // 프로젝트 정보
projNm?: string;
+ pspid?: string;
+ sector?: string;
+
+ // 벤더 정보
+ vendorName?: string;
+ vendorCode?: string;
+
+ // 사용자 정보
+ createdByName?: string | null;
+ updatedByName?: string | null;
+
+ // 견적 코드 및 버전
quotationCode?: string | null;
quotationVersion?: number | null;
+
+ // 추가 상태 정보
rejectionReason?: string | null;
acceptedAt?: Date | null;
+
+ // 첨부파일 개수
attachmentCount?: number;
}
@@ -65,23 +87,23 @@ export function getColumns({ router, openAttachmentsSheet }: GetColumnsProps): C
enableSorting: false,
enableHiding: false,
},
- {
- accessorKey: "id",
- header: ({ column }) => (
-
- ),
- cell: ({ row }) => (
-
- {row.getValue("id")}
-
- ),
- enableSorting: true,
- enableHiding: true,
- },
+ // {
+ // accessorKey: "id",
+ // header: ({ column }) => (
+ //
+ // ),
+ // cell: ({ row }) => (
+ //
+ // {row.getValue("id")}
+ //
+ // ),
+ // enableSorting: true,
+ // enableHiding: true,
+ // },
{
accessorKey: "rfqCode",
header: ({ column }) => (
-
+
),
cell: ({ row }) => {
const rfqCode = row.getValue("rfqCode") as string;
@@ -94,26 +116,58 @@ export function getColumns({ router, openAttachmentsSheet }: GetColumnsProps): C
enableSorting: true,
enableHiding: false,
},
- {
- accessorKey: "materialCode",
- header: ({ column }) => (
-
- ),
- cell: ({ row }) => {
- const materialCode = row.getValue("materialCode") as string;
- return (
-
- {materialCode || "N/A"}
-
- );
- },
- enableSorting: true,
- enableHiding: true,
- },
+ // {
+ // accessorKey: "vendorName",
+ // header: ({ column }) => (
+ //
+ // ),
+ // cell: ({ row }) => {
+ // const vendorName = row.getValue("vendorName") as string;
+ // return (
+ //
+ // {vendorName || "N/A"}
+ //
+ // );
+ // },
+ // enableSorting: true,
+ // enableHiding: false,
+ // },
+ // {
+ // accessorKey: "vendorCode",
+ // header: ({ column }) => (
+ //
+ // ),
+ // cell: ({ row }) => {
+ // const vendorCode = row.getValue("vendorCode") as string;
+ // return (
+ //
+ // {vendorCode || "N/A"}
+ //
+ // );
+ // },
+ // enableSorting: true,
+ // enableHiding: true,
+ // },
+ // {
+ // accessorKey: "materialCode",
+ // header: ({ column }) => (
+ //
+ // ),
+ // cell: ({ row }) => {
+ // const materialCode = row.getValue("materialCode") as string;
+ // return (
+ //
+ // {materialCode || "N/A"}
+ //
+ // );
+ // },
+ // enableSorting: true,
+ // enableHiding: true,
+ // },
{
accessorKey: "itemName",
header: ({ column }) => (
-
+
),
cell: ({ row }) => {
const itemName = row.getValue("itemName") as string;
@@ -134,13 +188,13 @@ export function getColumns({ router, openAttachmentsSheet }: GetColumnsProps): C
);
},
- enableSorting: false,
+ enableSorting: true,
enableHiding: true,
},
{
accessorKey: "projNm",
header: ({ column }) => (
-