Extend NewWorkout view/component, allowing users to re-use exercises that already exist in another workout.
Changes
[x] add user_id field to the exercises table, so we can actually query exercises by user
[x] implement a helper function to query, and an endpoint that exposes this query, to fetch all of a user's exercises
[ ] as a follow-up, for a nicer UX, we might want to also include exercises' (partial) session history. Displaying e.g. the last session's weight for the exercise, or a list of workouts an exercise is part of, instead of just the exercise's name, may help the user find the exercise they're looking for more easily.
[ ] implement a filterable select-like dropdown subcomponent in the NewWorkout view that allows a user to add select an existing exercise to their new workout.
implementation detail: the exercise should be pushed (using only its exercise_id (as a number, not an object)) to newWorkout.sharedExercises
This follows #23.
Intent
Extend
NewWorkout
view/component, allowing users to re-use exercises that already exist in another workout.Changes
user_id
field to the exercises table, so we can actually query exercises by userNewWorkout
view that allows a user to add select an existing exercise to their new workout.exercise_id
(as a number, not an object)) tonewWorkout.sharedExercises
Miscallaneous