Added programmer role and fixed snackbar not showing
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user