summaryrefslogtreecommitdiff
path: root/lib/vendor-investigation
diff options
context:
space:
mode:
Diffstat (limited to 'lib/vendor-investigation')
-rw-r--r--lib/vendor-investigation/table/investigation-table-columns.tsx7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/vendor-investigation/table/investigation-table-columns.tsx b/lib/vendor-investigation/table/investigation-table-columns.tsx
index a6c1574d..b5344a1e 100644
--- a/lib/vendor-investigation/table/investigation-table-columns.tsx
+++ b/lib/vendor-investigation/table/investigation-table-columns.tsx
@@ -84,13 +84,18 @@ export function getColumns({
id: "actions",
enableHiding: false,
cell: ({ row }) => {
+ const isCanceled = row.original.investigationStatus === "CANCELED"
+ const isCompleted = row.original.investigationStatus === "COMPLETED"
return (
<Button
variant="ghost"
className="flex size-8 p-0 data-[state=open]:bg-muted"
aria-label="실사 정보 수정"
+ disabled={isCanceled}
onClick={() => {
- setRowAction?.({ type: "update", row })
+ if (!isCanceled || !isCompleted) {
+ setRowAction?.({ type: "update", row })
+ }
}}
>
<Edit className="size-4" aria-hidden="true" />