fix: map jersey option API values and stack page-header on mobile #230
No reviewers
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!230
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "229-fix-commerce-jersey-option-mobile-header"
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?
Summary
Fixes two bugs on the Commerce admin page: jersey option column rendering "--" for all players, and the page header wrapping awkwardly on mobile viewports.
Changes
src/routes/(app)/admin/commerce/+page.svelte— UpdatedjerseyOptionLabel()switch cases from stale keys (full,jersey_only) to actual API values (reversible,jersey_warmup,opt_out) so the Option column renders correct labelssrc/app.css— Changed.page-headerbase styles from horizontal flex to vertical column stack, with horizontal layout restored at 640px+ via existing media query. This is a shared class so all 6 admin pages benefit.Test Plan
Review Checklist
npm run buildpasses with no errors<style>blocks — all CSS in globalsrc/app.cssRelated Notes
QA Review -- APPROVED
Scope: 2 files, +10/-4 lines. Minimal and focused.
Bug 1 -- Jersey Option Column
jerseyOptionLabel()switch keys updated fromfull/jersey_onlytoreversible/jersey_warmupto match API response valuesopt_outcase unchanged (already correct)'--'fallback preserved for unknown valuesBug 2 -- Mobile Header Layout
.page-headerchanged from horizontal flex (align-items: center; justify-content: space-between) to vertical stack (flex-direction: column; gap: 0.25rem)@media (min-width: 640px)block, restoringflex-direction: row,align-items: center,justify-content: space-between<style>blocks added (constraint respected)Build
npm run buildpasses cleanlyNo issues found. Ready to merge.
PR #230 Review
DOMAIN REVIEW
Stack: SvelteKit frontend (westside-app), global CSS in
src/app.css, Svelte components.CSS (mobile-first pattern):
.page-headercorrectly changed toflex-direction: columnwithgap: 0.25rem-- proper mobile-first stacking.@media (min-width: 640px)breakpoint withflex-direction: row,align-items: center,justify-content: space-between, andgap: 0-- clean override, no leftover properties.JS (jersey option mapping):
full,jersey_only) did not match API enum values, causing all rows to hit thedefault: return '--'branch.reversible,jersey_warmup,opt_out) verified against thebasketball-apimigration012_add_jersey_fields_to_player.pywhich definessa.Enum("reversible", "jersey_warmup", "opt_out", name="jerseyoption"). Values match exactly.opt_outcase was already correct and is preserved.Accessibility: No new interactive elements introduced. No regressions.
Performance: No new dependencies, no bundle impact. Two CSS properties changed, four added behind a media query.
BLOCKERS
None.
node_modules/vendor test excluded), so this is consistent with repo baseline.NITS
None. The diff is minimal and precisely scoped to the two bugs described.
SOP COMPLIANCE
229-fix-commerce-jersey-option-mobile-headerfollows{issue-number}-{kebab-case-purpose}conventionPROCESS OBSERVATIONS
VERDICT: APPROVED