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
@@ -132,9 +132,10 @@ class _AttendanceScreenState extends ConsumerState<AttendanceScreen>
ColorScheme colors,
Profile profile,
) {
final isAdmin = profile.role == 'admin';
final isAdmin = profile.role == 'admin' || profile.role == 'programmer';
final canFileLeave =
profile.role == 'admin' ||
profile.role == 'programmer' ||
profile.role == 'dispatcher' ||
profile.role == 'it_staff';
@@ -209,7 +210,7 @@ class _AttendanceScreenState extends ConsumerState<AttendanceScreen>
}
void _showPassSlipDialog(BuildContext context, Profile profile) {
final isAdmin = profile.role == 'admin';
final isAdmin = profile.role == 'admin' || profile.role == 'programmer';
if (isAdmin) {
showWarningSnackBar(context, 'Admins cannot file pass slips.');
return;