Add activity logs table

This commit is contained in:
Peter Stockings
2026-01-31 14:47:59 +11:00
parent 62080b97a4
commit d7c9f71d22
10 changed files with 193 additions and 6 deletions

View File

@@ -1,6 +1,7 @@
from flask import Blueprint, render_template, request, current_app
from jinja2_fragments import render_block
from flask_htmx import HTMX
from flask_login import current_user
from extensions import db # Still need db for execute method
from decorators import validate_person, validate_workout
@@ -91,6 +92,7 @@ def update_workout_note(person_id, workout_id):
"""Updates a specific workout note."""
note = request.form.get('note')
_update_workout_note_for_person(person_id, workout_id, note) # Use local helper
db.activityRequest.log(current_user.id, 'UPDATE_NOTE', 'workout', workout_id, f"Updated note for workout {workout_id}")
return render_template('partials/workout_note.html', person_id=person_id, workout_id=workout_id, note=note)
@notes_bp.route("/person/<int:person_id>/workout/<int:workout_id>/note", methods=['GET'])