Show contract status in admin CRM player list #137

Closed
opened 2026-03-28 17:16:28 +00:00 by forgejo_admin · 2 comments

Type

Feature

Lineage

Standalone — discovered during contract data audit (2026-03-28). DB shows 10 signed / 45 unsigned but admin CRM has zero contract visibility.

Repo

forgejo_admin/westside-app

User Story

As Marcus (admin)
I want to see contract status on each player card in the admin CRM
So that I can track contract completion without querying the database

Context

The basketball-api GET /admin/players endpoint already returns contract_status per player (none, offered, signed). The admin CRM page (/admin/players) ignores this field entirely — no badge, no count. As of today: 10 players signed, 45 with no contract, 0 offered. Marcus has no way to see this from his dashboard.

Contract status is part of the player pipeline alongside payment status — a signed contract activates billing. Both should be visible on the same card.

File Targets

Files the agent should modify:

  • src/routes/(app)/admin/players/+page.svelte — add contract badge to player cards, add signed count to summary header
  • src/app.css — add badge classes (badge-signed, badge-no-contract, badge-offered) alongside existing badge definitions (lines ~1316-1334)

Files the agent should NOT touch:

  • src/lib/api.js — no API changes needed
  • Any backend/basketball-api files — data already available

Acceptance Criteria

  • Each player card shows a contract status badge: Signed (green), No Contract (gray/subtle), Offered (yellow)
  • Signed contract count visible in page header summary area (e.g. "55 players · 10 contracts signed")
  • Badge styling matches existing badge patterns in getStatusBadgeClass

Test Expectations

  • No automated tests — this is a static-adapter SvelteKit app with no test harness
  • Validate visually: admin login → /admin/players → verify badges render with correct status per player

Constraints

  • Match existing card/badge styling patterns already in the file (see getStatusBadgeClass, getStatusLabel)
  • No Tailwind — pure CSS vars + explicit styles per project convention
  • contract_status field is already in the API response — just consume it
  • ContractStatus enum: none, offered, signed
  • No new filter tab — contract status is a badge per card, not a filter axis

Checklist

  • PR opened
  • No unrelated changes
  • Visual validation on desktop and mobile
  • project-westside-basketball — parent project
### Type Feature ### Lineage Standalone — discovered during contract data audit (2026-03-28). DB shows 10 signed / 45 unsigned but admin CRM has zero contract visibility. ### Repo `forgejo_admin/westside-app` ### User Story As Marcus (admin) I want to see contract status on each player card in the admin CRM So that I can track contract completion without querying the database ### Context The basketball-api `GET /admin/players` endpoint already returns `contract_status` per player (`none`, `offered`, `signed`). The admin CRM page (`/admin/players`) ignores this field entirely — no badge, no count. As of today: 10 players signed, 45 with no contract, 0 offered. Marcus has no way to see this from his dashboard. Contract status is part of the player pipeline alongside payment status — a signed contract activates billing. Both should be visible on the same card. ### File Targets Files the agent should modify: - `src/routes/(app)/admin/players/+page.svelte` — add contract badge to player cards, add signed count to summary header - `src/app.css` — add badge classes (`badge-signed`, `badge-no-contract`, `badge-offered`) alongside existing badge definitions (lines ~1316-1334) Files the agent should NOT touch: - `src/lib/api.js` — no API changes needed - Any backend/basketball-api files — data already available ### Acceptance Criteria - [ ] Each player card shows a contract status badge: Signed (green), No Contract (gray/subtle), Offered (yellow) - [ ] Signed contract count visible in page header summary area (e.g. "55 players · 10 contracts signed") - [ ] Badge styling matches existing badge patterns in `getStatusBadgeClass` ### Test Expectations - [ ] No automated tests — this is a static-adapter SvelteKit app with no test harness - Validate visually: admin login → /admin/players → verify badges render with correct status per player ### Constraints - Match existing card/badge styling patterns already in the file (see `getStatusBadgeClass`, `getStatusLabel`) - No Tailwind — pure CSS vars + explicit styles per project convention - `contract_status` field is already in the API response — just consume it - ContractStatus enum: `none`, `offered`, `signed` - No new filter tab — contract status is a badge per card, not a filter axis ### Checklist - [ ] PR opened - [ ] No unrelated changes - [ ] Visual validation on desktop and mobile ### Related - `project-westside-basketball` — parent project
Author
Owner

Scope Review: NEEDS_REFINEMENT

Review note: review-534-2026-03-28

Template is fully populated and file target verified, but traceability and scope have fixable issues.

  • [BODY] Missing file target: src/app.css needs new badge classes for contract statuses (badge-signed, badge-offered, badge-none) at lines 1316-1334.
  • [LABEL] Story mismatch: story:WS-S9 = "track payment status" but ticket is about contract status (none/offered/signed). Either broaden WS-S9 or create WS-S13.
  • [LABEL] Phantom arch ID: arch:admin-crm has no architecture note in pal-e-docs. Create arch-admin-crm-westside-basketball or use existing arch:westside-app.
  • [SCOPE] AC3 ambiguity: "Filter or visual grouping" — new filter tab bar, badge on each card, or both? Agent will interpret freely if unspecified.
## Scope Review: NEEDS_REFINEMENT Review note: `review-534-2026-03-28` Template is fully populated and file target verified, but traceability and scope have fixable issues. - **[BODY]** Missing file target: `src/app.css` needs new badge classes for contract statuses (badge-signed, badge-offered, badge-none) at lines 1316-1334. - **[LABEL]** Story mismatch: `story:WS-S9` = "track payment status" but ticket is about contract status (none/offered/signed). Either broaden WS-S9 or create WS-S13. - **[LABEL]** Phantom arch ID: `arch:admin-crm` has no architecture note in pal-e-docs. Create `arch-admin-crm-westside-basketball` or use existing `arch:westside-app`. - **[SCOPE]** AC3 ambiguity: "Filter or visual grouping" — new filter tab bar, badge on each card, or both? Agent will interpret freely if unspecified.
Author
Owner

Scope Review: READY

Review note: review-534-2026-03-28

Scope is solid — all template sections present, traceability triangle complete (story:WS-S9, arch:westside-app, Forgejo #137), both file targets verified, 3 acceptance criteria are agent-verifiable, and the ticket fits well within the 5-minute rule.

Implementation already complete on branch 137-contract-status-admin-crm (commit 1d81ef5, PR #141 open). Proceed to QA/merge.

## Scope Review: READY Review note: `review-534-2026-03-28` Scope is solid — all template sections present, traceability triangle complete (story:WS-S9, arch:westside-app, Forgejo #137), both file targets verified, 3 acceptance criteria are agent-verifiable, and the ticket fits well within the 5-minute rule. Implementation already complete on branch `137-contract-status-admin-crm` (commit 1d81ef5, PR #141 open). Proceed to QA/merge.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
forgejo_admin/westside-landing#137
No description provided.