mirror of
https://gitlab.com/mbugroup/lti-web-client.git
synced 2026-05-20 13:32:00 +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_from: 'date_from',
|
||||||
date_to: 'date_to',
|
date_to: 'date_to',
|
||||||
},
|
},
|
||||||
|
|
||||||
|
persist: true,
|
||||||
|
storeName: 'list-daily-checklist-content-table',
|
||||||
});
|
});
|
||||||
|
|
||||||
const {
|
const {
|
||||||
@@ -183,14 +186,6 @@ export function ListDailyChecklistContent() {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const handleDelete = (item: DailyChecklist) => {
|
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);
|
setSelectedItem(item);
|
||||||
setShowDeleteModal(true);
|
setShowDeleteModal(true);
|
||||||
};
|
};
|
||||||
@@ -554,7 +549,6 @@ export function ListDailyChecklistContent() {
|
|||||||
</RequirePermission>
|
</RequirePermission>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
{row.original.status === 'DRAFT' && (
|
|
||||||
<RequirePermission permissions='lti.daily_checklist.create'>
|
<RequirePermission permissions='lti.daily_checklist.create'>
|
||||||
<Button
|
<Button
|
||||||
size='sm'
|
size='sm'
|
||||||
@@ -566,7 +560,6 @@ export function ListDailyChecklistContent() {
|
|||||||
Hapus
|
Hapus
|
||||||
</Button>
|
</Button>
|
||||||
</RequirePermission>
|
</RequirePermission>
|
||||||
)}
|
|
||||||
</div>
|
</div>
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user