06/18 Change Date to Start Date for more understandable
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user