Render and be able to edit bike rides (and sorta other time distance workouts) #169

Merged
savanni merged 13 commits from fitnesstrax/time-distance-workout into main 2024-02-09 00:05:26 +00:00

This sets up all of the user interface components for rendering and editing a time/distance workout.

Resolves #117

This sets up all of the user interface components for rendering and editing a time/distance workout. Resolves #117
savanni added 14 commits 2024-01-30 05:01:27 +00:00
39acfe7950 Build the facilities to add a new time/distance workout
This adds the code to show the new records in the UI, plus it adds them to the view model. Some of the representation changed in order to facilitate linking UI elements to particular records. There are now some buttons to create workouts of various types, clicking on a button adds a new row to the UI, and it also adds a new record to the view model. Saving the view model writes the records to the database.
2277055f84 Save new time/distance records
This sets up a bunch of callbacks. We're starting to get into Callback Hell, where there are things that need knowledge that I really don't want them to have.

However, edit fields for TimeDistanceEdit now propogate data back into the view model, which is then able to save the results.
7d5d639ed9 Create Duration and Distance structures to handle rendering
These structures handle parsing and rendering of a Duration and a Distance, allowing that knowledge to be centralized and reused. Then I'm using those structures in a variety of places in order to ensure that the information gets rendered consistently.
33c85ee7b3 Reload data when the user saves on the DayEdit panel
This required some big overhauls. The view model no longer takes records. It only takes the date that it is responsible for, and it will ask the database for records pertaining to that date. This means that once the view model has saved all of its records, it can simply reload those records from the database. This has the effect that as soon as the user moves from DayEdit back to DayDetail, all of the interesting information has been repopulated.
savanni force-pushed fitnesstrax/time-distance-workout from e5e33f29f6 to 31d74588fb 2024-01-31 14:42:26 +00:00 Compare
savanni force-pushed fitnesstrax/time-distance-workout from 31d74588fb to ea867812bc 2024-02-08 23:59:36 +00:00 Compare
savanni force-pushed fitnesstrax/time-distance-workout from ea867812bc to 4acf034b8d 2024-02-09 00:02:07 +00:00 Compare
savanni merged commit 4acf034b8d into main 2024-02-09 00:05:26 +00:00
savanni deleted branch fitnesstrax/time-distance-workout 2024-02-09 00:05:26 +00:00
Sign in to join this conversation.
No reviewers
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: savanni/monorepo#169
There is no content yet.