From 70fa085886ce5f564aa67bb6528489df9734fcd4 Mon Sep 17 00:00:00 2001 From: Konrad du Plessis Date: Fri, 15 May 2026 00:57:38 +0200 Subject: [PATCH] ux(history): show day name in Work Log Payroll modal header MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit date in the modal header was "2026-05-15" — now reads "Friday, 15 May 2026". Server-side strftime on the already-loaded log.date — zero DB / compute overhead. Touches only the modal's date field; other date fields in the JSON (paid_date, pay_period_*) still use the ISO format because they don't render into a human-facing header. --- core/views.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/core/views.py b/core/views.py index fa19eaf..b8010f3 100644 --- a/core/views.py +++ b/core/views.py @@ -1262,7 +1262,10 @@ def work_log_payroll_ajax(request, log_id): return JsonResponse({ 'log_id': log.id, - 'date': _date_iso(log.date), + # Human-readable so the modal header reads "Friday, 15 May 2026" + # instead of "2026-05-15". strftime is zero-overhead — the date + # object is already in memory. + 'date': log.date.strftime('%A, %d %B %Y'), 'project': {'id': log.project.id, 'name': log.project.name} if log.project else None, 'team': {'id': log.team.id, 'name': log.team.name} if log.team else None, # get_full_name() returns "" if no first/last, so fall back to username.