mirror of
https://gitlab.com/mbugroup/lti-web-client.git
synced 2026-05-20 05:22:02 +00:00
Merge branch 'fix/daily-checklist' into 'development'
[FIX/FE] Daily Checklist See merge request mbugroup/lti-web-client!415
This commit is contained in:
@@ -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,7 +549,6 @@ export function ListDailyChecklistContent() {
|
||||
</RequirePermission>
|
||||
)}
|
||||
|
||||
{row.original.status === 'DRAFT' && (
|
||||
<RequirePermission permissions='lti.daily_checklist.create'>
|
||||
<Button
|
||||
size='sm'
|
||||
@@ -566,7 +560,6 @@ export function ListDailyChecklistContent() {
|
||||
Hapus
|
||||
</Button>
|
||||
</RequirePermission>
|
||||
)}
|
||||
</div>
|
||||
),
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user