From bda66381b833e3406dc9a49e91e7ad9769a15e56 Mon Sep 17 00:00:00 2001 From: ValdiANS Date: Wed, 22 Apr 2026 09:38:56 +0700 Subject: [PATCH] fix: remove conditional rendering for delete button --- .../ListDailyChecklistContent.tsx | 35 ++++++++----------- 1 file changed, 14 insertions(+), 21 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 7c4befee..b8e81fa9 100644 --- a/src/figma-make/components/pages/list-daily-checklist/ListDailyChecklistContent.tsx +++ b/src/figma-make/components/pages/list-daily-checklist/ListDailyChecklistContent.tsx @@ -88,6 +88,9 @@ export function ListDailyChecklistContent() { date_from: 'date_from', date_to: 'date_to', }, + + persist: true, + storeName: 'list-daily-checklist-content-table', }); const { @@ -183,14 +186,6 @@ export function ListDailyChecklistContent() { }; const handleDelete = (item: DailyChecklist) => { - // ✅ VALIDATION: Only DRAFT can be deleted - if (item.status !== 'DRAFT') { - toast.error('Hanya checklist dengan status DRAFT yang bisa dihapus', { - description: `Status saat ini: ${item.status}`, - }); - return; - } - setSelectedItem(item); setShowDeleteModal(true); }; @@ -554,19 +549,17 @@ export function ListDailyChecklistContent() { )} - {row.original.status === 'DRAFT' && ( - - - - )} + + + ), },