Add Commerce admin page for jersey/subscription/contract visibility #226
Labels
No labels
domain:backend
domain:devops
domain:frontend
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
ldraney/westside-app#226
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Type
Feature
Lineage
Downstream of
forgejo_admin/westside-playground#50(playground prototype). This ticket promotes the approved design to production Svelte.Repo
forgejo_admin/westside-landingUser Story
As Marcus (admin)
I want a dedicated Commerce page in the admin nav
So that I can quickly see jersey orders, subscription status, and contract status without digging through individual player cards.
Maps to
story:WS-S9— "As an admin, I want to track payment status per player so that I know who owes what."Context
The playground prototype (
westside-playground#50,commerce.html) is approved with full @-comment spec defining exact columns, filters, summary counts, and DB field mappings for each tab. This ticket promotes that design to production Svelte.Implementation contract:
westside-playground#50commerce.html @-comment spec defines:No new API endpoints needed.
GET /admin/playersalready returns all commerce fields (added in basketball-api PR #250). Aggregate client-side with$derived. Consistent with how every other admin page works (adapter-static, onMount + apiFetch pattern).Upstream gate: Board item #865 (playground spec) must be in
donebefore this ticket moves toin_progress.File Targets
Files the agent should modify or create:
src/routes/(app)/admin/commerce/+page.svelte— new Commerce page promoted from playground. Copy HTML body structure from commerce.html, replace mock data withonMount+apiFetch('/admin/players'), replace hardcoded counts with$derivedaggregations, replace data-filter JS with Svelte reactive filtering.src/routes/(app)/+layout.sveltelines 106-126 — insert Commerce nav item between CRM (line 114) and Teams (line 115):<a href="/admin/commerce" class:active={currentPath === '/admin/commerce'}><span class="nav-icon">$</span>Commerce</a>Files the agent should NOT touch:
src/routes/(app)/admin/players/+page.svelte— CRM page stays as-issrc/app.css— commerce CSS already exists in shared/style.css, copy it to app.css if not already presentAcceptance Criteria
apiFetch('/admin/players')— no new API calls$derivedstateTest Expectations
npm run buildto verify no build errorsConstraints
$stateand$derived(Svelte 5 runes) — consistent with other admin pages<style>blocks — all CSS stays in global app.css per SOPChecklist
Related
forgejo_admin/westside-playground#50— upstream playground prototype with @-comment specsop-capacitor-mobile-lifecycle— playground-to-Svelte promotion SOPproject-westside-basketball— westside project page with user storiesScope Review: NEEDS_REFINEMENT
Review note:
review-863-2026-04-06Template complete, traceability solid (story:WS-S9 verified), file targets confirmed. Three body fixes needed before dispatch:
src/routes/(app)/+layout.svelte(lines 106-126) instead of "wherever the nav lives"westside-playground#50commerce.html @-comment spec — the implementing agent needs the field-to-column mappingneeds_approval— must pass before this ticket advancesarch-westside-appdoes not exist in pal-e-docs — needs creationScope refinement (review-863 feedback):
src/routes/(app)/+layout.sveltelines 106-126, insert between CRM (line 114) and Teams (line 115)arch-westside-app— systemic gap across 29 board items, not specific to this ticketdonebefore this moves toin_progressScope Review: APPROVED
Review note:
review-863-2026-04-06Re-review after refinement — all 5 prior items addressed. Scope is solid, file targets verified, traceability complete (arch note gap deferred as systemic). Ready for dispatch once upstream #865 reaches done.
Non-blocking nit: "commerce CSS already exists in shared/style.css" is inaccurate (no such file; app.css has no commerce classes). Agent will handle naturally.