Add badges to sets showing stats ie weight/rep increase or how many weeks stalled

This commit is contained in:
Peter Stockings
2026-01-30 22:42:06 +11:00
parent eada1a829b
commit e156dd30cc
5 changed files with 138 additions and 3 deletions

View File

@@ -179,6 +179,12 @@ def get_workout_start_date(person_id, workout_id):
start_date = workout.get('start_date') if workout else None
return render_template('partials/start_date.html', person_id=person_id, workout_id=workout_id, start_date=start_date)
@workout_bp.route("/person/<int:person_id>/workout/<int:workout_id>/topset/<int:topset_id>/achievements", methods=['GET'])
@validate_topset
def get_topset_achievements(person_id, workout_id, topset_id):
achievements = db.get_topset_achievements(topset_id)
return render_template('partials/achievement_badges.html', achievements=achievements)
@workout_bp.route("/person/<int:person_id>/workout/<int:workout_id>/topset/<int:topset_id>", methods=['GET'])
@validate_topset
def get_topset(person_id, workout_id, topset_id):