{% extends "layout.html" %} {% block content %} {% if all_done %}
Time Period Complete
{{ flash }}
Review Timesheets {% if can_edit %} Import New Time Period {% endif %}
{% else %}
{% if flash %}
{{ flash }}
{% endif %}
{% if selected_employee %} {% endif %}
{% if active_ts and can_edit %}
{% endif %} {% if active_ts and selected_employee and can_edit %}
{% endif %} {% if can_edit %} Import New Time Period {% endif %}
{% if active_ts and selected_employee %}
Employee Settings
Applied to Week 1 regular cap (40 minus carry over).
{% endif %} {% if employees and selected_employee and grouped %} {% if duplicates and duplicates|length > 0 %}
Duplicate dates detected{% if selected_employee %} for {{ selected_employee.name }}{% endif %}:
    {% for d in duplicates %}
  • {{ d.date.strftime("%A, %B %d, %Y") }} - {{ d.count }} rows
  • {% endfor %}
{% if selected_employee and active_ts and can_edit %}
{% endif %}
Duplicate rows are highlighted in the grid until you click Reviewed.
{% endif %} {% if pto_needs and pto_needs|length > 0 %}
PTO review required{% if selected_employee %} for {{ selected_employee.name }}{% endif %}: Missing PTO type on the dates below.
    {% for r in pto_needs %}
  • {{ r.work_date.strftime("%A, %B %d, %Y") }} – PTO {{ r.pto_hours|fmt2 }} hr(s)
  • {% endfor %}
{% if selected_employee and active_ts and can_edit %}
{% endif %}
Rows needing PTO type stay highlighted until you click Reviewed. Saving rows does not clear highlights.
{% endif %} {% if holiday_needs is defined and holiday_needs|length > 0 %}
Holiday review required{% if selected_employee %} for {{ selected_employee.name }}{% endif %}: Dates below include Holiday hours.
    {% for r in holiday_needs %}
  • {{ r.work_date.strftime("%A, %B %d, %Y") }} – Holiday {{ r.holiday_hours|fmt2 }} hr(s)
  • {% endfor %}
{% if selected_employee and active_ts and can_edit %}
{% endif %}
Holiday rows are highlighted until you click Reviewed. Saving rows does not clear highlights.
{% endif %} {% if long_shift_needs and long_shift_needs|length > 0 %}
Long shifts detected{% if selected_employee %} for {{ selected_employee.name }}{% endif %} (over 10 hours):
    {% for r in long_shift_needs %}
  • {{ r.work_date.strftime("%A, %B %d, %Y") }} – {{ r.total_hours|fmt2 }} hours
  • {% endfor %}
{% if selected_employee and active_ts and can_edit %}
{% endif %}
Long-shift rows are highlighted in the grid until you click Reviewed.
{% endif %}
Regular
{{ grouped.totals.regular|fmt2 }}
PTO
{{ grouped.totals.pto|fmt2 }}
Holiday
{{ grouped.totals.holiday|fmt2 }}
Other
{{ grouped.totals.bereavement|fmt2 }}
Overtime
{{ grouped.totals.overtime|fmt2 }}
Paid Total
{{ grouped.totals.paid_total|fmt2 }}
{% set has_holiday_flags = flagged_holiday_dates is defined and reviewed_holiday_dates is defined %} {% for r in grouped.rows %} {% set highlight_long = (r.work_date in flagged_long_dates and r.work_date not in reviewed_long_dates) %} {% set highlight_pto = (r.work_date in flagged_pto_dates and r.work_date not in reviewed_pto_dates) %} {% set highlight_holiday = (has_holiday_flags and (r.work_date in flagged_holiday_dates and r.work_date not in reviewed_holiday_dates)) or (not has_holiday_flags and (r.holiday_hours and r.holiday_hours > 0)) %} {% endfor %}
DATE CLOCK IN CLOCK OUT BREAK TOTAL PTO PTO TYPE HOLIDAY OTHER PAID
{{ r.work_date.strftime("%A, %B %d, %Y") }} {% if highlight_holiday %} Holiday – Needs review {% endif %}
{% if r.holiday_hours and r.holiday_hours > 0 %} Holiday {% elif r.pto_type %} {{ r.pto_type }} {% else %} {{ r.clock_in|fmt_excel_dt if r.clock_in else '-' }} {% endif %}
{% if r.holiday_hours and r.holiday_hours > 0 %} Holiday {% elif r.pto_type %} {{ r.pto_type }} {% else %} {{ r.clock_out|fmt_excel_dt if r.clock_out else '-' }} {% endif %}
{% if can_edit %} {% else %} {% endif %}
{% for w in grouped.weekly_summary %} {% endfor %}
Reg OT Week Total
{{ w.label }} {{ w.reg|fmt2 }} {{ w.ot|fmt2 }} {{ w.all|fmt2 }}
Total {{ (grouped.weekly_summary|sum(attribute='reg'))|fmt2 }} {{ (grouped.weekly_summary|sum(attribute='ot'))|fmt2 }} {{ (grouped.weekly_summary|sum(attribute='all'))|fmt2 }}
{% else %}
No timesheet instances found.
{% if can_edit %} {% endif %}
{% endif %}
{% endif %} {% endblock %}