feat(portal): rewrite /my/jobs/<id> 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) <noreply@anthropic.com>
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user