frontend phase 15

This commit is contained in:
hamid
2026-07-10 20:28:06 +03:30
parent bc51cf59b4
commit 70cf00ce4a
151 changed files with 10711 additions and 44 deletions
@@ -17,6 +17,11 @@ export function useSessionRoleSync(): void {
useEffect(() => {
if (!me) return;
dispatch({ type: 'LOG_IN', user: { id: me.id, phone: me.phone, roles: toAppRoles(me.roles) } });
dispatch({
type: 'LOG_IN',
// `roleCodes` preserves the server's fine-grained codes for the f15 admin-capability gate;
// the collapsed `roles` still drive shell chrome.
user: { id: me.id, phone: me.phone, roles: toAppRoles(me.roles), roleCodes: me.roles },
});
}, [me, dispatch]);
}