diff options
Diffstat (limited to 'lib/items-ship/table/delete-items-dialog.tsx')
| -rw-r--r-- | lib/items-ship/table/delete-items-dialog.tsx | 19 |
1 files changed, 2 insertions, 17 deletions
diff --git a/lib/items-ship/table/delete-items-dialog.tsx b/lib/items-ship/table/delete-items-dialog.tsx index 1b847550..53e047fb 100644 --- a/lib/items-ship/table/delete-items-dialog.tsx +++ b/lib/items-ship/table/delete-items-dialog.tsx @@ -30,37 +30,22 @@ import { import { Item } from "@/db/schema/items" import { removeShipbuildingItems } from "../service" -import { ItemType } from "./excel/item-excel-template" interface DeleteItemsDialogProps extends React.ComponentPropsWithoutRef<typeof Dialog> { items: Row<Item>["original"][] - itemType?: ItemType showTrigger?: boolean onSuccess?: () => void } export function DeleteItemsDialog({ items, - itemType = 'shipbuilding', showTrigger = true, onSuccess, ...props }: DeleteItemsDialogProps) { const [isDeletePending, startDeleteTransition] = React.useTransition() const isDesktop = useMediaQuery("(min-width: 640px)") - - // 아이템 타입에 따른 텍스트 설정 - const getItemTypeText = () => { - switch (itemType) { - case 'offshoreTop': - return '해양 Top 아이템'; - case 'offshoreHull': - return '해양 Hull 아이템'; - default: - return '조선 아이템'; - } - }; async function onDelete() { try { @@ -101,7 +86,7 @@ export function DeleteItemsDialog({ <DialogDescription> 이 작업은 되돌릴 수 없습니다. 선택한{" "} <span className="font-medium">{items.length}</span> - 개의 {getItemTypeText()}이(가) 영구적으로 삭제됩니다. + 개의 조선 아이템이(가) 영구적으로 삭제됩니다. </DialogDescription> </DialogHeader> <DialogFooter className="gap-2 sm:space-x-0"> @@ -144,7 +129,7 @@ export function DeleteItemsDialog({ <DrawerDescription> 이 작업은 되돌릴 수 없습니다. 선택한{" "} <span className="font-medium">{items.length}</span> - 개의 {getItemTypeText()}이(가) 영구적으로 삭제됩니다. + 개의 조선 아이템이(가) 영구적으로 삭제됩니다. </DrawerDescription> </DrawerHeader> <DrawerFooter className="gap-2 sm:space-x-0"> |
