fix super-admin toast

This commit is contained in:
OxSaitama 2023-10-23 12:46:29 +02:00
parent d1f5f2e513
commit db7e77ea8a

View File

@ -173,9 +173,15 @@ export default function UserInformations(props: IProps) {
const liveVote = await LiveVotes.getInstance().post(vote); const liveVote = await LiveVotes.getInstance().post(vote);
if (liveVote.appointment.votes?.length === 3) { if (liveVote.appointment.votes?.length === 3) {
Toasts.getInstance().open({ if(superAdminModalType === "add") {
title: `Le titre de super-administrateur a été attribué à ${userSelected.contact?.first_name} ${userSelected.contact?.last_name} `, Toasts.getInstance().open({
}); title: `Le titre de super-administrateur a été attribué à ${userSelected.contact?.first_name} ${userSelected.contact?.last_name} `,
});
} else {
Toasts.getInstance().open({
title: `Le titre de super-administrateur a été retiré à ${userSelected.contact?.first_name} ${userSelected.contact?.last_name} `,
});
}
} }
await getUser(); await getUser();
setIsSuperAdminModalOpened(false); setIsSuperAdminModalOpened(false);