added clearSelection after disable user
This commit is contained in:
parent
1a412eb31a
commit
2c2d4001e7
@ -13,6 +13,7 @@ const DisableUserDialog = ({
|
||||
isLoading,
|
||||
fetchData,
|
||||
updateUserStatus,
|
||||
clearSelection,
|
||||
}) => {
|
||||
const onlyOneUser = userIds.length === 1;
|
||||
|
||||
@ -30,10 +31,16 @@ const DisableUserDialog = ({
|
||||
bodyText = bodyText + t("ChangeUserStatusDialog:DisableGeneralDescription");
|
||||
|
||||
const onClickDisableUser = async () => {
|
||||
await updateUserStatus(EmployeeStatus.Disabled, userIds);
|
||||
toastr.success(t("PeopleTranslations:SuccessChangeUserStatus"));
|
||||
await fetchData();
|
||||
onClose();
|
||||
try {
|
||||
await updateUserStatus(EmployeeStatus.Disabled, userIds);
|
||||
toastr.success(t("PeopleTranslations:SuccessChangeUserStatus"));
|
||||
await fetchData();
|
||||
} catch (error) {
|
||||
toastr.error(error);
|
||||
} finally {
|
||||
clearSelection();
|
||||
onClose();
|
||||
}
|
||||
};
|
||||
|
||||
return (
|
||||
|
@ -161,6 +161,7 @@ const Sessions = ({
|
||||
fetchData={fetchData}
|
||||
userIds={userIds}
|
||||
updateUserStatus={updateUserStatus}
|
||||
clearSelection={clearSelection}
|
||||
/>
|
||||
)}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user