Phase 5: Supervisor and Stall screens, weld map, heat table, clock and CO verification
The shop at parity with the old build. Supervisor screen (department chips, CO headline, numbers, Change orders
on hold, station grid with clocks and CO tags, boards) and Stall screen (station picker, hero, My packets,
Submitted). Shop steps on the packet page: assign with station, welder picker and stamp; pull back; Start, Pause,
Resume; Submit with a PIN signature and the missing steps as links; review with Send to Q.C., Return to station
and Skip Q.C. route; a lead's read-only review. Weld map (pdf.js viewer with pan, pinch, zoom, full screen; marks
with leader lines; weld sheet; weld record with field CAS; carried marks). Heat map (heat table placed, dragged,
sized, removed; legacy amber tags; borrowed heat map read-only). Checklist tab with templates from settings.
VOID stamps on voided pages. Change orders: CO-n labels, supervisor verify with signature, approval copies the
heat table to the new sheet and the BOM merge keeps the shop's values. Server clock of record with VISUAL ticket
hours beside it. Presence per packet over SSE. Migration 0006 (bfx, bfy, carried_from, checklist_templates).
New endpoints /api/shop/board, /api/shop/stations, /api/shop/stall, /api/departments/{code}/people.
Tests: policy oracle for every shop action, role and status; clock arithmetic; concurrent inserts; CO apply;
frontend geometry, heat table, clock, checklist, weld sheet, screens; seven Playwright scenarios. Docs updated.
Co-Authored-By: Claude Fable 5.1 <[email protected]>
This commit is contained in:
@@ -296,7 +296,7 @@ def test_welds(pg_client2: TestClient, pg_settings: Settings, unit: tuple[int, i
|
||||
weld = {"page": 1, "fx": 0.25, "fy": 0.5, "wo_base": "L670001", "piece": 1, "items": [2, 1], "type": "Fillet"}
|
||||
r1 = c.post(f"/api/packets/{pid}/welds", json={**weld, "size": "1/4"})
|
||||
assert r1.status_code == 200, r1.text
|
||||
r2 = c.post(f"/api/packets/{pid}/welds", json={**weld, "type": "Butt"})
|
||||
r2 = c.post(f"/api/packets/{pid}/welds", json={**weld, "type": "Groove"})
|
||||
assert r2.status_code == 200, r2.text
|
||||
welds = r2.json()["welds"]
|
||||
assert [w["weld_no"] for w in welds] == [1, 2]
|
||||
@@ -355,7 +355,10 @@ def test_heat_tags_and_heat_table(pg_client2: TestClient, pg_settings: Settings,
|
||||
|
||||
url = f"/api/packets/{pid}/heat-table/1"
|
||||
r1 = c.put(url, json={"x": 0.7, "y": 0.1, "s": 1.0})
|
||||
assert r1.status_code == 200 and r1.json()["heat_table"] == [{"page": 1, "x": 0.7, "y": 0.1, "s": 1.0}]
|
||||
assert r1.status_code == 200
|
||||
ht = r1.json()["heat_table"]
|
||||
assert [{k: h[k] for k in ("page", "x", "y", "s")} for h in ht] == [{"page": 1, "x": 0.7, "y": 0.1, "s": 1.0}]
|
||||
assert ht[0]["carried_from"] is None and ht[0]["by"]["display_name"] == "Wade Warehouse"
|
||||
r2 = c.put(url, json={"x": 0.7, "y": 0.1, "s": 1.0})
|
||||
assert r2.status_code == 200 and r2.json()["version"] == r1.json()["version"]
|
||||
r3 = c.put(url, json={"x": 0.6, "y": 0.1, "s": 1.2})
|
||||
@@ -536,7 +539,7 @@ def test_change_orders(pg_client2: TestClient, pg_settings: Settings, unit: tupl
|
||||
as_user(c, "weld.andy")
|
||||
r = step(c, get(c, pid), "submit", sign=SIGN)
|
||||
assert r.status_code == 403 and r.json()["code"] == "co_hold", r.text
|
||||
assert "Change order 1" in r.json()["detail"]
|
||||
assert "Change order CO-1" in r.json()["detail"]
|
||||
vurl = f"/api/packets/{pid}/change-orders/1/verify"
|
||||
assert c.post(vurl, json={"dept": "03", "sign": SIGN}).status_code == 403
|
||||
|
||||
|
||||
Reference in New Issue
Block a user