From 85609f99cde69194142744c723e786eec009583d Mon Sep 17 00:00:00 2001 From: gsinghpal Date: Sat, 23 May 2026 00:32:52 -0400 Subject: [PATCH] feat(fusion_plating_shopfloor): wire FpTabletLock + Hand-Off into Landing/Workspace/Manager (P6.2.5) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Three OWL client actions all wrap their root in : ShopfloorLanding wraps o_fp_landing JobWorkspace wraps o_fp_ws ManagerDashboard wraps o_fp_manager Each adds FpTabletLock to static components, imports tech_store, and gains a handOff() method that calls techStore.lock(). The Hand-Off button (yellow, lock icon) lands next to the scan/QR controls in each header — pressing it instantly returns the tablet to the tile grid without waiting for the idle timer. Component composition (per spec §6.5): FpTabletLock if isLocked → tile grid + FpPinPad else → existing client action (via ) + FpIdleWarning Co-Authored-By: Claude Opus 4.7 (1M context) --- .../static/src/js/job_workspace.js | 9 ++++++++- .../static/src/js/manager_dashboard.js | 9 ++++++++- .../static/src/js/shopfloor_landing.js | 10 +++++++++- .../static/src/xml/job_workspace.xml | 10 ++++++++++ .../static/src/xml/manager_dashboard.xml | 10 ++++++++++ .../static/src/xml/shopfloor_landing.xml | 11 +++++++++++ 6 files changed, 56 insertions(+), 3 deletions(-) diff --git a/fusion_plating/fusion_plating_shopfloor/static/src/js/job_workspace.js b/fusion_plating/fusion_plating_shopfloor/static/src/js/job_workspace.js index 9cca1c97..58e91f32 100644 --- a/fusion_plating/fusion_plating_shopfloor/static/src/js/job_workspace.js +++ b/fusion_plating/fusion_plating_shopfloor/static/src/js/job_workspace.js @@ -25,16 +25,18 @@ import { WorkflowChip } from "./components/workflow_chip"; import { GateViz } from "./components/gate_viz"; import { FpSignaturePad } from "./components/signature_pad"; import { FpHoldComposer } from "./components/hold_composer"; +import { FpTabletLock } from "./tablet_lock"; export class FpJobWorkspace extends Component { static template = "fusion_plating_shopfloor.JobWorkspace"; static props = ["*"]; - static components = { WorkflowChip, GateViz, FpSignaturePad, FpHoldComposer }; + static components = { WorkflowChip, GateViz, FpSignaturePad, FpHoldComposer, FpTabletLock }; setup() { this.notification = useService("notification"); this.action = useService("action"); this.dialog = useService("dialog"); + this.techStore = useService("fp_shopfloor_tech_store"); this.state = useState({ data: null, @@ -76,6 +78,11 @@ export class FpJobWorkspace extends Component { this.action.doAction({ type: "ir.actions.act_window_close" }); } + // ---- Hand-Off (Phase 6.2) --------------------------------------------- + handOff() { + this.techStore.lock(); + } + onJumpToBlocker({ model, id }) { // If the predecessor is in this same workspace, just scroll to it const inThisJob = (this.state.data.steps || []).find((s) => s.id === id); diff --git a/fusion_plating/fusion_plating_shopfloor/static/src/js/manager_dashboard.js b/fusion_plating/fusion_plating_shopfloor/static/src/js/manager_dashboard.js index b00363f6..dd8de876 100644 --- a/fusion_plating/fusion_plating_shopfloor/static/src/js/manager_dashboard.js +++ b/fusion_plating/fusion_plating_shopfloor/static/src/js/manager_dashboard.js @@ -17,15 +17,17 @@ import { registry } from "@web/core/registry"; import { rpc } from "@web/core/network/rpc"; import { useService } from "@web/core/utils/hooks"; import { QrScanner } from "./qr_scanner"; +import { FpTabletLock } from "./tablet_lock"; export class ManagerDashboard extends Component { static template = "fusion_plating_shopfloor.ManagerDashboard"; static props = ["*"]; - static components = { QrScanner }; + static components = { QrScanner, FpTabletLock }; setup() { this.notification = useService("notification"); this.action = useService("action"); + this.techStore = useService("fp_shopfloor_tech_store"); this.state = useState({ overview: null, @@ -148,6 +150,11 @@ export class ManagerDashboard extends Component { this.state.mode = this.state.mode === "quick" ? "detailed" : "quick"; } + // ---- Hand-Off (Phase 6.2) --------------------------------------------- + handOff() { + this.techStore.lock(); + } + toggleCard(jobId) { this.state.expandedJobId = this.state.expandedJobId === jobId ? null : jobId; } diff --git a/fusion_plating/fusion_plating_shopfloor/static/src/js/shopfloor_landing.js b/fusion_plating/fusion_plating_shopfloor/static/src/js/shopfloor_landing.js index fbd78702..923bf472 100644 --- a/fusion_plating/fusion_plating_shopfloor/static/src/js/shopfloor_landing.js +++ b/fusion_plating/fusion_plating_shopfloor/static/src/js/shopfloor_landing.js @@ -23,6 +23,7 @@ import { rpc } from "@web/core/network/rpc"; import { useService } from "@web/core/utils/hooks"; import { QrScanner } from "./qr_scanner"; import { FpKanbanCard } from "./components/kanban_card"; +import { FpTabletLock } from "./tablet_lock"; const LS_STATION_ID = "fp_landing_station_id"; const LS_MODE = "fp_landing_mode"; @@ -31,11 +32,12 @@ const REFRESH_MS = 15000; export class FpShopfloorLanding extends Component { static template = "fusion_plating_shopfloor.ShopfloorLanding"; static props = ["*"]; - static components = { QrScanner, FpKanbanCard }; + static components = { QrScanner, FpKanbanCard, FpTabletLock }; setup() { this.notification = useService("notification"); this.action = useService("action"); + this.techStore = useService("fp_shopfloor_tech_store"); this.state = useState({ mode: localStorage.getItem(LS_MODE) || "all_plant", @@ -120,6 +122,12 @@ export class FpShopfloorLanding extends Component { this.refresh(); } + // ---- Hand-Off (Phase 6.2) --------------------------------------------- + handOff() { + // Tech walking away: lock the tablet so the next operator must PIN in + this.techStore.lock(); + } + // ---- Search ------------------------------------------------------------ onSearchInput(ev) { this.state.search = ev.target.value; diff --git a/fusion_plating/fusion_plating_shopfloor/static/src/xml/job_workspace.xml b/fusion_plating/fusion_plating_shopfloor/static/src/xml/job_workspace.xml index b112164b..cb403cc6 100644 --- a/fusion_plating/fusion_plating_shopfloor/static/src/xml/job_workspace.xml +++ b/fusion_plating/fusion_plating_shopfloor/static/src/xml/job_workspace.xml @@ -2,6 +2,8 @@ + +
@@ -20,6 +22,12 @@ + + · @@ -225,6 +233,8 @@
+
+
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 d3626983..1395a25d 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 @@ -7,6 +7,8 @@ + +
@@ -45,6 +47,12 @@ + +
+
+
diff --git a/fusion_plating/fusion_plating_shopfloor/static/src/xml/shopfloor_landing.xml b/fusion_plating/fusion_plating_shopfloor/static/src/xml/shopfloor_landing.xml index ce47dc78..fb83a1bd 100644 --- a/fusion_plating/fusion_plating_shopfloor/static/src/xml/shopfloor_landing.xml +++ b/fusion_plating/fusion_plating_shopfloor/static/src/xml/shopfloor_landing.xml @@ -2,6 +2,8 @@ + +
@@ -62,6 +64,13 @@ + + + @@ -158,6 +167,8 @@
+
+