Build Seth's changes C1 to C11 (Gitea issues 1, 8, 18, 23, 24, 25, 27, 31, 32, 33, 36)
- C1 (issue 1): over target follows VISUAL ticket hours, not the timer. - C2 (issue 24): a Q.C. reject always needs a reason; accept needs an NCR number after a reject without one. - C3 (issue 25): an incomplete unit ITP blocks filing. - C4 (issue 27): prints open the print dialog on the page, no new tab. - C5 (issue 31): filing is blocked while VISUAL shows a work order open; the feed sets vclosed on VISUAL packets. - C6 (issue 8): the data book leaves out the history pages. - C7 (issue 18): the supervisor approves each received short; accept and filing wait for it. - C8 (issue 23): per-department checklists, edited by the department supervisor or Admin, frozen at START. - C9 (issue 32): Q.C. and Clerical may run the stamp check. - C10 (issue 33): the PM screen and reports are for PS-ProjectMgmt and Admin only. - C11 (issue 36): the Stall screen lists the packets assigned to the welder, at the supervisor's stall. Migration 0011. Docs: PLAN (also issue 9 confirmed, issue 4 asked), POLICY, SECURITY, SCHEMA, FEED, README, CHANGELOG. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
@@ -250,6 +250,10 @@ def mine_scope(pp: policy.Principal, screen: str | None, station_id: int | None)
|
||||
return MineScope(screen=s, principal=pp, station_id=station_id)
|
||||
|
||||
|
||||
# The statuses a packet shows on the Stall screen: assigned, in progress and submitted for review.
|
||||
STALL_STATUSES = ("assigned", "in_progress", "review")
|
||||
|
||||
|
||||
def mine_term(m: MineScope) -> tuple[str | None, list[Any]]:
|
||||
"""The Mine rule (the old mineFilter) for the screen, or None when it is everything (PM, admin)."""
|
||||
pp = m.principal
|
||||
@@ -269,12 +273,11 @@ def mine_term(m: MineScope) -> tuple[str | None, list[Any]]:
|
||||
return (None, []) if pp.admin else ("false", [])
|
||||
return "p.dept_code = ANY(%s)", [depts]
|
||||
if m.screen == "stall":
|
||||
depts = sorted(pp.shop)
|
||||
if m.station_id is None:
|
||||
# Change C11 (Gitea issue 36): the packets assigned to me, at whatever station the supervisor picked. No
|
||||
# picked station is needed; `station_id` is ignored here.
|
||||
if not pp.user_id:
|
||||
return "false", []
|
||||
if not depts and pp.admin:
|
||||
return "p.station_id = %s", [int(m.station_id)]
|
||||
return "(p.dept_code = ANY(%s) AND p.station_id = %s)", [depts, int(m.station_id)]
|
||||
return "(p.welder_id = %s::uuid AND p.status::text = ANY(%s))", [str(pp.user_id), list(STALL_STATUSES)]
|
||||
return None, []
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user