Update attendance record display

This commit is contained in:
Nguyen Ngo
2025-08-08 10:16:55 -04:00
parent 57f31237ac
commit 8d5c926f2f
2 changed files with 5 additions and 2860 deletions
+5 -3
View File
@@ -2399,7 +2399,9 @@ def attendance_report():
# Safe attribute access with fallbacks # Safe attribute access with fallbacks
location_accuracy = getattr(record, 'location_accuracy', None) location_accuracy = getattr(record, 'location_accuracy', None)
gps_accuracy = getattr(record, 'gps_accuracy', None) gps_accuracy = getattr(record, 'gps_accuracy', None)
qr_address = getattr(record, 'qr_address', None)
checked_in_address = qr_address if (location_accuracy <= 0.5) else getattr(record, 'checked_in_address', None)
record_dict = { record_dict = {
'id': record.id, 'id': record.id,
'employee_id': record.employee_id, 'employee_id': record.employee_id,
@@ -2407,8 +2409,8 @@ def attendance_report():
'check_in_time': record.check_in_time, 'check_in_time': record.check_in_time,
'location_name': record.location_name, 'location_name': record.location_name,
'location_event': getattr(record, 'location_event', ''), 'location_event': getattr(record, 'location_event', ''),
'qr_address': getattr(record, 'qr_address', None) or 'Not available', 'qr_address': qr_address or 'Not available',
'checked_in_address': getattr(record, 'checked_in_address', None) or 'Location not captured', 'checked_in_address': checked_in_address or 'Location not captured',
'device_info': getattr(record, 'device_info', ''), 'device_info': getattr(record, 'device_info', ''),
'location_accuracy': location_accuracy, 'location_accuracy': location_accuracy,
'gps_accuracy': gps_accuracy, 'gps_accuracy': gps_accuracy,
-2857
View File
File diff suppressed because it is too large Load Diff