From 0704d236bbcc1339c9d93ee8fc678c6a0e425841 Mon Sep 17 00:00:00 2001 From: dujinkim Date: Fri, 9 May 2025 01:39:02 +0000 Subject: 0509 기술영업 조선 아이템 매트릭스 수정(type수정) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/items-ship/table/Items-ship-table.tsx | 3 ++- lib/items-ship/table/add-items-dialog.tsx | 22 +++++++--------------- lib/items-ship/table/delete-items-dialog.tsx | 19 ++----------------- lib/items-ship/table/items-ship-table-columns.tsx | 2 +- .../table/items-table-toolbar-actions.tsx | 2 +- lib/items-ship/table/update-items-sheet.tsx | 6 +++--- lib/items-ship/validations.ts | 4 ++-- 7 files changed, 18 insertions(+), 40 deletions(-) (limited to 'lib/items-ship') diff --git a/lib/items-ship/table/Items-ship-table.tsx b/lib/items-ship/table/Items-ship-table.tsx index 486c1481..6fec9ac0 100644 --- a/lib/items-ship/table/Items-ship-table.tsx +++ b/lib/items-ship/table/Items-ship-table.tsx @@ -14,6 +14,7 @@ import { getShipbuildingItems } from "../service" import { getShipbuildingColumns } from "./items-ship-table-columns" import { ItemsTableToolbarActions } from "./items-table-toolbar-actions" import { DeleteItemsDialog } from "./delete-items-dialog" +import { UpdateItemSheet } from "./update-items-sheet" // 서비스에서 반환하는 데이터 타입 정의 type ShipbuildingItem = { @@ -21,7 +22,7 @@ type ShipbuildingItem = { itemId: number; workType: "기장" | "전장" | "선실" | "배관" | "철의"; shipTypes: string; - itemCode: string | null; + itemCode: string; itemName: string; description: string | null; createdAt: Date; diff --git a/lib/items-ship/table/add-items-dialog.tsx b/lib/items-ship/table/add-items-dialog.tsx index 4abf5f8a..fdfe54cc 100644 --- a/lib/items-ship/table/add-items-dialog.tsx +++ b/lib/items-ship/table/add-items-dialog.tsx @@ -24,7 +24,6 @@ import { } from "../validations" import { createShipbuildingItem } from "../service" -import { ItemType } from "./excel/item-excel-template" import { Plus } from "lucide-react" import { toast } from "sonner" import { @@ -35,11 +34,6 @@ import { SelectValue, } from "@/components/ui/select" - -interface AddItemDialogProps { - itemType?: ItemType -} - const workTypes = [ { value: "기장", label: "기장" }, { value: "전장", label: "전장" }, @@ -48,7 +42,7 @@ const workTypes = [ { value: "철의", label: "철의" }, ] as const -export function AddItemDialog({ itemType = 'shipbuilding' }: AddItemDialogProps) { +export function AddItemDialog() { const [open, setOpen] = React.useState(false) const [isSubmitting, setIsSubmitting] = React.useState(false) @@ -127,7 +121,7 @@ export function AddItemDialog({ itemType = 'shipbuilding' }: AddItemDialogProps) 아이템 코드 - + @@ -172,7 +166,7 @@ export function AddItemDialog({ itemType = 'shipbuilding' }: AddItemDialogProps) > - + @@ -190,10 +184,9 @@ export function AddItemDialog({ itemType = 'shipbuilding' }: AddItemDialogProps) /> {/* 조선 아이템인 경우 선종 필드 표시 */} - {itemType === 'shipbuilding' && ( - ( 선종 @@ -203,8 +196,7 @@ export function AddItemDialog({ itemType = 'shipbuilding' }: AddItemDialogProps) )} - /> - )} + />