fix: preload player rating history to fix first-click chart render (#10) #15
Reference in New Issue
Block a user
Delete Branch "fix/preload-player-history-10"
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
getAllRatingHistoriesFromDB), soviews/partials/ratings-table.ejscan includeplayer-historyinline per row instead of lazy-loading it on first expansion.htmx:afterSwapchart init (renamedsetupAfterTableSwap, extractedinitChartsInwith adata-chartedguard) so charts render on the initial#ratings-tableswap as well as on per-row refreshes."15 Jan, 2025"date formatting in a singleformatDisplayDatehelper, replacing three inlinetoLocaleDateStringduplicates.The per-row
/partials/player-history/:pdgaNumberendpoint is kept — still used by the manual "refresh rating history" flow.Closes #10
Test plan
/, click any player row → chart renders on the first click (was previously only on the second).GET /partials/player-history/...request when expanding rows.Error rendering chart:messages).