summaryrefslogtreecommitdiff
path: root/lib/items-tech/table/update-items-sheet.tsx
diff options
context:
space:
mode:
authordujinkim <dujin.kim@dtsolution.co.kr>2025-07-24 11:06:32 +0000
committerdujinkim <dujin.kim@dtsolution.co.kr>2025-07-24 11:06:32 +0000
commit1dc24d48e52f2e490f5603ceb02842586ecae533 (patch)
tree8fca2c5b5b52cc10557b5ba6e55b937ae3c57cf6 /lib/items-tech/table/update-items-sheet.tsx
parented0d6fcc98f671280c2ccde797b50693da88152e (diff)
(대표님) 정기평가 피드백 반영, 설계 피드백 반영, (최겸) 기술영업 피드백 반영
Diffstat (limited to 'lib/items-tech/table/update-items-sheet.tsx')
-rw-r--r--lib/items-tech/table/update-items-sheet.tsx56
1 files changed, 47 insertions, 9 deletions
diff --git a/lib/items-tech/table/update-items-sheet.tsx b/lib/items-tech/table/update-items-sheet.tsx
index 978e83d5..91108ba0 100644
--- a/lib/items-tech/table/update-items-sheet.tsx
+++ b/lib/items-tech/table/update-items-sheet.tsx
@@ -52,6 +52,7 @@ const offshoreTopWorkTypes = [
{ value: "TS", label: "TS" },
{ value: "TE", label: "TE" },
{ value: "TP", label: "TP" },
+ { value: "TA", label: "TA" },
] as const
const offshoreHullWorkTypes = [
@@ -76,7 +77,7 @@ type ShipbuildingItem = {
type OffshoreTopItem = {
id: number
itemCode: string
- workType: "TM" | "TS" | "TE" | "TP"
+ workType: "TM" | "TS" | "TE" | "TP" | "TA"
itemList: string | null
subItemList: string | null
}
@@ -94,6 +95,7 @@ type UpdateItemSchema = {
workType?: string
shipTypes?: string
itemList?: string
+ subItemList?: string
}
interface UpdateItemSheetProps {
@@ -125,11 +127,16 @@ export function UpdateItemSheet({ item, itemType, open, onOpenChange }: UpdateIt
itemList: (item as ShipbuildingItem).itemList || "",
};
case 'offshoreTop':
+ const offshoreTopItem = item as OffshoreTopItem;
+ return {
+ itemList: offshoreTopItem.itemList || "",
+ subItemList: offshoreTopItem.subItemList || ""
+ };
case 'offshoreHull':
- const offshoreItem = item as OffshoreTopItem | OffshoreHullItem;
+ const offshoreHullItem = item as OffshoreHullItem;
return {
- itemList: offshoreItem.itemList || "",
- subItemList: offshoreItem.subItemList || ""
+ itemList: offshoreHullItem.itemList || "",
+ subItemList: offshoreHullItem.subItemList || ""
};
default:
return {};
@@ -224,7 +231,7 @@ export function UpdateItemSheet({ item, itemType, open, onOpenChange }: UpdateIt
<div className="mt-4">
<div className="grid gap-2">
<label className="text-sm font-medium leading-none">
- Material Group (수정 불가)
+ 자재 그룹 (수정 불가)
</label>
<Input value={item.itemCode} disabled readOnly />
</div>
@@ -235,7 +242,7 @@ export function UpdateItemSheet({ item, itemType, open, onOpenChange }: UpdateIt
name="workType"
render={({ field }) => (
<FormItem>
- <FormLabel>기능(공종)</FormLabel>
+ <FormLabel>기능(공종) <span style={{ color: 'red' }}>*</span></FormLabel>
<Select
onValueChange={field.onChange}
defaultValue={field.value}
@@ -266,7 +273,7 @@ export function UpdateItemSheet({ item, itemType, open, onOpenChange }: UpdateIt
name="shipTypes"
render={({ field }) => (
<FormItem>
- <FormLabel>선종</FormLabel>
+ <FormLabel>선종 <span style={{ color: 'red' }}>*</span></FormLabel>
<FormControl>
<Input placeholder="선종을 입력하세요" {...field} />
</FormControl>
@@ -281,14 +288,45 @@ export function UpdateItemSheet({ item, itemType, open, onOpenChange }: UpdateIt
name="itemList"
render={({ field }) => (
<FormItem>
- <FormLabel>아이템 리스트</FormLabel>
+ <FormLabel>자재명</FormLabel>
<FormControl>
- <Input placeholder="아이템 리스트를 입력하세요" {...field} />
+ <Input placeholder="자재명을 입력하세요" {...field} />
</FormControl>
<FormMessage />
</FormItem>
)}
/>
+ {itemType === 'offshoreHull' && (
+ <FormField
+ control={form.control}
+ name="subItemList"
+ render={({ field }) => (
+ <FormItem>
+ <FormLabel>자재명(상세)</FormLabel>
+ <FormControl>
+ <Input placeholder="자재명(상세)을 입력하세요" {...field} />
+ </FormControl>
+ <FormMessage />
+ </FormItem>
+ )}
+ />
+ )}
+ {itemType === 'offshoreTop' && (
+ <FormField
+ control={form.control}
+ name="subItemList"
+ render={({ field }) => (
+ <FormItem>
+ <FormLabel>자재명(상세)</FormLabel>
+ <FormControl>
+ <Input placeholder="자재명(상세)을 입력하세요" {...field} />
+ </FormControl>
+ <FormMessage />
+ </FormItem>
+ )}
+ />
+ )}
+
<SheetFooter>
<SheetClose asChild>
<Button variant="outline">취소</Button>