feat: correo via banco mail, rol supervisor y lint en cero
This commit is contained in:
1 parent
2502de4e06
commit
b1cddbac6c
15 files changed
+677
-107
No files matched your search
@@ -38,13 +38,18 @@ export default function DepartmentsPage() {
|
||||
}, []);
|
||||
|
||||
useEffect(() => {
|
||||
if (authLoading) return;
|
||||
if (user?.role !== "admin") {
|
||||
setLoading(false);
|
||||
return;
|
||||
}
|
||||
fetchGroups();
|
||||
}, [fetchGroups, authLoading, user?.role]);
|
||||
if (authLoading || user?.role !== "admin") return;
|
||||
getGroups()
|
||||
.then((g) => {
|
||||
setGroups(g);
|
||||
setError("");
|
||||
})
|
||||
.catch((err) => {
|
||||
setError(err instanceof Error ? err.message : "Error al cargar");
|
||||
setGroups([]);
|
||||
})
|
||||
.finally(() => setLoading(false));
|
||||
}, [authLoading, user?.role]);
|
||||
|
||||
const openCreate = () => {
|
||||
setEditing(null);
|
||||
|
||||
Reference in new issue
Block a user