From 6cf826268bb9ea5521c2802985ee10b882a7f2ca Mon Sep 17 00:00:00 2001 From: gsinghpal Date: Sun, 17 May 2026 02:51:33 -0400 Subject: [PATCH] feat(portal): rewrite /my/jobs/ detail page with timeline + doc panel Two-column grid: vertical timeline (5 stages with per-stage timestamps) on the left, grouped document panel (4 categories) on the right. Hero header carries WO ref + part / qty / ETA / tracking facts. Controller adds stage_timeline, doc_groups, and timeline_spine_pct to the render context. Spine fill = done + half-credit for the active stage (so the spine visually leads the eye to where the work is happening). Co-Authored-By: Claude Opus 4.7 (1M context) --- .../controllers/portal.py | 7 + .../views/fp_portal_templates.xml | 198 +++++++----------- 2 files changed, 88 insertions(+), 117 deletions(-) diff --git a/fusion_plating/fusion_plating_portal/controllers/portal.py b/fusion_plating/fusion_plating_portal/controllers/portal.py index a24690a8..52c31b89 100644 --- a/fusion_plating/fusion_plating_portal/controllers/portal.py +++ b/fusion_plating/fusion_plating_portal/controllers/portal.py @@ -738,6 +738,13 @@ class FpCustomerPortal(CustomerPortal): job_sudo, access_token, **kw ) values['progress_percent'] = job_sudo._progress_percent() + values['stage_timeline'] = self._fp_get_stage_timeline(job_sudo) + values['doc_groups'] = self._fp_group_documents(job_sudo) + # Spine-fill % for the timeline (visual progress indicator). + # done stages plus half-credit for the active stage. + done_count = sum(1 for s in values['stage_timeline'] if s['status'] == 'done') + active_count = sum(1 for s in values['stage_timeline'] if s['status'] == 'active') + values['timeline_spine_pct'] = int(((done_count + 0.5 * active_count) / 5) * 100) return request.render( 'fusion_plating_portal.portal_my_job', values, diff --git a/fusion_plating/fusion_plating_portal/views/fp_portal_templates.xml b/fusion_plating/fusion_plating_portal/views/fp_portal_templates.xml index 041e7e69..0a97878e 100644 --- a/fusion_plating/fusion_plating_portal/views/fp_portal_templates.xml +++ b/fusion_plating/fusion_plating_portal/views/fp_portal_templates.xml @@ -485,134 +485,98 @@