diff --git a/src/front/Components/Layouts/Users/UserInformations/index.tsx b/src/front/Components/Layouts/Users/UserInformations/index.tsx index f38761f9..08c59981 100644 --- a/src/front/Components/Layouts/Users/UserInformations/index.tsx +++ b/src/front/Components/Layouts/Users/UserInformations/index.tsx @@ -1,5 +1,5 @@ import WarningIcon from "@Assets/images/warning.png"; -import OfficeRoles from "@Front/Api/LeCoffreApi/Admin/OfficeRoles/OfficeRoles"; +//import OfficeRoles from "@Front/Api/LeCoffreApi/Admin/OfficeRoles/OfficeRoles"; import Roles from "@Front/Api/LeCoffreApi/Admin/Roles/Roles"; import LiveVotes from "@Front/Api/LeCoffreApi/SuperAdmin/LiveVotes/LiveVotes"; import Users from "@Front/Api/LeCoffreApi/SuperAdmin/Users/Users"; @@ -69,9 +69,11 @@ export default function UserInformations(props: IProps) { }, }); if (!user) return; - const roles = await OfficeRoles.getInstance().get(); + const roles = await Roles.getInstance().get({ + where: {NOT: {OR:[{name: "super-admin"}, {name: "admin"}]}}, + }); if (!roles) return; - setAvailableRoles(roles.map((role) => ({ value: role.uid, label: role.name }))); + setAvailableRoles(roles.map((role) => ({ value: role.uid, label: role.label }))); setUserSelected(user); }, [userUid]);