diff --git a/app/templates/scheduled_reports/index.html b/app/templates/scheduled_reports/index.html index 4685d47..80c3484 100644 --- a/app/templates/scheduled_reports/index.html +++ b/app/templates/scheduled_reports/index.html @@ -1,482 +1,95 @@ {% extends "base.html" %} -{% block title %}Dashboard{% endblock %} - +{% block title %}Scheduled Reports{% endblock %} {% block content %} -
| Facility | -Address | -Project | -- |
|---|---|---|---|
| {{ f.name }} | -{{ f.address or '—' }} | -{{ f.project.name if f.project else '—' }} | -- - View - - - Report - - | -
| Facility | -Inspections | -Avg Score | -
|---|---|---|
| {{ f.name }} | -{{ f.count }} | -- - {{ f.avg }}% - - | -
| Date | -Facility | -Area | - {% if current_user.role != 'inspector' %}Inspector | {% endif %} -Score | -Status | +Name | Type | Frequency | Facility | +Recipients | Next Send | Last Sent | +Status | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| {{ insp.inspection_date.strftime('%Y-%m-%d %H:%M') }} | -{{ insp.facility.name }} | -{{ insp.area.name if insp.area else '—' }} | - {% if current_user.role != 'inspector' %}{{ insp.inspector.username }} | {% endif %} + {% for r in reports %} +|||||||||||
| {{ r.name }} | +{{ r.report_type|title }} | +{{ r.frequency|title }} | +{{ r.facility.name if r.facility else '— All —' }} | - {% if insp.overall_score %} - - {{ insp.overall_score }}% + + {{ r.recipient_list()|length }} recipient{{ 's' if r.recipient_list()|length != 1 else '' }} - {% else %} - — - {% endif %} + | ++ {{ r.next_send_at.strftime('%Y-%m-%d %H:%M') if r.next_send_at else '—' }} + | ++ {{ r.last_sent_at.strftime('%Y-%m-%d %H:%M') if r.last_sent_at else 'Never' }} | - - {{ insp.status|title }} - + {% if r.active %}Active + {% else %}Paused{% endif %} + | ++ + + + + + + + + + + |
No scheduled reports configured yet.
+ + Create First Schedule + +