From c39faabc57da95e3ff3ae9af896b53fd15bf0407 Mon Sep 17 00:00:00 2001 From: NguyenND Date: Thu, 18 Jun 2026 12:10:20 -0400 Subject: [PATCH] 06/18 Change Date to Start Date for more understandable --- app/templates/inspections/view.html | 2 +- app/utils/pdf_export.py | 11 +++++------ 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/app/templates/inspections/view.html b/app/templates/inspections/view.html index 84720ae..84c815e 100644 --- a/app/templates/inspections/view.html +++ b/app/templates/inspections/view.html @@ -491,7 +491,7 @@ {# Meta row #}
- Date + Start Date {{ inspection.inspection_date.strftime('%B %d, %Y %H:%M') }}
{% if inspection.completed_at %} diff --git a/app/utils/pdf_export.py b/app/utils/pdf_export.py index 38032d5..4ad0cf4 100644 --- a/app/utils/pdf_export.py +++ b/app/utils/pdf_export.py @@ -226,8 +226,7 @@ def _score_color(score): def _meta_table(inspection): """Render a 6-column label/value grid covering the key inspection metadata.""" - date_str = inspection.inspection_date.strftime('%B %d, %Y') - time_str = inspection.inspection_date.strftime('%I:%M %p ET') + start_date = inspection.inspection_date.strftime('%B %d, %Y %I:%M %p ET') completed = (inspection.completed_at.strftime('%B %d, %Y %I:%M %p ET') if inspection.completed_at else '—') score_val = (f'{float(inspection.overall_score):.1f}%' @@ -244,14 +243,14 @@ def _meta_table(inspection): # Each row: alternating label / value columns (6 cols total) rows = [ [lbl('INSPECTOR'), val(inspection.inspector.username), - lbl('DATE'), val(date_str), - lbl('TIME'), val(time_str)], + lbl('START DATE'), val(start_date), + lbl('COMPLETED DATE'), val(completed)], [lbl('FACILITY'), val(inspection.facility.name), lbl('AREA'), val(area_txt), - lbl('COMPLETED'), val(completed)], + lbl('STATUS / SCORE'), val(f'{status_txt} {score_val}')], [lbl('TEMPLATE'), val(inspection.template.name), lbl('FREQUENCY'), val(inspection.template.frequency.title()), - lbl('STATUS / SCORE'), val(f'{status_txt} {score_val}')], + lbl(''), val('')], ] col_w = (letter[0] - 1.3 * inch) / 6