mirror of
https://gitlab.com/mbugroup/lti-web-client.git
synced 2026-05-25 07:45:47 +00:00
fix(FE): fix delete reseponse project flock
This commit is contained in:
@@ -228,11 +228,18 @@ const ProjectFlockTable = ({ refresh }: { refresh?: () => void }) => {
|
|||||||
const confirmationModalDeleteClickHandler = async () => {
|
const confirmationModalDeleteClickHandler = async () => {
|
||||||
setIsDeleteLoading(true);
|
setIsDeleteLoading(true);
|
||||||
|
|
||||||
await ProjectFlockApi.delete(selectedSingleRow?.id as number);
|
const response = await ProjectFlockApi.delete(
|
||||||
|
selectedSingleRow?.id as number
|
||||||
|
);
|
||||||
|
if (isResponseSuccess(response)) {
|
||||||
|
toast.success(response?.message as string);
|
||||||
|
}
|
||||||
|
if (isResponseError(response)) {
|
||||||
|
toast.error(response?.message as string);
|
||||||
|
}
|
||||||
refreshProjectFlocks();
|
refreshProjectFlocks();
|
||||||
|
|
||||||
deleteModal.closeModal();
|
deleteModal.closeModal();
|
||||||
toast.success('Successfully delete Project Flock!');
|
|
||||||
setIsDeleteLoading(false);
|
setIsDeleteLoading(false);
|
||||||
setRowSelection({});
|
setRowSelection({});
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user