From e01a2a0e35589e3eb8766509eab425181394a363 Mon Sep 17 00:00:00 2001 From: gsinghpal Date: Sun, 19 Apr 2026 13:05:27 -0400 Subject: [PATCH] =?UTF-8?q?fix(shopfloor):=20Manager=20Desk=20WO=20row=20l?= =?UTF-8?q?ayout=20=E2=80=94=20proper=20info=20stack=20+=20action=20group?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Screenshot showed the new WO row was broken: • Kind chip text clipped ("Mas" instead of "Mask", "Rac" instead of "Racking") • WO name truncated to first 4 chars • The wet WO had no info column at all — kind chip + name pushed off-screen by the tank picker • "Needs:" chip showed as just an exclamation icon with "N" cut off • Take Over and Open WO buttons unevenly sized Root cause: `.o_fp_mgr_wo_info` carried `nowrap + ellipsis` from the old single-line design, but the new template stacks kind chip + name + meta + needs across multiple lines. Plus the rigid grid (1fr auto auto auto auto) gave the info column whatever the dropdowns left over — usually nothing. **Layout rewrite** — flex with wrap instead of grid: • `.o_fp_mgr_wo_row` — flex row, info on left, actions on right, wraps to two rows on narrow viewports. • `.o_fp_mgr_wo_info` — `flex: 1 1 280px` so it grows but never narrower than 280px. Contains a vertical stack: title row (badge + name) → meta row (workcenter / role / equipment chips) → needs row (yellow chip if anything missing). • `.o_fp_mgr_wo_actions` — `flex: 0 0 auto` with its own gap, so pickers + buttons align cleanly to the right. • Kind chip can wrap to its full label; meta row uses `flex-wrap` so equipment hints don't get clipped. • Take Over collapses to icon-only with title tooltip — the row was getting too wide on the wet kind (which adds the tank picker). **Other tweaks** • Added `tank_id` to the controller payload so the tank picker pre-selects the current tank (was missing on the previous "current tank" highlight). @720px the action group stacks below the info — pickers go full-width, buttons get `min-height: $fp-touch-min` for thumb tap. Asset cache cleared as part of the deploy so the SCSS recompiles. Co-Authored-By: Claude Opus 4.7 (1M context) --- .../controllers/manager_controller.py | 1 + .../static/src/scss/manager_dashboard.scss | 78 +++++++++++---- .../static/src/xml/manager_dashboard.xml | 96 ++++++++++--------- 3 files changed, 112 insertions(+), 63 deletions(-) diff --git a/fusion_plating/fusion_plating_shopfloor/controllers/manager_controller.py b/fusion_plating/fusion_plating_shopfloor/controllers/manager_controller.py index 6befa601..0b26e823 100644 --- a/fusion_plating/fusion_plating_shopfloor/controllers/manager_controller.py +++ b/fusion_plating/fusion_plating_shopfloor/controllers/manager_controller.py @@ -116,6 +116,7 @@ class FpManagerDashboardController(http.Controller): 'duration_expected': w.duration_expected or 0, 'bath': w.x_fc_bath_id.name or '', 'tank': w.x_fc_tank_id.name or '', + 'tank_id': w.x_fc_tank_id.id if w.x_fc_tank_id else False, 'priority': w.x_fc_priority or '0', 'assigned_user_id': ( w.x_fc_assigned_user_id.id diff --git a/fusion_plating/fusion_plating_shopfloor/static/src/scss/manager_dashboard.scss b/fusion_plating/fusion_plating_shopfloor/static/src/scss/manager_dashboard.scss index 9815f3cd..1afe0abf 100644 --- a/fusion_plating/fusion_plating_shopfloor/static/src/scss/manager_dashboard.scss +++ b/fusion_plating/fusion_plating_shopfloor/static/src/scss/manager_dashboard.scss @@ -437,36 +437,66 @@ // ------------------------------------------------------------------------- // WO row inside expanded card // ------------------------------------------------------------------------- + // WO row = info column (vertical stack) + actions column (pickers + buttons) + // Flex with wrap so narrow viewports drop actions below the info naturally + // instead of squishing everything into a single broken grid line. .o_fp_mgr_wo_row { - display: grid; - grid-template-columns: 1fr auto auto auto auto; - gap: $fp-space-2; - align-items: center; - padding: $fp-space-2 $fp-space-3; + display: flex; + flex-wrap: wrap; + gap: $fp-space-3; + align-items: flex-start; + justify-content: space-between; + padding: $fp-space-3; background-color: $fp-card; border: 1px solid #{$fp-border}; border-radius: $fp-radius-sm; font-size: $fp-text-sm; + } - @media (max-width: 1400px) { - grid-template-columns: 1fr auto auto; - .o_fp_mgr_picker:nth-of-type(1) { grid-column: 1 / -1; } - .o_fp_mgr_picker:nth-of-type(2) { grid-column: 1 / -1; } - } - @media (max-width: 600px) { - grid-template-columns: 1fr; - .o_fp_mgr_picker { max-width: 100% !important; width: 100%; } - .btn { min-height: $fp-touch-min; } - } - } .o_fp_mgr_wo_info { - min-width: 0; - overflow: hidden; text-overflow: ellipsis; white-space: nowrap; - font-weight: $fp-weight-semibold; + flex: 1 1 280px; // grows but never narrower than 280px + min-width: 0; // allows children to shrink properly + display: flex; + flex-direction: column; + gap: $fp-space-1; color: $fp-ink; + + // Title row — kind badge + WO name + step number + .o_fp_mgr_wo_title { + display: flex; + align-items: center; + gap: $fp-space-2; + flex-wrap: wrap; + font-weight: $fp-weight-semibold; + font-size: $fp-text-base; + line-height: 1.25; + } + // Meta row — workcenter / role / set equipment + .o_fp_mgr_wo_meta { + display: flex; + align-items: center; + gap: $fp-space-2; + flex-wrap: wrap; + font-size: $fp-text-xs; + color: $fp-ink-mute; + i { margin-right: 2px; } + } + // Chip row — what's still missing for the manager to set + .o_fp_mgr_wo_needs { + margin-top: 2px; + } } + + .o_fp_mgr_wo_actions { + display: flex; + flex-wrap: wrap; + align-items: center; + gap: $fp-space-2; + flex: 0 0 auto; + } + .o_fp_mgr_picker { - min-width: 140px; max-width: 220px; + min-width: 180px; min-height: 40px; padding: 0 $fp-space-3; border: 1px solid #{$fp-border}; @@ -485,10 +515,18 @@ font-weight: $fp-weight-semibold; background-color: $fp-card-soft; color: $fp-ink; + white-space: nowrap; transition: filter $fp-dur-fast $fp-ease; &:hover { filter: brightness(0.95); } } + @media (max-width: 720px) { + // Stack info + actions vertically on narrow viewports + .o_fp_mgr_wo_actions { width: 100%; } + .o_fp_mgr_picker { flex: 1 1 100%; max-width: 100%; } + .o_fp_mgr_wo_row .btn { min-height: $fp-touch-min; } + } + // ------------------------------------------------------------------------- // Status chips (reused) diff --git a/fusion_plating/fusion_plating_shopfloor/static/src/xml/manager_dashboard.xml b/fusion_plating/fusion_plating_shopfloor/static/src/xml/manager_dashboard.xml index 77f948b7..e9f9207d 100644 --- a/fusion_plating/fusion_plating_shopfloor/static/src/xml/manager_dashboard.xml +++ b/fusion_plating/fusion_plating_shopfloor/static/src/xml/manager_dashboard.xml @@ -134,57 +134,67 @@ t-if="state.expandedMoId === card.mo_id or state.mode === 'detailed'">
+
-
+
- +
-
- - · - · - · - · - · +
+ + · + · + · + · + ·
- Needs: + class="o_fp_mgr_wo_needs"> + + + Needs: +
- - - - + + +
+ + + + +