diericx / climbing_notebook

A tool to help climbers with their training
https://climbingnotebook.com
Other
26 stars 2 forks source link

Fix Calendar data fetching bug #60

Closed diericx closed 1 month ago

diericx commented 1 month ago

The UI for the calendar right now does not update in real time because the data is fetched at load and when the calendar view is changed but never otherwise. This PR adds minimal API endpoints for JournalEntries, CalendarEvents, ExerciseEvents, and TrainingProgramActivations. Query Client is utilized to keep track of API queries and invalidate them upon relevant actions by the user. This creates a very smooth experience for the end user when interacting with the calendar.

This also pushes through a bug fix for date ingestion into the form modals. If the seed date was not in date format, for example if data was populated from JSON response, it would not work correctly.