Added programmer role and fixed snackbar not showing

This commit is contained in:
2026-03-16 07:23:20 +08:00
parent 9f7791e56f
commit 81853c4367
23 changed files with 362 additions and 65 deletions
+5 -2
View File
@@ -59,10 +59,13 @@ final appRouterProvider = Provider<GoRouter>((ref) {
final role = profileAsync is AsyncData
? (profileAsync.value)?.role
: null;
final isAdmin = role == 'admin';
final isAdmin = role == 'admin' || role == 'programmer';
final isReportsRoute = state.matchedLocation == '/reports';
final hasReportsAccess =
role == 'admin' || role == 'dispatcher' || role == 'it_staff';
role == 'admin' ||
role == 'programmer' ||
role == 'dispatcher' ||
role == 'it_staff';
if (!isSignedIn && !isAuthRoute) {
return '/login';