diff --git a/src/components/dashboard/commercial-chief/Form/ConfirmForm/ConfirmContent.jsx b/src/components/dashboard/commercial-chief/Form/ConfirmForm/ConfirmContent.jsx index b424d8e..05de17e 100644 --- a/src/components/dashboard/commercial-chief/Form/ConfirmForm/ConfirmContent.jsx +++ b/src/components/dashboard/commercial-chief/Form/ConfirmForm/ConfirmContent.jsx @@ -30,6 +30,7 @@ const ConfirmContent = ({rowId, mutate, setOpenConfirmDialog}) => { requestServer(`${CONFIRM_COMMERCIAL_CHIEF}/${rowId}`, 'post', { data: formData, }).then((response) => { + setOpenConfirmDialog(false) update_notification() mutate() }).catch(() => { diff --git a/src/components/dashboard/commercial-chief/Form/RejectForm/RejectContent.jsx b/src/components/dashboard/commercial-chief/Form/RejectForm/RejectContent.jsx index 70dceab..7f065ee 100644 --- a/src/components/dashboard/commercial-chief/Form/RejectForm/RejectContent.jsx +++ b/src/components/dashboard/commercial-chief/Form/RejectForm/RejectContent.jsx @@ -35,6 +35,7 @@ const RejectContent = ({rowId, mutate, setOpenRejectDialog}) => { requestServer(`${REJECT_COMMERCIAL_CHIEF}/${rowId}`, 'post', { data: formData, }).then((response) => { + setOpenRejectDialog(false) mutate() update_notification() }).catch(() => { diff --git a/src/components/dashboard/development-assistant/Form/ConfirmForm/ConfirmContent.jsx b/src/components/dashboard/development-assistant/Form/ConfirmForm/ConfirmContent.jsx index 75038ad..747a43a 100644 --- a/src/components/dashboard/development-assistant/Form/ConfirmForm/ConfirmContent.jsx +++ b/src/components/dashboard/development-assistant/Form/ConfirmForm/ConfirmContent.jsx @@ -30,6 +30,7 @@ const ConfirmContent = ({rowId, mutate, setOpenConfirmDialog}) => { requestServer(`${CONFIRM_DEVELOPMENT_ASSISTANT}/${rowId}`, 'post', { data: formData, }).then((response) => { + setOpenConfirmDialog(false) mutate() update_notification() }).catch(() => { diff --git a/src/components/dashboard/development-assistant/Form/RejectForm/RejectContent.jsx b/src/components/dashboard/development-assistant/Form/RejectForm/RejectContent.jsx index f89a8f5..b45da82 100644 --- a/src/components/dashboard/development-assistant/Form/RejectForm/RejectContent.jsx +++ b/src/components/dashboard/development-assistant/Form/RejectForm/RejectContent.jsx @@ -35,6 +35,7 @@ const RejectContent = ({rowId, mutate, setOpenRejectDialog}) => { requestServer(`${REJECT_DEVELOPMENT_ASSISTANT}/${rowId}`, 'post', { data: formData, }).then((response) => { + setOpenRejectDialog(false) mutate() update_notification() }).catch(() => { diff --git a/src/components/dashboard/expert-management/Form/ChangePassword/ChangePasswordContent.jsx b/src/components/dashboard/expert-management/Form/ChangePassword/ChangePasswordContent.jsx index 3719b8a..9a8cf1d 100644 --- a/src/components/dashboard/expert-management/Form/ChangePassword/ChangePasswordContent.jsx +++ b/src/components/dashboard/expert-management/Form/ChangePassword/ChangePasswordContent.jsx @@ -40,6 +40,7 @@ const ChnagePasswordContent = ({rowId, mutate, setOpenChangePasswordDialog}) => data: formData }) .then((response) => { + setOpenChangePasswordDialog(false) mutate() }).catch(() => { }).finally(() => { diff --git a/src/components/dashboard/expert-management/Form/CreateForm/CreateContent.jsx b/src/components/dashboard/expert-management/Form/CreateForm/CreateContent.jsx index 990421d..c50fe30 100644 --- a/src/components/dashboard/expert-management/Form/CreateForm/CreateContent.jsx +++ b/src/components/dashboard/expert-management/Form/CreateForm/CreateContent.jsx @@ -105,8 +105,8 @@ const CreateContent = ({setOpenCreateDialog, mutate}) => { requestServer(`${CREATE_EXPERT_MANAGEMENT}`, 'post', {auth: true, data: formData}) .then((response) => { - mutate() setOpenCreateDialog(false) + mutate() }).catch(() => { }).finally(() => { setSubmitting(false); diff --git a/src/components/dashboard/expert-management/Form/UpdateForm/UpdateContent.jsx b/src/components/dashboard/expert-management/Form/UpdateForm/UpdateContent.jsx index 5725d43..3c5e0ed 100644 --- a/src/components/dashboard/expert-management/Form/UpdateForm/UpdateContent.jsx +++ b/src/components/dashboard/expert-management/Form/UpdateForm/UpdateContent.jsx @@ -89,6 +89,7 @@ const UpdateContent = ({row, mutate, setOpenUpdateDialog}) => { requestServer(`${UPDATE_EXPERT_MANAGEMENT}/${row.original.id}`, 'post', {auth: true, data: formData}) .then((response) => { + setOpenUpdateDialog(false); mutate() }).catch(() => { }).finally(() => { diff --git a/src/components/dashboard/inspector-expert/Form/ConfirmForm/ConfirmContent.jsx b/src/components/dashboard/inspector-expert/Form/ConfirmForm/ConfirmContent.jsx index b284b6b..6fca794 100644 --- a/src/components/dashboard/inspector-expert/Form/ConfirmForm/ConfirmContent.jsx +++ b/src/components/dashboard/inspector-expert/Form/ConfirmForm/ConfirmContent.jsx @@ -30,6 +30,7 @@ const ConfirmContent = ({rowId, mutate, setOpenConfirmDialog}) => { requestServer(`${CONFIRM_INSPECTOR_EXPERT}/${rowId}`, 'post', { data: formData, }).then((response) => { + setOpenConfirmDialog(false) mutate() update_notification() }).catch(() => { diff --git a/src/components/dashboard/inspector-expert/Form/RejectForm/RejectContent.jsx b/src/components/dashboard/inspector-expert/Form/RejectForm/RejectContent.jsx index cf535a1..340a757 100644 --- a/src/components/dashboard/inspector-expert/Form/RejectForm/RejectContent.jsx +++ b/src/components/dashboard/inspector-expert/Form/RejectForm/RejectContent.jsx @@ -35,6 +35,7 @@ const RejectContent = ({rowId, mutate, setOpenRejectDialog}) => { requestServer(`${REJECT_INSPECTOR_EXPERT}/${rowId}`, 'post', { data: formData, }).then((response) => { + setOpenRejectDialog(false) mutate() update_notification() }).catch(() => { diff --git a/src/components/dashboard/inspector-expert/Form/ReviseForm/ReviseContent.jsx b/src/components/dashboard/inspector-expert/Form/ReviseForm/ReviseContent.jsx index 90432bc..b0c42ee 100644 --- a/src/components/dashboard/inspector-expert/Form/ReviseForm/ReviseContent.jsx +++ b/src/components/dashboard/inspector-expert/Form/ReviseForm/ReviseContent.jsx @@ -27,6 +27,7 @@ const ReviseContent = ({rowId, mutate, setOpenReviseDialog}) => { requestServer(`${REVISE_INSPECTOR_EXPERT}/${rowId}`, 'post', { data: formData, }).then((response) => { + setOpenReviseDialog(false) mutate() update_notification() }).catch(() => { diff --git a/src/components/dashboard/machinary-office/Form/ConfirmForm/ConfirmContent.jsx b/src/components/dashboard/machinary-office/Form/ConfirmForm/ConfirmContent.jsx index 31c4201..261c083 100644 --- a/src/components/dashboard/machinary-office/Form/ConfirmForm/ConfirmContent.jsx +++ b/src/components/dashboard/machinary-office/Form/ConfirmForm/ConfirmContent.jsx @@ -43,6 +43,7 @@ const ConfirmContent = ({rowId, mutate, setOpenConfirmDialog}) => { requestServer(`${CONFIRM_MACHINARY_OFFICE}/${rowId}`, 'post', { data: formData, }).then((response) => { + setOpenConfirmDialog(false) mutate() update_notification() }).catch(() => { diff --git a/src/components/dashboard/machinary-office/Form/RejectForm/RejectContent.jsx b/src/components/dashboard/machinary-office/Form/RejectForm/RejectContent.jsx index cf535a1..340a757 100644 --- a/src/components/dashboard/machinary-office/Form/RejectForm/RejectContent.jsx +++ b/src/components/dashboard/machinary-office/Form/RejectForm/RejectContent.jsx @@ -35,6 +35,7 @@ const RejectContent = ({rowId, mutate, setOpenRejectDialog}) => { requestServer(`${REJECT_INSPECTOR_EXPERT}/${rowId}`, 'post', { data: formData, }).then((response) => { + setOpenRejectDialog(false) mutate() update_notification() }).catch(() => { diff --git a/src/components/dashboard/navgan-loan-management/Form/UpdateForm/UpdateContent.jsx b/src/components/dashboard/navgan-loan-management/Form/UpdateForm/UpdateContent.jsx index b9bff45..540a7c8 100644 --- a/src/components/dashboard/navgan-loan-management/Form/UpdateForm/UpdateContent.jsx +++ b/src/components/dashboard/navgan-loan-management/Form/UpdateForm/UpdateContent.jsx @@ -43,6 +43,7 @@ const UpdateContent = ({rowId, mutate, setOpenConfirmDialog}) => { requestServer(`${UPDATE_LOAN_MANAGEMENT_NAVGAN}/${rowId}`, 'post', { data: formData, }).then((response) => { + setOpenConfirmDialog(false) mutate() update_notification() }).catch(() => { diff --git a/src/components/dashboard/navgan-province-manager/Form/ConfirmForm/ConfirmContent.jsx b/src/components/dashboard/navgan-province-manager/Form/ConfirmForm/ConfirmContent.jsx index d9460d5..5de9eb3 100644 --- a/src/components/dashboard/navgan-province-manager/Form/ConfirmForm/ConfirmContent.jsx +++ b/src/components/dashboard/navgan-province-manager/Form/ConfirmForm/ConfirmContent.jsx @@ -30,6 +30,7 @@ const ConfirmContent = ({rowId, mutate, setOpenConfirmDialog}) => { requestServer(`${CONFIRM_NAVGAN_PROVINCE_MANAGER}/${rowId}`, 'post', { data: formData, }).then((response) => { + setOpenConfirmDialog(false) mutate() update_notification() }).catch(() => { diff --git a/src/components/dashboard/navgan-province-manager/Form/RejectForm/RejectContent.jsx b/src/components/dashboard/navgan-province-manager/Form/RejectForm/RejectContent.jsx index 298d02b..2502898 100644 --- a/src/components/dashboard/navgan-province-manager/Form/RejectForm/RejectContent.jsx +++ b/src/components/dashboard/navgan-province-manager/Form/RejectForm/RejectContent.jsx @@ -35,6 +35,7 @@ const RejectContent = ({rowId, mutate, setOpenRejectDialog}) => { requestServer(`${REJECT_NAVGAN_PROVINCE_MANAGER}/${rowId}`, 'post', { data: formData, }).then((response) => { + setOpenRejectDialog(false) mutate() update_notification() }).catch(() => { diff --git a/src/components/dashboard/passenger-boss/Form/ConfirmForm/ConfirmContent.jsx b/src/components/dashboard/passenger-boss/Form/ConfirmForm/ConfirmContent.jsx index 4fadae8..66ccd27 100644 --- a/src/components/dashboard/passenger-boss/Form/ConfirmForm/ConfirmContent.jsx +++ b/src/components/dashboard/passenger-boss/Form/ConfirmForm/ConfirmContent.jsx @@ -43,6 +43,7 @@ const ConfirmContent = ({rowId, mutate, setOpenConfirmDialog}) => { requestServer(`${CONFIRM_PASSENGER_BOSS}/${rowId}`, 'post', { data: formData, }).then((response) => { + setOpenConfirmDialog(false) mutate() update_notification() }).catch(() => { diff --git a/src/components/dashboard/passenger-boss/Form/RejectForm/RejectContent.jsx b/src/components/dashboard/passenger-boss/Form/RejectForm/RejectContent.jsx index beb25de..6b6b385 100644 --- a/src/components/dashboard/passenger-boss/Form/RejectForm/RejectContent.jsx +++ b/src/components/dashboard/passenger-boss/Form/RejectForm/RejectContent.jsx @@ -35,6 +35,7 @@ const RejectContent = ({rowId, mutate, setOpenRejectDialog}) => { requestServer(`${REJECT_PASSENGER_BOSS}/${rowId}`, 'post', { data: formData, }).then((response) => { + setOpenRejectDialog(false) mutate() update_notification() }).catch(() => { diff --git a/src/components/dashboard/passenger-office/Form/ConfirmForm/ConfirmContent.jsx b/src/components/dashboard/passenger-office/Form/ConfirmForm/ConfirmContent.jsx index e35de65..46a735f 100644 --- a/src/components/dashboard/passenger-office/Form/ConfirmForm/ConfirmContent.jsx +++ b/src/components/dashboard/passenger-office/Form/ConfirmForm/ConfirmContent.jsx @@ -30,6 +30,7 @@ const ConfirmContent = ({rowId, mutate, setOpenConfirmDialog}) => { requestServer(`${CONFIRM_PASSENGER_OFFICE}/${rowId}`, 'post', { data: formData, }).then((response) => { + setOpenConfirmDialog(false) mutate() update_notification() }).catch(() => { diff --git a/src/components/dashboard/passenger-office/Form/RejectForm/RejectContent.jsx b/src/components/dashboard/passenger-office/Form/RejectForm/RejectContent.jsx index d1f4d2d..fd7ea2c 100644 --- a/src/components/dashboard/passenger-office/Form/RejectForm/RejectContent.jsx +++ b/src/components/dashboard/passenger-office/Form/RejectForm/RejectContent.jsx @@ -35,6 +35,7 @@ const RejectContent = ({rowId, mutate, setOpenRejectDialog}) => { requestServer(`${REJECT_PASSENGER_OFFICE}/${rowId}`, 'post', { data: formData, }).then((response) => { + setOpenRejectDialog(false) mutate() update_notification() }).catch(() => { diff --git a/src/components/dashboard/province-head-expert/Form/ConfirmForm/ConfirmContent.jsx b/src/components/dashboard/province-head-expert/Form/ConfirmForm/ConfirmContent.jsx index 4582da4..f107527 100644 --- a/src/components/dashboard/province-head-expert/Form/ConfirmForm/ConfirmContent.jsx +++ b/src/components/dashboard/province-head-expert/Form/ConfirmForm/ConfirmContent.jsx @@ -30,6 +30,7 @@ const ConfirmContent = ({rowId, mutate, setOpenConfirmDialog}) => { requestServer(`${CONFIRM_PROVINCE_HEAD_EXPERT}/${rowId}`, 'post', { data: formData, }).then((response) => { + setOpenConfirmDialog(false) mutate() update_notification() }).catch(() => { diff --git a/src/components/dashboard/province-head-expert/Form/RejectForm/RejectContent.jsx b/src/components/dashboard/province-head-expert/Form/RejectForm/RejectContent.jsx index 8cb358f..b24ba91 100644 --- a/src/components/dashboard/province-head-expert/Form/RejectForm/RejectContent.jsx +++ b/src/components/dashboard/province-head-expert/Form/RejectForm/RejectContent.jsx @@ -35,6 +35,7 @@ const RejectContent = ({rowId, mutate, setOpenRejectDialog}) => { requestServer(`${REJECT_PROVINCE_HEAD_EXPERT}/${rowId}`, 'post', { data: formData, }).then((response) => { + setOpenRejectDialog(false) mutate() update_notification() }).catch(() => { diff --git a/src/components/dashboard/province-head-expert/Form/ReviseForm/ReviseContent.jsx b/src/components/dashboard/province-head-expert/Form/ReviseForm/ReviseContent.jsx index 0272bc4..056524e 100644 --- a/src/components/dashboard/province-head-expert/Form/ReviseForm/ReviseContent.jsx +++ b/src/components/dashboard/province-head-expert/Form/ReviseForm/ReviseContent.jsx @@ -27,6 +27,7 @@ const ReviseContent = ({rowId, mutate, setOpenReviseDialog}) => { requestServer(`${REVISE_PROVINCE_HEAD_EXPERT}/${rowId}`, 'post', { data: formData, }).then((response) => { + setOpenReviseDialog(false) mutate() update_notification() }).catch(() => { diff --git a/src/components/dashboard/refahi-loan-management/Form/UpdateForm/UpdateContent.jsx b/src/components/dashboard/refahi-loan-management/Form/UpdateForm/UpdateContent.jsx index a388be8..a4db8c3 100644 --- a/src/components/dashboard/refahi-loan-management/Form/UpdateForm/UpdateContent.jsx +++ b/src/components/dashboard/refahi-loan-management/Form/UpdateForm/UpdateContent.jsx @@ -43,6 +43,7 @@ const UpdateContent = ({rowId, mutate, setOpenConfirmDialog}) => { requestServer(`${UPDATE_LOAN_MANAGEMENT_REFAHI}/${rowId}`, 'post', { data: formData, }).then((response) => { + setOpenConfirmDialog(false) mutate() update_notification() }).catch(() => { diff --git a/src/components/dashboard/refahi-province-manager/Form/ConfirmForm/ConfirmContent.jsx b/src/components/dashboard/refahi-province-manager/Form/ConfirmForm/ConfirmContent.jsx index 6e42765..6ce9554 100644 --- a/src/components/dashboard/refahi-province-manager/Form/ConfirmForm/ConfirmContent.jsx +++ b/src/components/dashboard/refahi-province-manager/Form/ConfirmForm/ConfirmContent.jsx @@ -30,6 +30,7 @@ const ConfirmContent = ({rowId, mutate, setOpenConfirmDialog}) => { requestServer(`${CONFIRM_REFAHI_PROVINCE_MANAGER}/${rowId}`, 'post', { data: formData, }).then((response) => { + setOpenConfirmDialog(false) mutate() update_notification() }).catch(() => { diff --git a/src/components/dashboard/refahi-province-manager/Form/RejectForm/RejectContent.jsx b/src/components/dashboard/refahi-province-manager/Form/RejectForm/RejectContent.jsx index 0330996..bbc116f 100644 --- a/src/components/dashboard/refahi-province-manager/Form/RejectForm/RejectContent.jsx +++ b/src/components/dashboard/refahi-province-manager/Form/RejectForm/RejectContent.jsx @@ -35,6 +35,7 @@ const RejectContent = ({rowId, mutate, setOpenRejectDialog}) => { requestServer(`${REJECT_REFAHI_PROVINCE_MANAGER}/${rowId}`, 'post', { data: formData, }).then((response) => { + setOpenRejectDialog(false) mutate() update_notification() }).catch(() => { diff --git a/src/components/dashboard/role-management/Form/UpdateForm/UpdateContent.jsx b/src/components/dashboard/role-management/Form/UpdateForm/UpdateContent.jsx index 5cbfa6b..8e13b12 100644 --- a/src/components/dashboard/role-management/Form/UpdateForm/UpdateContent.jsx +++ b/src/components/dashboard/role-management/Form/UpdateForm/UpdateContent.jsx @@ -47,6 +47,7 @@ const UpdateContent = ({row, mutate, setOpenConfirmDialog}) => { requestServer(`${UPDATE_ROLE_MANAGEMENT}/${row.getValue("id")}`, 'post', { data: formData, }).then((response) => { + setOpenConfirmDialog(false) mutate() update_notification() }).catch(() => { diff --git a/src/components/dashboard/transportation-assistance/Form/ConfirmForm/ConfirmContent.jsx b/src/components/dashboard/transportation-assistance/Form/ConfirmForm/ConfirmContent.jsx index 8cefbcf..dc4d093 100644 --- a/src/components/dashboard/transportation-assistance/Form/ConfirmForm/ConfirmContent.jsx +++ b/src/components/dashboard/transportation-assistance/Form/ConfirmForm/ConfirmContent.jsx @@ -30,6 +30,7 @@ const ConfirmContent = ({rowId, mutate, setOpenConfirmDialog}) => { requestServer(`${CONFIRM_TRANSPORTATION_ASSISTANCE}/${rowId}`, 'post', { data: formData, }).then((response) => { + setOpenConfirmDialog(false) mutate() update_notification() }).catch(() => { diff --git a/src/components/dashboard/transportation-assistance/Form/RejectForm/RejectContent.jsx b/src/components/dashboard/transportation-assistance/Form/RejectForm/RejectContent.jsx index e5227d8..3641f71 100644 --- a/src/components/dashboard/transportation-assistance/Form/RejectForm/RejectContent.jsx +++ b/src/components/dashboard/transportation-assistance/Form/RejectForm/RejectContent.jsx @@ -35,6 +35,7 @@ const RejectContent = ({rowId, mutate, setOpenRejectDialog}) => { requestServer(`${REJECT_TRANSPORTATION_ASSISTANCE}/${rowId}`, 'post', { data: formData, }).then((response) => { + setOpenRejectDialog(false) mutate() update_notification() }).catch(() => { diff --git a/src/components/dashboard/user-management/Form/UpdateForm/UpdateContent.jsx b/src/components/dashboard/user-management/Form/UpdateForm/UpdateContent.jsx index b5fb13d..75f529a 100644 --- a/src/components/dashboard/user-management/Form/UpdateForm/UpdateContent.jsx +++ b/src/components/dashboard/user-management/Form/UpdateForm/UpdateContent.jsx @@ -52,6 +52,7 @@ const UpdateContent = ({row, mutate, setOpenConfirmDialog}) => { requestServer(`${UPDATE_USER_MANAGEMENT}/${row.getValue("id")}`, 'post', { data: formData, }).then((response) => { + setOpenConfirmDialog(false) mutate() update_notification() }).catch(() => {