Display exercise history when name is clicked on workout overview(modal) using person list filters (Should look into changing workout overview modal to a seperate page so you can access it via a url)

This commit is contained in:
Peter Stockings
2023-08-06 22:51:24 +10:00
parent fdbb60b490
commit 465bb74b87
4 changed files with 9 additions and 6 deletions

4
app.py
View File

@@ -214,7 +214,7 @@ def get_workout_start_date(person_id, workout_id):
@ validate_topset
def get_topset(person_id, workout_id, topset_id):
topset = db.get_topset(person_id, workout_id, topset_id)
return render_template('partials/topset.html', person_id=person_id, workout_id=workout_id, topset_id=topset_id, exercise_name=topset['ExerciseName'], repetitions=topset['Repetitions'], weight=topset['Weight'])
return render_template('partials/topset.html', person_id=person_id, workout_id=workout_id, topset_id=topset_id, exercise_id=topset['ExerciseId'], exercise_name=topset['ExerciseName'], repetitions=topset['Repetitions'], weight=topset['Weight'])
@ app.route("/person/<int:person_id>/workout/<int:workout_id>/topset/<int:topset_id>/edit_form", methods=['GET'])
@@ -236,7 +236,7 @@ def create_topset(person_id, workout_id):
workout_id, exercise_id, repetitions, weight)
exercise = db.get_exercise(exercise_id)
return render_template('partials/topset.html', person_id=person_id, workout_id=workout_id, topset_id=new_topset_id, exercise_name=exercise['Name'], repetitions=repetitions, weight=weight), 200, {"HX-Trigger": "topsetAdded"}
return render_template('partials/topset.html', person_id=person_id, workout_id=workout_id, topset_id=new_topset_id, exercise_id=exercise_id, exercise_name=exercise['Name'], repetitions=repetitions, weight=weight), 200, {"HX-Trigger": "topsetAdded"}
@ app.route("/person/<int:person_id>/workout/<int:workout_id>/topset/<int:topset_id>", methods=['PUT'])