mirror of
https://gitlab.com/mbugroup/lti-web-client.git
synced 2026-05-20 13:32:00 +00:00
Merge branch 'fix/purchasing' into 'development'
[FIX/FE] Purchasing See merge request mbugroup/lti-web-client!457
This commit is contained in:
@@ -409,10 +409,17 @@ const PurchaseTable = () => {
|
|||||||
setIsDeleteLoading(true);
|
setIsDeleteLoading(true);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
await PurchaseApi.delete(selectedPurchase?.id as number);
|
const deleteResponse = await PurchaseApi.delete(
|
||||||
refreshPurchaseRequests();
|
selectedPurchase?.id as number
|
||||||
deleteModal.closeModal();
|
);
|
||||||
toast.success('Berhasil menghapus data permintaan pembelian!');
|
|
||||||
|
if (isResponseSuccess(deleteResponse)) {
|
||||||
|
refreshPurchaseRequests();
|
||||||
|
deleteModal.closeModal();
|
||||||
|
toast.success('Berhasil menghapus data permintaan pembelian!');
|
||||||
|
} else {
|
||||||
|
toast.error(deleteResponse?.message ?? 'Gagal menghapus data!');
|
||||||
|
}
|
||||||
} catch {
|
} catch {
|
||||||
toast.error('Gagal menghapus data permintaan pembelian!');
|
toast.error('Gagal menghapus data permintaan pembelian!');
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user