diff options
| author | dujinkim <dujin.kim@dtsolution.co.kr> | 2025-05-28 12:26:28 +0000 |
|---|---|---|
| committer | dujinkim <dujin.kim@dtsolution.co.kr> | 2025-05-28 12:26:28 +0000 |
| commit | 36dd60ca6fce7712b35e6d7c1b9602710f442ada (patch) | |
| tree | 32c3f6e2eef53b565d545535b10b7980ad184883 /lib/rfqs-tech/tbe-table/vendor-contact/vendor-contact-table-column.tsx | |
| parent | 2caa8093ac616f14d48430ce2f485f805d6faa53 (diff) | |
(최겸) 기술영업 해양 rfq 개발v1
Diffstat (limited to 'lib/rfqs-tech/tbe-table/vendor-contact/vendor-contact-table-column.tsx')
| -rw-r--r-- | lib/rfqs-tech/tbe-table/vendor-contact/vendor-contact-table-column.tsx | 70 |
1 files changed, 70 insertions, 0 deletions
diff --git a/lib/rfqs-tech/tbe-table/vendor-contact/vendor-contact-table-column.tsx b/lib/rfqs-tech/tbe-table/vendor-contact/vendor-contact-table-column.tsx new file mode 100644 index 00000000..fcd0c3fb --- /dev/null +++ b/lib/rfqs-tech/tbe-table/vendor-contact/vendor-contact-table-column.tsx @@ -0,0 +1,70 @@ +"use client" +// Because columns rely on React state/hooks for row actions + +import * as React from "react" +import { ColumnDef, Row } from "@tanstack/react-table" +import { ClientDataTableColumnHeaderSimple } from "@/components/client-data-table/data-table-column-simple-header" +import { formatDate } from "@/lib/utils" +import { Checkbox } from "@/components/ui/checkbox" +import { VendorData } from "./vendor-contact-table" + + +/** getColumns: return array of ColumnDef for 'vendors' data */ +export function getColumns(): ColumnDef<VendorData>[] { + return [ + + // Vendor Name + { + accessorKey: "contactName", + header: ({ column }) => ( + <ClientDataTableColumnHeaderSimple column={column} title="Contact Name" /> + ), + cell: ({ row }) => row.getValue("contactName"), + }, + + // Vendor Code + { + accessorKey: "contactPosition", + header: ({ column }) => ( + <ClientDataTableColumnHeaderSimple column={column} title="Position" /> + ), + cell: ({ row }) => row.getValue("contactPosition"), + }, + + // Status + { + accessorKey: "contactEmail", + header: ({ column }) => ( + <ClientDataTableColumnHeaderSimple column={column} title="Email" /> + ), + cell: ({ row }) => row.getValue("contactEmail"), + }, + + // Country + { + accessorKey: "contactPhone", + header: ({ column }) => ( + <ClientDataTableColumnHeaderSimple column={column} title="Phone" /> + ), + cell: ({ row }) => row.getValue("contactPhone"), + }, + + // Created At + { + accessorKey: "createdAt", + header: ({ column }) => ( + <ClientDataTableColumnHeaderSimple column={column} title="Created At" /> + ), + cell: ({ cell }) => formatDate(cell.getValue() as Date), + }, + + // Updated At + { + accessorKey: "updatedAt", + header: ({ column }) => ( + <ClientDataTableColumnHeaderSimple column={column} title="Updated At" /> + ), + cell: ({ cell }) => formatDate(cell.getValue() as Date), + }, + ] +}
\ No newline at end of file |
