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:
@@ -497,3 +497,33 @@ def test_notification_events(pg_settings: Settings) -> None:
|
||||
)
|
||||
conn.execute("INSERT INTO notification_events (kind, subject) VALUES ('t_kind', 'assets')")
|
||||
assert one(conn, "SELECT count(*) FROM notification_events WHERE kind = 't_kind'") == 2
|
||||
|
||||
|
||||
def test_shop_columns_and_checklist_templates(pg_settings: Settings) -> None:
|
||||
"""0006: label positions on welds and heat tags, carried_from on heat table placements, the checklist row."""
|
||||
with db.connect_as("migrate", pg_settings, autocommit=True) as conn:
|
||||
names = [r[0] for r in conn.execute("SELECT name FROM schema_migrations ORDER BY name").fetchall()]
|
||||
assert "0006_shop.sql" in names
|
||||
with app_conn(pg_settings) as conn:
|
||||
for t, c, kind in (
|
||||
("welds", "bfx", "double precision"),
|
||||
("welds", "bfy", "double precision"),
|
||||
("heat_tags", "bfx", "double precision"),
|
||||
("heat_tags", "bfy", "double precision"),
|
||||
("heat_table_placements", "carried_from", "integer"),
|
||||
):
|
||||
got = one(
|
||||
conn,
|
||||
"SELECT data_type FROM information_schema.columns WHERE table_name = %s AND column_name = %s",
|
||||
(t, c),
|
||||
)
|
||||
assert got == kind, (t, c)
|
||||
ids = seed(conn)
|
||||
with pytest.raises(psycopg.errors.CheckViolation), conn.transaction():
|
||||
conn.execute(
|
||||
"INSERT INTO welds (packet_id, weld_no, items, bfx) VALUES (%s, 1, '{1}', 1.5)", (ids["packet"],)
|
||||
)
|
||||
value = one(conn, "SELECT value FROM settings WHERE key = 'checklist_templates'")
|
||||
assert [i["key"] for i in value["weld"]] == ["dwg", "heat", "wps", "fit", "pre", "vt", "stamp", "clean", "qty"]
|
||||
assert [i["key"] for i in value["plain"]] == ["dwg", "prev", "mat", "work", "insp", "qty"]
|
||||
assert value["weld"][0]["text"] == "Drawing {drawing} Rev {rev} matches the packet"
|
||||
|
||||
Reference in New Issue
Block a user