Skip to content

Crew Requests: a cancelled ask leaves the Open queue instead of reading Accepted - #104

Merged
WPCom100 merged 1 commit into
masterfrom
dev
Nov 13, 2026
Merged

WPCom100 merged 1 commit into
masterfrom
dev

Conversation

@WPCom100

Copy link
Copy Markdown
Owner

What was wrong

On Labor → Crew Requests, a request whose shifts had all been cancelled kept its project card in the default Open queue after everyone else on the project was confirmed. The tab never counted positions in the cancelled status, so such a request had nothing accepted and nothing confirmed, fell through to the "Accepted" badge with no Confirm button, and was bucketed as open with nothing to click to clear it.

What changed

  • modules/labor.js (CrewRequestsTab)
    • A request whose every shift is cancelled is badged Cancelled. This wins over "Paid" and "Booked directly": a cancelled booking is not a booking, however it came about.
    • Cancelled positions rank with confirmed ones when bucketing, as a cancellation does everywhere else (crew_integrity's status rank, LTP_crewRequestPay). The request leaves the Open queue and sits under the Confirmed tile; the tile's tooltip says it holds these.
    • A request with one shift confirmed and another cancelled still reads Confirmed.
    • A cancelled shift says "cancelled" in the expanded per-shift list, muted.
  • sw.js: shell cache bumped to v125 (labor.js is precached).
  • tests/test_crew_requests_tab.js: a project with cancellations — the Open queue is empty, the Confirmed tile holds the rows, and the badges, header chips, action buttons and shift lines read right on desktop and phone.

Left alone on purpose: the paid-out rule that a request with nothing paid at all is never paid out (pinned by tests/test_crew_request_pay.js R17). A cancellation at $0 pay therefore keeps its project in the All view until the payout export settles it.

Verification

  • All frontend JS suites pass (the tab suite is now 51 assertions); tests/check_shell_version.py passes.
  • Ran the app on a scratch database, seeded a project with one confirmed and one cancelled crew member plus a pending ask on a second project, and drove the tab with Playwright: the project card is gone from Open, the cancelled ask reads Cancelled under All with no action buttons and the shift marked cancelled, and there were no page or console errors.

Generated by Claude Code

…ng Accepted

A request whose every shift had since been cancelled fell through the tab's
badge and bucket logic — nothing accepted, nothing confirmed — so it read
"Accepted" with no Confirm button and sat in the Open queue, holding its
project card there after everyone else on the project was confirmed.

The tab now counts cancelled positions: such a request is badged "Cancelled"
(ahead of "Paid" and "Booked directly" — a cancelled booking is not a
booking) and ranks with the confirmed ones, as a cancellation does everywhere
else (crew_integrity's status rank, LTP_crewRequestPay). A request with one
shift confirmed and another cancelled still reads Confirmed. A cancelled
shift says so in the per-shift list, and the Confirmed tile's tooltip says
it holds these. Shell cache bumped to v125 (labor.js is precached).

Tests: tests/test_crew_requests_tab.js gains a project with cancellations —
the Open queue is empty, the Confirmed tile holds the rows, the badges,
chips, action buttons and shift lines read right on desktop and phone.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FUTgf3f79qvyv4HCC81iq1
@WPCom100
WPCom100 merged commit 558501b into master Nov 13, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants