Skip to content

Feature/refactoring event lists - #79

Merged
benoitmignault merged 10 commits into
feature/league-monteregiefrom
feature/refactoring-event-lists
May 20, 2026
Merged

Feature/refactoring event lists#79
benoitmignault merged 10 commits into
feature/league-monteregiefrom
feature/refactoring-event-lists

Conversation

@benoitmignault

Copy link
Copy Markdown
Owner

This pull request refactors how event details and results are fetched and displayed in the golf league application. It separates the retrieval of event lists from event results, introduces a new API endpoint for event details, and updates the frontend to fetch and display results on demand. Additionally, it standardizes CORS and JSON headers across API endpoints and improves user interaction logging.

API changes:

  • Added new endpoint event-details.php to fetch detailed results for a specific event, returning player results for that event only.
  • Refactored eventslist.php to return only the list of events (without results), simplifying the data structure and query.
  • Standardized CORS and JSON headers in all API files (eventslist.php, standings.php, player-details.php) for consistent cross-origin support and response format. [1] [2] [3]

Frontend changes:

  • Updated EventsList.jsx to fetch the event list without results, and to fetch event results from the new API only when an event is clicked. Results are displayed in a table below the event. [1] [2] [3] [4]
  • Added logging of event detail clicks to the backend via a dedicated API call, similar to how player detail clicks are logged.
  • Fixed state reset for event and player results when closing their respective detail views, preventing stale data display. [1] [2] [3]

These changes improve the frontend performance, data accuracy, and maintainability by separating concerns and reducing unnecessary data transfer.

@benoitmignault benoitmignault self-assigned this May 20, 2026
Copilot AI review requested due to automatic review settings May 20, 2026 01:24
@benoitmignault benoitmignault added bug Something isn't working feature labels May 20, 2026
@benoitmignault
benoitmignault merged commit d9d8d5f into feature/league-monteregie May 20, 2026
1 of 2 checks passed
@benoitmignault
benoitmignault deleted the feature/refactoring-event-lists branch May 20, 2026 01:25
@benoitmignault
benoitmignault removed the request for review from Copilot May 20, 2026 01:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant