summaryrefslogtreecommitdiff
path: root/lib/techsales-rfq/vendor-response/table
diff options
context:
space:
mode:
Diffstat (limited to 'lib/techsales-rfq/vendor-response/table')
-rw-r--r--lib/techsales-rfq/vendor-response/table/vendor-quotations-table-columns.tsx32
-rw-r--r--lib/techsales-rfq/vendor-response/table/vendor-quotations-table.tsx22
2 files changed, 39 insertions, 15 deletions
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 b89f8953..39de94ed 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
@@ -30,7 +30,6 @@ interface QuotationWithRfqCode extends TechSalesVendorQuotations {
// 아이템 정보
itemName?: string;
-
itemCount?: number;
// 프로젝트 정보
@@ -38,6 +37,9 @@ interface QuotationWithRfqCode extends TechSalesVendorQuotations {
pspid?: string;
sector?: string;
+ // RFQ 정보
+ description?: string;
+
// 벤더 정보
vendorName?: string;
vendorCode?: string;
@@ -194,6 +196,33 @@ export function getColumns({ router, openAttachmentsSheet, openItemsDialog }: Ge
// enableHiding: true,
// },
{
+ accessorKey: "description",
+ header: ({ column }) => (
+ <DataTableColumnHeaderSimple column={column} title="RFQ title" />
+ ),
+ cell: ({ row }) => {
+ const description = row.getValue("description") as string;
+ return (
+ <div className="min-w-48 max-w-64">
+ <TooltipProvider>
+ <Tooltip>
+ <TooltipTrigger asChild>
+ <span className="truncate block text-sm">
+ {description || "N/A"}
+ </span>
+ </TooltipTrigger>
+ <TooltipContent>
+ <p className="max-w-xs">{description || "N/A"}</p>
+ </TooltipContent>
+ </Tooltip>
+ </TooltipProvider>
+ </div>
+ );
+ },
+ enableSorting: true,
+ enableHiding: true,
+ },
+ {
accessorKey: "projNm",
header: ({ column }) => (
<DataTableColumnHeaderSimple column={column} title="프로젝트명" />
@@ -313,7 +342,6 @@ export function getColumns({ router, openAttachmentsSheet, openItemsDialog }: Ge
cell: ({ row }) => {
const quotation = row.original
const attachmentCount = quotation.attachmentCount || 0
-
const handleClick = () => {
openAttachmentsSheet(quotation.rfqId)
}
diff --git a/lib/techsales-rfq/vendor-response/table/vendor-quotations-table.tsx b/lib/techsales-rfq/vendor-response/table/vendor-quotations-table.tsx
index 5e5d4f39..4c5cdf8e 100644
--- a/lib/techsales-rfq/vendor-response/table/vendor-quotations-table.tsx
+++ b/lib/techsales-rfq/vendor-response/table/vendor-quotations-table.tsx
@@ -38,12 +38,15 @@ interface QuotationWithRfqCode extends TechSalesVendorQuotations {
rfqStatus?: string;
itemName?: string | null;
projNm?: string | null;
- quotationCode?: string | null;
-
- rejectionReason?: string | null;
- acceptedAt?: Date | null;
+ description?: string | null;
attachmentCount?: number;
itemCount?: number;
+ pspid?: string | null;
+ sector?: string | null;
+ vendorName?: string | null;
+ vendorCode?: string | null;
+ createdByName?: string | null;
+ updatedByName?: string | null;
}
interface VendorQuotationsTableProps {
@@ -380,7 +383,7 @@ export function VendorQuotationsTable({ vendorId, rfqType }: VendorQuotationsTab
// useDataTable 훅 사용
const { table } = useDataTable({
data: stableData,
- columns,
+ columns: columns as any,
pageCount,
rowCount: total,
filterFields,
@@ -391,7 +394,7 @@ export function VendorQuotationsTable({ vendorId, rfqType }: VendorQuotationsTab
enableRowSelection: true, // 행 선택 활성화
initialState: {
sorting: initialSettings.sort,
- columnPinning: { right: ["actions"] },
+ columnPinning: { right: ["actions", "items", "attachments"] },
},
getRowId: (originalRow) => String(originalRow.id),
shallow: false,
@@ -417,13 +420,6 @@ export function VendorQuotationsTable({ vendorId, rfqType }: VendorQuotationsTab
<div className="w-full">
<div className="overflow-x-auto">
<div className="relative">
- {/* 로딩 오버레이 (재로딩 시) */}
- {/* {!isInitialLoad && isLoading && (
- <div className="absolute h-full w-full inset-0 bg-background/90 backdrop-blur-md z-10 flex items-center justify-center">
- <CenterLoadingIndicator />
- </div>
- )} */}
-
<DataTable
table={table}
className="min-w-full"