From 995d20bdf354ef1720bc3ebc09b7dec083c02fdb Mon Sep 17 00:00:00 2001
From: ValdiANS
Date: Mon, 2 Feb 2026 10:54:34 +0700
Subject: [PATCH 1/2] 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' && (
-
+
+
+
)}
),
From 7ac92ff451e93670cbdbb549cb98acc8c419080e Mon Sep 17 00:00:00 2001
From: ValdiANS
Date: Mon, 2 Feb 2026 10:59:44 +0700
Subject: [PATCH 2/2] chore: implement permission guard for approve/reject
button
---
.../detail/DetailDailyChecklistContent.tsx | 41 ++++++++++---------
1 file changed, 22 insertions(+), 19 deletions(-)
diff --git a/src/figma-make/components/pages/list-daily-checklist/detail/DetailDailyChecklistContent.tsx b/src/figma-make/components/pages/list-daily-checklist/detail/DetailDailyChecklistContent.tsx
index d8723df0..bc9653d4 100644
--- a/src/figma-make/components/pages/list-daily-checklist/detail/DetailDailyChecklistContent.tsx
+++ b/src/figma-make/components/pages/list-daily-checklist/detail/DetailDailyChecklistContent.tsx
@@ -23,6 +23,7 @@ import { isResponseError } from '@/lib/api-helper';
import Link from 'next/link';
import { Icon } from '@iconify/react';
import { Document } from '@/types/api/api-general';
+import RequirePermission from '@/components/helper/RequirePermission';
interface ChecklistDetailRow {
checklist_id: string;
@@ -593,25 +594,27 @@ export function DetailDailyChecklistContent() {
{header.status === 'SUBMITTED' && (
-
-
-
-
+
+
+
+
+
+
)}