summaryrefslogtreecommitdiff
path: root/lib/tech-vendors/table/tech-vendors-table.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'lib/tech-vendors/table/tech-vendors-table.tsx')
-rw-r--r--lib/tech-vendors/table/tech-vendors-table.tsx43
1 files changed, 39 insertions, 4 deletions
diff --git a/lib/tech-vendors/table/tech-vendors-table.tsx b/lib/tech-vendors/table/tech-vendors-table.tsx
index d6e6f99f..63ca8fcc 100644
--- a/lib/tech-vendors/table/tech-vendors-table.tsx
+++ b/lib/tech-vendors/table/tech-vendors-table.tsx
@@ -13,7 +13,7 @@ import { DataTable } from "@/components/data-table/data-table"
import { DataTableAdvancedToolbar } from "@/components/data-table/data-table-advanced-toolbar"
import { getColumns } from "./tech-vendors-table-columns"
import { getTechVendors, getTechVendorStatusCounts } from "../service"
-import { TechVendor, techVendors } from "@/db/schema/techVendors"
+import { TechVendor, techVendors, TechVendorWithAttachments } from "@/db/schema/techVendors"
import { TechVendorsTableToolbarActions } from "./tech-vendors-table-toolbar-actions"
import { UpdateVendorSheet } from "./update-vendor-sheet"
import { getVendorStatusIcon } from "../utils"
@@ -49,13 +49,14 @@ export function TechVendorsTable({ promises }: TechVendorsTableProps) {
const statusMap: Record<string, string> = {
"ACTIVE": "활성 상태",
"INACTIVE": "비활성 상태",
- "BLACKLISTED": "거래 금지"
+ "BLACKLISTED": "거래 금지",
+ "PENDING_REVIEW": "비교 견적",
};
return statusMap[status] || status;
};
- const filterFields: DataTableFilterField<TechVendor>[] = [
+ const filterFields: DataTableFilterField<TechVendorWithAttachments>[] = [
{
id: "status",
label: "상태",
@@ -69,7 +70,7 @@ export function TechVendorsTable({ promises }: TechVendorsTableProps) {
{ id: "vendorCode", label: "업체 코드" },
]
- const advancedFilterFields: DataTableAdvancedFilterField<TechVendor>[] = [
+ const advancedFilterFields: DataTableAdvancedFilterField<TechVendorWithAttachments>[] = [
{ id: "vendorName", label: "업체명", type: "text" },
{ id: "vendorCode", label: "업체코드", type: "text" },
{ id: "email", label: "이메일", type: "text" },
@@ -85,6 +86,40 @@ export function TechVendorsTable({ promises }: TechVendorsTableProps) {
icon: getVendorStatusIcon(status),
})),
},
+ {
+ id: "techVendorType",
+ label: "벤더 타입",
+ type: "multi-select",
+ options: [
+ { label: "조선", value: "조선" },
+ { label: "해양TOP", value: "해양TOP" },
+ { label: "해양HULL", value: "해양HULL" },
+ ],
+ },
+ {
+ id: "workTypes",
+ label: "Work Type",
+ type: "multi-select",
+ options: [
+ // 조선 workTypes
+ { label: "기장", value: "기장" },
+ { label: "전장", value: "전장" },
+ { label: "선실", value: "선실" },
+ { label: "배관", value: "배관" },
+ { label: "철의", value: "철의" },
+ // 해양TOP workTypes
+ { label: "TM", value: "TM" },
+ { label: "TS", value: "TS" },
+ { label: "TE", value: "TE" },
+ { label: "TP", value: "TP" },
+ // 해양HULL workTypes
+ { label: "HA", value: "HA" },
+ { label: "HE", value: "HE" },
+ { label: "HH", value: "HH" },
+ { label: "HM", value: "HM" },
+ { label: "NC", value: "NC" },
+ ],
+ },
{ id: "createdAt", label: "등록일", type: "date" },
{ id: "updatedAt", label: "수정일", type: "date" },
]