diff --git a/src/front/Components/Layouts/Users/UserInformations/index.tsx b/src/front/Components/Layouts/Users/UserInformations/index.tsx index b55e45d5..f93d0fcb 100644 --- a/src/front/Components/Layouts/Users/UserInformations/index.tsx +++ b/src/front/Components/Layouts/Users/UserInformations/index.tsx @@ -173,9 +173,15 @@ export default function UserInformations(props: IProps) { const liveVote = await LiveVotes.getInstance().post(vote); if (liveVote.appointment.votes?.length === 3) { - Toasts.getInstance().open({ - title: `Le titre de super-administrateur a été attribué à ${userSelected.contact?.first_name} ${userSelected.contact?.last_name} `, - }); + if(superAdminModalType === "add") { + 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(); setIsSuperAdminModalOpened(false);