diff --git a/templates/time_attendance_dashboard.html b/templates/time_attendance_dashboard.html index fffa677..fb68685 100644 --- a/templates/time_attendance_dashboard.html +++ b/templates/time_attendance_dashboard.html @@ -20,7 +20,7 @@
- {% if session.role == 'admin' %} + {% if session.role in ['admin', 'payroll'] %} Import Excel Data @@ -78,7 +78,6 @@
- {% if recent_records %}
@@ -98,84 +97,92 @@ # - Employee ID - Employee Name - Location - Action + ID + Name + Platform Date Time - Platform - Address + Location Name + Action Description + Event Description + Recorded Address Actions {% for record in recent_records %} + {{ loop.index }} + +
{{ record.employee_id }}
+ + -
- - {{ record.employee_name or 'Unknown' }} +
+ {{ record.employee_name or 'Unknown' }}
+ + + + {{ record.platform or 'Unknown' }} + + + + + {{ record.attendance_date.strftime('%Y-%m-%d') }} + + + + + {{ record.attendance_time.strftime('%H:%M:%S') }} + + +
{{ record.location_name }}
+ + -
+ {% if record.action_description.lower() == 'check in' %} - + {% elif record.action_description.lower() == 'check out' %} - + {% else %} - + {% endif %} {{ record.action_description }} -
+ - -
- - {{ record.attendance_date.strftime('%Y-%m-%d') }} -
+ + + + {{ record.event_description if record.event_description else '-' }} - -
- - {{ record.attendance_time.strftime('%H:%M:%S') }} -
- - -
- {% if record.platform %} - - {{ record.platform[:25] }}{% if record.platform|length > 25 %}...{% endif %} - {% else %} - - - {% endif %} -
- - -
- {% if record.recorded_address %} - - - {{ record.recorded_address[:35] }}{% if record.recorded_address|length > 35 %}...{% endif %} - - {% else %} - - - {% endif %} -
+ + + + {% if record.recorded_address %} + + {{ record.recorded_address[:35] }}{% if record.recorded_address|length > 35 %}...{% endif %} + + {% else %} + No address + {% endif %} + +