Commit Graph

12 Commits

Author SHA1 Message Date
Peter Stockings
eaeb4ab2c8 feat: Refactor workout functionality into blueprint
- Moved workout-related routes (create/delete/edit workouts, topsets, tags, start dates, show workout) from `app.py` into a new blueprint at `routes/workout.py`.
- Integrated workout view model logic from `features/workout.py` directly into `routes/workout.py` helper function `_get_workout_view_model`.
- Removed `features/workout.py` and the corresponding class instantiation in `db.py`.
- Registered the new `workout_bp` blueprint in `app.py`.
- Removed the original workout route definitions from `app.py`.
- Updated `url_for` calls in relevant templates (`workout.html`, `person_overview.html`, `partials/workout_tags.html`, `partials/topset.html`, `partials/start_date.html`, `partials/new_set_form.html`, `notes.html`, `calendar.html`) to reference the new blueprint endpoints (e.g., `workout.create_workout`).
- Updated `templates/changelog/changelog.html` to document this refactoring.
2025-03-31 22:38:48 +11:00
Peter Stockings
78f2ce2317 Fix bug introduced by last commit in which exercise progress graph wouldnt load upon selecting a exercise 2025-01-24 22:21:18 +11:00
Peter Stockings
5ffb08a994 Fix issue selecting a new exercise 2025-01-19 21:34:45 +11:00
Peter Stockings
616b57e1db Fix regression where selecting an exercise didnt populate reps/weight inputs with last set and resize progress graph on desktop 2024-11-05 15:04:06 +11:00
Peter Stockings
10326ccd7a Switch from using workout modal and change to workout page, still need to cleanup modal logic and templates. Need to fix workout tag functionality 2024-11-04 22:02:06 +11:00
Peter Stockings
0fa3d4b74b Make site even more responsive 2023-12-08 21:23:26 +11:00
Peter Stockings
304ddcb30d Remove dependency on tailwind elements and switch to using tail.select (Smaller lib, that resolves duplication of selects on back/forward) 2023-12-08 09:26:38 +11:00
Peter Stockings
469054048e WIP: When selecting an exercise on new workout view, render a graph of exercise progress for the active user 2023-12-07 20:34:26 +11:00
Peter Stockings
e2104d05fe Fix issue where when selecting a new exercise that doesnt have a previously recorded set resets on selection 2023-09-18 17:44:53 +10:00
Peter Stockings
a09504d2e0 Move entire new set form into partial and clear placeholders for weight/reps on addition of new set 2023-08-21 21:12:12 +10:00
Peter Stockings
c31ec6ad84 After selecting exercise for new set in a workout display most recent set with the same exercise(weight, reps) as placeholder rather then value as on form submission it doesnt clear the number inputs. May revert 2023-08-21 20:53:31 +10:00
Peter Stockings
0cb737e1b8 When you select an exercise for a new topset autofill the reps/weight feilds with the most recent topset values if possible (I beleive I have introduced a minor defect where adding a new set no longer clears reps/weight feild, but for some reason still clears exercise) 2023-08-20 23:42:00 +10:00