mirror of
https://git.v0id.ovh/n3wt-innov/n3wt-school.git
synced 2026-01-29 07:53:23 +00:00
fix: Correction du Establishment context au refresh
This commit is contained in:
@ -17,11 +17,11 @@ const ProfileSelector = ({ onRoleChange, className = '' }) => {
|
||||
|
||||
const handleRoleChange = (roleId) => {
|
||||
// Pas bon quand on a plusieur role pour le même établissement
|
||||
setSelectedRoleId(roleId);
|
||||
const role = user.roles[roleId].role_type;
|
||||
setProfileRole(role);
|
||||
const establishmentId = user.roles[roleId].establishment__id;
|
||||
setProfileRole(role);
|
||||
setSelectedEstablishmentId(establishmentId);
|
||||
setSelectedRoleId(roleId);
|
||||
if (onRoleChange) {
|
||||
onRoleChange(roleId);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user