Commit Graph

24 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
6095e76f10 Here is a conventional commit message summarizing the refactoring work:
```
feat: Refactor calendar feature into blueprint

- Moved calendar logic from `features/calendar.py` and `app.py` into a new blueprint at `routes/calendar.py`.
- Removed the `Calendar` class and refactored logic into helper functions within the blueprint module for better organization and readability.
- Eliminated the `pandas` dependency for date range generation, using standard `datetime` operations instead.
- Resolved circular import issues between `db.py`, `extensions.py`, and `routes/calendar.py` by adjusting import locations.
- Corrected `url_for` calls in templates (`calendar.html`, `partials/people_link.html`) to reference the new blueprint endpoint (`calendar.get_calendar`).
- Fixed an `AttributeError` related to HTMX request checking in the calendar route.
- Corrected `AttributeError` related to `.date()` calls on `datetime.date` objects in view processing functions.
- Updated `templates/changelog/changelog.html` to document the refactoring and associated fixes.
```
2025-03-30 22:20:48 +11:00
Peter Stockings
6b741e50d0 Swtich from person list to new overview page 2025-01-27 01:17:23 +11:00
Peter Stockings
5ed737ee94 Refactor stats endpoint so supports filtering people and make dashboard page utilise it 2025-01-27 00:07:27 +11:00
Peter Stockings
527395d704 Make stats refresh, and add filter support to stats endpoint 2025-01-26 23:01:39 +11:00
Peter Stockings
b0fb8895df Start refactoring person overview (list) page, currently is accessible through tags and workout exercise select. Doesnt have any stats or graphs 2025-01-26 18:21:44 +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
0fb330d6fa Add css fade in transition for calendar next/prev changes 2024-04-11 18:22:40 +10:00
Peter Stockings
ed1b91f9b7 Fix flicker caused by custom js select component being loaded 2024-04-11 18:12:51 +10:00
Peter Stockings
63d997a3f1 Refactor calendar (month and year view), switching to vertical slice arch. Also in progress of refactoring of stats so they are retreived after inital page load for performance sake 2024-04-11 13:45:38 +10:00
Peter Stockings
dae4fcbf44 Add view to list workout notes for a person 2024-03-09 18:50:44 +11:00
Peter Stockings
f0d2766247 Remove margin left padding on prev/next month/year on calendar view 2023-12-08 17:54:52 +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
ec35b78afd Switch to using hyperscript to initialise tailwind elements(select) and graphs(Plotly), this removes script tags and ids 2023-08-17 20:38:22 +10:00
Peter Stockings
c6c9925da0 Attempt to improve initial page load by adding defer attribute to scripts, will attempt to add defer to inline scripts as well soon 2023-08-15 22:31:08 +10:00
Peter Stockings
d3df532570 Revert "Add left to right slide in transition on main content rerender (#container)"
This reverts commit ae460815d7.
2023-08-15 15:34:29 +10:00
Peter Stockings
ae460815d7 Add left to right slide in transition on main content rerender (#container) 2023-08-14 22:57:47 +10:00
Peter Stockings
014f38353b Scroll to top when month is selected in year view 2023-07-27 15:11:58 +10:00
Peter Stockings
5730af85d3 Remove search filter from person view dropdown 2023-07-27 15:04:33 +10:00
Peter Stockings
57257a83a2 Center name for calendar/list view 2023-07-26 17:54:17 +10:00
Peter Stockings
44d27269cd When viewing calendar month view on mobile days weeks without a workout have a much smaller cell 2023-07-26 17:16:33 +10:00
Peter Stockings
dc88375d8c Remove wrappers for calendar, dashboard, & person 2023-07-16 09:54:26 +10:00
Peter Stockings
aed610d8b6 Make calendar month view default when viewing a persons workout and display workouts for month view (year view remaining) 2022-12-03 16:57:35 +11:00
Peter Stockings
467f50cc44 Add month/year calendar (mainly static for now) 2022-12-03 11:53:17 +11:00