Story: Jersey Payment Tracking

story-westside-streamlit-jerseys Doc

active user-story

Story: Jersey Payment Tracking

Key: jerseys · Label: story:jerseys · Role: Head Coach (Marcus)

Story

As head coach Marcus, I need to see which players have ordered jerseys and whether they've actually paid — including players who paid cash outside the Stripe flow — so I don't hand out a jersey to a kid whose parent never paid, and I don't hound a parent who already paid me in cash.

Why

Jersey handoffs happen at practice. In the moment, Marcus needs to answer "is this kid good to go?" without calling Lucas. The current system has two sources of truth for payment: Stripe (via orders rows created by basketball-api) and cash (no row anywhere — it exists in Marcus's head). Cash payments are frequent (Seydou is a current example). The dashboard needs to make both visible in one place.

Current implementation

Built in app.py lines 121–185. Shows players with a jersey_option set, joined with their most recent jersey order to derive pay_status from orders.status. Filters: program (All / Kings / Queens), payment (All / Unpaid / Paid / Canceled).

Known gap — cash payments

The current implementation treats missing = unpaid. A player who paid cash has no orders row, so they show up as pay_status = 'none' in the "unpaid" filter. This is wrong — they ARE paid, just not through Stripe. See ticket: "Add cash jersey payment tracking" on board-westside-streamlit.

Acceptance criteria (current + post-cash-fix)

  • Every player with jersey_option IS NOT NULL appears in the Jerseys view.
  • Each row shows: name, program, teams, jersey option (home/away/both), size, number, preferred number, payment status, product name, amount, ordered-at timestamp.
  • Sort order: unpaid first, then canceled, then paid (ops priority order).
  • Filter totals shown: "paid: X, pending: Y, canceled: Z, no order: N".
  • (After cash fix): cash-paid jerseys show pay_status = 'paid-cash' (or similar), and are excluded from the "unpaid" filter by default.

Out of scope

  • Recording the cash payment itself. That write goes through basketball-api (a new endpoint, or a manual DB row via the admin UI). The Streamlit dashboard just reads the result.
  • Jersey fulfillment tracking (ordered from supplier? received? handed to player?) — that's a separate future story if needed.