From 995d20bdf354ef1720bc3ebc09b7dec083c02fdb Mon Sep 17 00:00:00 2001 From: ValdiANS Date: Mon, 2 Feb 2026 10:54:34 +0700 Subject: [PATCH] chore: implement permission guard for edit, approve/reject, and delete button --- .../ListDailyChecklistContent.tsx | 45 ++++++++++--------- 1 file changed, 25 insertions(+), 20 deletions(-) diff --git a/src/figma-make/components/pages/list-daily-checklist/ListDailyChecklistContent.tsx b/src/figma-make/components/pages/list-daily-checklist/ListDailyChecklistContent.tsx index f54ad41f..634d8716 100644 --- a/src/figma-make/components/pages/list-daily-checklist/ListDailyChecklistContent.tsx +++ b/src/figma-make/components/pages/list-daily-checklist/ListDailyChecklistContent.tsx @@ -36,6 +36,7 @@ import { ColumnDef } from '@tanstack/react-table'; import { useSelect } from '@/components/input/SelectInput'; import { KandangApi } from '@/services/api/master-data'; import DebouncedTextInput from '@/components/input/DebouncedTextInput'; +import RequirePermission from '@/components/helper/RequirePermission'; interface Kandang { id: string; @@ -389,19 +390,21 @@ export function ListDailyChecklistContent() { {row.original.status === 'DRAFT' && ( - + + + )} {row.original.status === 'SUBMITTED' && ( - <> + - + )} {row.original.status === 'DRAFT' && ( - + + + )} ),