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: +
- - - - + + +
+ + + + +