From 1c1c1019b6af72771358d387a2ae70ca965cd9f9 Mon Sep 17 00:00:00 2001 From: dujinkim Date: Mon, 26 May 2025 04:25:47 +0000 Subject: (김준회) 아이템 리스트를 자재그룹으로 변경하고 PLM 인터페이스 처리 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/items/table/update-item-sheet.tsx | 199 ++++++++++++++++++++++++++++++++-- 1 file changed, 187 insertions(+), 12 deletions(-) (limited to 'lib/items/table/update-item-sheet.tsx') diff --git a/lib/items/table/update-item-sheet.tsx b/lib/items/table/update-item-sheet.tsx index 4bcdbfcb..fcdc0a70 100644 --- a/lib/items/table/update-item-sheet.tsx +++ b/lib/items/table/update-item-sheet.tsx @@ -1,7 +1,6 @@ "use client" import * as React from "react" -import { tasks, type Task } from "@/db/schema/tasks" import { zodResolver } from "@hookform/resolvers/zod" import { Loader } from "lucide-react" import { useForm } from "react-hook-form" @@ -19,7 +18,6 @@ import { import { Select, SelectContent, - SelectGroup, SelectItem, SelectTrigger, SelectValue, @@ -35,8 +33,6 @@ import { } from "@/components/ui/sheet" import { Textarea } from "@/components/ui/textarea" -import { modifiTask } from "@/lib//tasks/service" -import { updateTaskSchema, type UpdateTaskSchema } from "@/lib/tasks/validations" import { Item } from "@/db/schema/items" import { updateItemSchema, UpdateItemSchema } from "../validations" import { modifyItem } from "../service" @@ -57,7 +53,14 @@ export function UpdateItemSheet({ item, ...props }: UpdateItemSheetProps) { itemCode: item?.itemCode ?? "", itemName: item?.itemName ?? "", description: item?.description ?? "", - + parentItemCode: item?.parentItemCode ?? "", + itemLevel: item?.itemLevel ?? null, + deleteFlag: item?.deleteFlag ?? "", + unitOfMeasure: item?.unitOfMeasure ?? "", + steelType: item?.steelType ?? "", + gradeMaterial: item?.gradeMaterial ?? "", + changeDate: item?.changeDate ?? "", + baseUnitOfMeasure: item?.baseUnitOfMeasure ?? "", }, }) @@ -68,6 +71,14 @@ export function UpdateItemSheet({ item, ...props }: UpdateItemSheetProps) { itemCode: item.itemCode ?? "", itemName: item.itemName ?? "", description: item.description ?? "", + parentItemCode: item.parentItemCode ?? "", + itemLevel: item.itemLevel ?? null, + deleteFlag: item.deleteFlag ?? "", + unitOfMeasure: item.unitOfMeasure ?? "", + steelType: item.steelType ?? "", + gradeMaterial: item.gradeMaterial ?? "", + changeDate: item.changeDate ?? "", + baseUnitOfMeasure: item.baseUnitOfMeasure ?? "", }); } }, [item, form]); @@ -111,10 +122,9 @@ export function UpdateItemSheet({ item, ...props }: UpdateItemSheetProps) { name="itemCode" render={({ field }) => ( - Item Code + 자재그룹코드 - - + @@ -125,10 +135,10 @@ export function UpdateItemSheet({ item, ...props }: UpdateItemSheetProps) { name="itemName" render={({ field }) => ( - Item Name + 자재그룹명 @@ -142,10 +152,10 @@ export function UpdateItemSheet({ item, ...props }: UpdateItemSheetProps) { name="description" render={({ field }) => ( - Description + 상세