@@ -14,7 +14,7 @@ export function useUserRole(email?: string | null) {
1414 groupRules : [ { groupId : "ca8b6719-431a-498a-ba9f-2c58242b1403" , role : "Jefe de zona" } , { groupId : "937d53c8-536f-4d7c-9047-122480da727c" , role : "Tecnico" } ] ,
1515 } ;
1616
17- const { Usuarios, Graph } = useGraphServices ( ) as { Usuarios : any ; Graph ?: any } ;
17+ const { Usuarios, graph } = useGraphServices ( )
1818 const defaultRole = "Usuario" ;
1919
2020 const [ role , setRole ] = React . useState < string > ( defaultRole ) ;
@@ -31,11 +31,11 @@ export function useUserRole(email?: string | null) {
3131 setLoading ( true ) ; setError ( null ) ;
3232 try {
3333 const decision = await resolveUserRole ( {
34- graph : Graph ,
34+ graph : graph ,
3535 usuariosSvc : Usuarios ,
3636 email : safeEmail ,
3737 defaultRole,
38- ... ( opts . groupRules ? { groupRules : opts . groupRules } : { } ) ,
38+ groupRules : opts . groupRules ,
3939 } ) ;
4040 if ( ! cancel ) { setRole ( decision . role ) ; setSource ( decision . source ) ; }
4141 } catch ( e : any ) {
@@ -45,7 +45,7 @@ export function useUserRole(email?: string | null) {
4545 }
4646 } ) ( ) ;
4747 return ( ) => { cancel = true ; } ;
48- } , [ email , Usuarios , Graph , defaultRole , JSON . stringify ( opts ) ] ) ;
48+ } , [ email , Usuarios , graph , defaultRole , JSON . stringify ( opts ) ] ) ;
4949
5050 /** Alterna entre "Usuario" y "Administrador" sin I/O */
5151 const changeUser = React . useCallback ( ( ) => {
0 commit comments