From 8da223a416ec7d2be5743f312ed1d8c6d64949e2 Mon Sep 17 00:00:00 2001 From: joonhoekim <26rote@gmail.com> Date: Tue, 2 Sep 2025 08:44:17 +0000 Subject: (김준회) 협력업체 관리 메뉴에서, 공급품목(패키지) 제거, MDG 자재마스터 기반 벤더별 공급품목 메뉴 구현 (정의서+강미경프로 요구대로 구현) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/material/vendor-material/columns.tsx | 154 +++++++++++++++++++++++++++++++ 1 file changed, 154 insertions(+) create mode 100644 lib/material/vendor-material/columns.tsx (limited to 'lib/material/vendor-material/columns.tsx') diff --git a/lib/material/vendor-material/columns.tsx b/lib/material/vendor-material/columns.tsx new file mode 100644 index 00000000..8f706d63 --- /dev/null +++ b/lib/material/vendor-material/columns.tsx @@ -0,0 +1,154 @@ +"use client"; + +import { ColumnDef } from "@tanstack/react-table"; +import { DataTableColumnHeaderSimple } from "@/components/data-table/data-table-column-simple-header"; +import { VendorPossibleMaterial } from "../vendor-possible-material-service"; +import { formatDate } from "@/lib/utils"; + +// 확정정보 테이블 컬럼 +export const confirmedMaterialsColumns: ColumnDef[] = [ + { + accessorKey: "vendorTypeNameEn", + header: ({ column }) => ( + + ), + cell: ({ row }) => { + const vendorTypeNameEn = row.getValue("vendorTypeNameEn") as string; + return {vendorTypeNameEn || "-"}; + }, + }, + { + accessorKey: "itemCode", + header: ({ column }) => ( + + ), + cell: ({ row }) => { + const itemCode = row.getValue("itemCode") as string; + return {itemCode || "-"}; + }, + }, + { + accessorKey: "itemName", + header: ({ column }) => ( + + ), + cell: ({ row }) => { + const itemName = row.getValue("itemName") as string; + return {itemName || "-"}; + }, + }, + { + accessorKey: "recentPoNo", + header: ({ column }) => ( + + ), + cell: ({ row }) => { + const recentPoNo = row.getValue("recentPoNo") as string; + return {recentPoNo || "-"}; + }, + }, + { + accessorKey: "recentPoDate", + header: ({ column }) => ( + + ), + cell: ({ row }) => { + const date = row.getValue("recentPoDate") as Date; + return {date ? formatDate(date) : "-"}; + }, + }, + { + accessorKey: "recentDeliveryDate", + header: ({ column }) => ( + + ), + cell: ({ row }) => { + const date = row.getValue("recentDeliveryDate") as Date; + return {date ? formatDate(date) : "-"}; + }, + }, + { + accessorKey: "createdAt", + header: ({ column }) => ( + + ), + cell: ({ row }) => { + const date = row.getValue("createdAt") as Date; + return {formatDate(date)}; + }, + }, + { + accessorKey: "registerUserName", + header: ({ column }) => ( + + ), + cell: ({ row }) => { + const userName = row.getValue("registerUserName") as string; + return {userName || "-"}; + }, + }, + { + accessorKey: "recentOrderDate", + header: ({ column }) => ( + + ), + cell: ({ row }) => { + const date = row.getValue("recentOrderDate") as Date; + return {date ? formatDate(date) : "-"}; + }, + }, +]; + +// 업체입력정보 테이블 컬럼 +export const vendorInputMaterialsColumns: ColumnDef[] = [ + { + accessorKey: "vendorTypeNameEn", + header: ({ column }) => ( + + ), + cell: ({ row }) => { + const vendorTypeNameEn = row.getValue("vendorTypeNameEn") as string; + return {vendorTypeNameEn || "-"}; + }, + }, + { + accessorKey: "itemCode", + header: ({ column }) => ( + + ), + cell: ({ row }) => { + const itemCode = row.getValue("itemCode") as string; + return {itemCode || "-"}; + }, + }, + { + accessorKey: "itemName", + header: ({ column }) => ( + + ), + cell: ({ row }) => { + const itemName = row.getValue("itemName") as string; + return {itemName || "-"}; + }, + }, + { + accessorKey: "createdAt", + header: ({ column }) => ( + + ), + cell: ({ row }) => { + const date = row.getValue("createdAt") as Date; + return {formatDate(date)}; + }, + }, + { + accessorKey: "registerUserName", + header: ({ column }) => ( + + ), + cell: ({ row }) => { + const userName = row.getValue("registerUserName") as string; + return {userName || "-"}; + }, + }, +]; -- cgit v1.2.3