Fixed attendance
This commit is contained in:
@@ -1593,7 +1593,15 @@ class _CheckInTabState extends ConsumerState<_CheckInTab> {
|
||||
}
|
||||
} catch (e) {
|
||||
if (mounted) {
|
||||
showErrorSnackBar(context, 'Overtime check-in failed: $e');
|
||||
final msg = e.toString();
|
||||
final friendly = msg.contains('Outside geofence')
|
||||
? 'You are outside the geofence area.'
|
||||
: msg.contains('Not authenticated')
|
||||
? 'Session expired. Please log in again.'
|
||||
: msg.contains('no candidate')
|
||||
? 'Overtime check-in is temporarily unavailable. Please try again.'
|
||||
: 'Overtime check-in failed. Please try again.';
|
||||
showErrorSnackBar(context, friendly);
|
||||
}
|
||||
} finally {
|
||||
if (mounted) setState(() => _loading = false);
|
||||
|
||||
Reference in New Issue
Block a user