diff options
Diffstat (limited to 'lib/items-tech/table/top')
| -rw-r--r-- | lib/items-tech/table/top/import-item-handler.tsx | 10 | ||||
| -rw-r--r-- | lib/items-tech/table/top/item-excel-template.tsx | 6 | ||||
| -rw-r--r-- | lib/items-tech/table/top/offshore-top-table-columns.tsx | 12 |
3 files changed, 12 insertions, 16 deletions
diff --git a/lib/items-tech/table/top/import-item-handler.tsx b/lib/items-tech/table/top/import-item-handler.tsx index e2564a91..541ec4ef 100644 --- a/lib/items-tech/table/top/import-item-handler.tsx +++ b/lib/items-tech/table/top/import-item-handler.tsx @@ -60,16 +60,14 @@ export async function processTopFileImport( try { // 필드 매핑 (한글/영문 필드명 모두 지원) - const itemCode = row["아이템 코드"] || row["itemCode"] || ""; - const itemName = row["아이템 명"] || row["itemName"] || "기술영업"; // 기본값 설정 + const itemCode = row["자재 그룹"] || row["itemCode"] || ""; const workType = row["기능(공종)"] || row["workType"] || ""; - const itemList = row["아이템 리스트"] || row["itemList"] || null; - const subItemList = row["서브 아이템 리스트"] || row["subItemList"] || null; + const itemList = row["자재명"] || row["itemList"] || null; + const subItemList = row["자재명(상세)"] || row["subItemList"] || null; // 데이터 정제 const cleanedRow = { itemCode: typeof itemCode === 'string' ? itemCode.trim() : String(itemCode).trim(), - itemName: typeof itemName === 'string' ? itemName.trim() : String(itemName).trim(), workType: typeof workType === 'string' ? workType.trim() : String(workType).trim(), itemList: itemList ? (typeof itemList === 'string' ? itemList : String(itemList)) : null, subItemList: subItemList ? (typeof subItemList === 'string' ? subItemList : String(subItemList)) : null, @@ -91,9 +89,7 @@ export async function processTopFileImport( // 해양 TOP 아이템 생성 const result = await createOffshoreTopItem({ itemCode: cleanedRow.itemCode, - itemName: cleanedRow.itemName, // Excel에서 가져온 값 또는 기본값 사용 workType: cleanedRow.workType as "TM" | "TS" | "TE" | "TP", - description: null, itemList: cleanedRow.itemList, subItemList: cleanedRow.subItemList, }); diff --git a/lib/items-tech/table/top/item-excel-template.tsx b/lib/items-tech/table/top/item-excel-template.tsx index f0e10d82..f547d617 100644 --- a/lib/items-tech/table/top/item-excel-template.tsx +++ b/lib/items-tech/table/top/item-excel-template.tsx @@ -18,10 +18,10 @@ export async function exportTopItemTemplate() { // 컬럼 헤더 정의 및 스타일 적용 worksheet.columns = [ - { header: '아이템 코드', key: 'itemCode', width: 15 }, + { header: '자재 그룹', key: 'itemCode', width: 15 }, { header: '기능(공종)', key: 'workType', width: 15 }, - { header: '아이템 리스트', key: 'itemList', width: 20 }, - { header: '서브 아이템 리스트', key: 'subItemList', width: 20 }, + { header: '자재명', key: 'itemList', width: 20 }, + { header: '자재명(상세)', key: 'subItemList', width: 20 }, ]; diff --git a/lib/items-tech/table/top/offshore-top-table-columns.tsx b/lib/items-tech/table/top/offshore-top-table-columns.tsx index 4746f226..93f27492 100644 --- a/lib/items-tech/table/top/offshore-top-table-columns.tsx +++ b/lib/items-tech/table/top/offshore-top-table-columns.tsx @@ -112,13 +112,13 @@ export function getOffshoreTopColumns({ setRowAction }: GetColumnsProps): Column {
accessorKey: "itemCode",
header: ({ column }) => (
- <DataTableColumnHeaderSimple column={column} title="Material Group" />
+ <DataTableColumnHeaderSimple column={column} title="자재 그룹" />
),
cell: ({ row }) => <div>{row.original.itemCode}</div>,
enableSorting: true,
enableHiding: true,
meta: {
- excelHeader: "Material Group",
+ excelHeader: "자재 그룹",
},
},
{
@@ -136,25 +136,25 @@ export function getOffshoreTopColumns({ setRowAction }: GetColumnsProps): Column {
accessorKey: "itemList",
header: ({ column }) => (
- <DataTableColumnHeaderSimple column={column} title="아이템 리스트" />
+ <DataTableColumnHeaderSimple column={column} title="자재명" />
),
cell: ({ row }) => <div>{row.original.itemList || "-"}</div>,
enableSorting: true,
enableHiding: true,
meta: {
- excelHeader: "아이템 리스트",
+ excelHeader: "자재명",
},
},
{
accessorKey: "subItemList",
header: ({ column }) => (
- <DataTableColumnHeaderSimple column={column} title="서브 아이템 리스트" />
+ <DataTableColumnHeaderSimple column={column} title="자재명(상세)" />
),
cell: ({ row }) => <div>{row.original.subItemList || "-"}</div>,
enableSorting: true,
enableHiding: true,
meta: {
- excelHeader: "서브 아이템 리스트",
+ excelHeader: "자재명(상세)",
},
},
{
|
