mirror of
https://gitlab.com/mbugroup/lti-web-client.git
synced 2026-05-20 13:32:00 +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 () => {
|
||||
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();
|
||||
|
||||
deleteModal.closeModal();
|
||||
toast.success('Successfully delete Project Flock!');
|
||||
setIsDeleteLoading(false);
|
||||
setRowSelection({});
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user