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:
@@ -0,0 +1,39 @@
|
||||
-- 0006_shop: the shop phase. Label positions for weld and heat tag marks, the page a heat table was copied from
|
||||
-- on a change order, and the default department checklists as a settings row. Runs as ps_migrate.
|
||||
|
||||
-- bfx, bfy: where the label (bubble) of a mark sits, as fractions of the page. fx, fy stay where the arrow points.
|
||||
-- NULL means the client places the label at the old default offset from the arrow.
|
||||
ALTER TABLE welds
|
||||
ADD COLUMN bfx double precision CHECK (bfx >= 0 AND bfx <= 1),
|
||||
ADD COLUMN bfy double precision CHECK (bfy >= 0 AND bfy <= 1);
|
||||
|
||||
ALTER TABLE heat_tags
|
||||
ADD COLUMN bfx double precision CHECK (bfx >= 0 AND bfx <= 1),
|
||||
ADD COLUMN bfy double precision CHECK (bfy >= 0 AND bfy <= 1);
|
||||
|
||||
-- The page the placement was copied from when a change order replaced the sheet (the old htCarry).
|
||||
ALTER TABLE heat_table_placements ADD COLUMN carried_from int;
|
||||
|
||||
-- The department checklists. {drawing}, {rev} and {wps} are filled in from the packet. The code keeps the same
|
||||
-- lists as its fallback when this row is missing or does not parse. Admin edits it in phase 9.
|
||||
INSERT INTO settings (key, value) VALUES ('checklist_templates', '{
|
||||
"weld": [
|
||||
{"group": "Before welding", "key": "dwg", "text": "Drawing {drawing} Rev {rev} matches the packet"},
|
||||
{"group": "Before welding", "key": "heat", "text": "Heat numbers on material match the Materials tab"},
|
||||
{"group": "Before welding", "key": "wps", "text": "WPS reviewed: {wps}"},
|
||||
{"group": "Before welding", "key": "fit", "text": "Fit-up and dimensions checked against the drawing"},
|
||||
{"group": "Before welding", "key": "pre", "text": "Preheat and interpass temperature per WPS"},
|
||||
{"group": "After welding", "key": "vt", "text": "Visual inspection of all welds acceptable"},
|
||||
{"group": "After welding", "key": "stamp", "text": "Welds stamped with welder ID"},
|
||||
{"group": "After welding", "key": "clean", "text": "Slag and spatter removed"},
|
||||
{"group": "After welding", "key": "qty", "text": "Completed quantity matches each work order"}
|
||||
],
|
||||
"plain": [
|
||||
{"group": "Before starting", "key": "dwg", "text": "Drawing {drawing} Rev {rev} matches the packet"},
|
||||
{"group": "Before starting", "key": "prev", "text": "Previous department''s work complete and released"},
|
||||
{"group": "Before starting", "key": "mat", "text": "Material and parts on hand match the packet"},
|
||||
{"group": "When done", "key": "work", "text": "Work completed per drawing and procedure"},
|
||||
{"group": "When done", "key": "insp", "text": "Self-inspection done; no damage to finished surfaces"},
|
||||
{"group": "When done", "key": "qty", "text": "Completed quantity matches each work order"}
|
||||
]
|
||||
}'::jsonb) ON CONFLICT (key) DO NOTHING;
|
||||
Reference in New Issue
Block a user