Commit Graph

53 Commits

Author SHA1 Message Date
Roland Geider
53dcbd8c6c Don't mark nullable fields as "late"
These will be null and we avoid LateInitializationError errors

See #1079
2026-01-16 15:26:38 +01:00
Roland Geider
fb6a673503 Simplify code by adding new log provider
This makes the logic for copying or modifying the logs much easier. Also,
there were some user reports that the old logic sometimes behaved erratically
and old values were sometimes reverted.
2026-01-12 21:40:11 +01:00
Roland Geider
d187324a25 Properly handle null values
Basically all the fields can be nullable, so we need to set them if
we want to avoid LateInitialisation errors.
2025-12-18 10:58:40 +01:00
Roland Geider
ecd0b6c6b4 Add overview page when a workout has been completed 2025-11-26 20:17:02 +01:00
Roland Geider
9f66815e10 Merge branch 'master' into feature/gym-mode
# Conflicts:
#	lib/widgets/routines/gym_mode/navigation.dart
#	pubspec.lock
#	test/exercises/contribute_exercise_image_test.mocks.dart
#	test/exercises/contribute_exercise_test.mocks.dart
#	test/nutrition/nutritional_meal_form_test.mocks.dart
#	test/nutrition/nutritional_plan_form_test.mocks.dart
2025-11-19 19:18:45 +01:00
Roland Geider
fc881c4929 Properly handle timezones
This should (hopefully 🤞) take care of problems saving entries with timezone
information.
2025-11-18 16:30:52 +01:00
Roland Geider
c26e3828f8 Allow adding additional exercises to the workout
While these are not real ad-hoc workouts, at least it's a first step
2025-11-15 23:44:42 +01:00
Roland Geider
93a11a16e4 Recreate generated files and reformat the repo
Seems the default dart formatting rules changed recently, and this was causing
huge diffs in branches
2025-10-09 17:39:02 +02:00
Roland Geider
70fba34f0c Better handling of time zones
We now send the current time zone to the server when serializing datetime objects.
This was causing entries to be saved some hours wrong or depending on the time, on
a different day.
2025-05-26 11:13:53 +02:00
Roland Geider
7f42b47f97 Actually set the RiR value in the logs 2025-04-27 16:10:41 +02:00
Roland Geider
74752505eb Change rir and rirTarget types from String to num
This is more consistent with the other fields and is now the same as the backend
2025-03-26 15:03:15 +01:00
Roland Geider
b681c264b3 Allow the session ID to be nullable
This will be filled in automatically by the backend
2025-03-19 10:19:54 +01:00
Roland Geider
4f94a6a41e Make the repetition and weight units nullable as per the backend 2025-02-21 16:37:16 +01:00
Roland Geider
4bd16f5c0d Remove logs from the routine
The logs are now in the session list and can be easily extracted if needed
2025-01-30 18:21:09 +01:00
Roland Geider
202349c5bc Make workout log charts work again 2025-01-25 15:39:51 +01:00
Roland Geider
757eb4b27d Almost everything is nullable in the Log 2025-01-18 16:57:28 +01:00
Roland Geider
9ab55a6c83 Save iteration and slot entry id to the logs 2025-01-18 16:46:08 +01:00
Roland Geider
f5ab51fd5b Repetitions are not integers anymore 2025-01-18 13:55:42 +01:00
Roland Geider
5d542c51d9 Use updated name of repetition in API response
Also use the same name locally for more consistency
2025-01-14 20:41:40 +01:00
Roland Geider
d7094c37d8 Add target fields to workout log 2025-01-06 22:34:12 +01:00
Roland Geider
ca6c682483 Remove more unused code 2025-01-05 20:17:26 +01:00
Roland Geider
a35336f57c Allow editing the fit in week toggle as well as start and end dates 2024-11-12 13:31:56 +01:00
Roland Geider
9ff2bba13a Load the new DayData entries and the regular data objects from structure endpoint 2024-10-30 23:19:10 +01:00
Roland Geider
b64458603f Rename further occurrences of "exercise base" to just "exercise" 2023-12-26 21:38:07 +01:00
Roland Geider
65ba2275ae Run "dart format --line-length=100 ." to make the diff smaller 2023-12-23 16:40:05 +01:00
Abhishek Saini
c69c639fac fix(drift): built a model for exercise and fixes in fromSql type converter 2023-12-23 14:28:38 +05:30
Roland Geider
c514842b59 Lint the code with a line length of 100
This makes it easier to understand the diffs
2023-11-16 21:36:21 +01:00
Abhishek Saini
582bc611a4 feat(drift-database): Shifted from shared prefs to drift for Exercises 2023-11-16 22:34:40 +05:30
Roland Geider
dd814063f3 Remlace deprecated ignore parameter 2023-02-05 21:28:41 +01:00
Roland Geider
fc524531fb Recreate generated files 2022-10-10 15:53:04 +02:00
Roland Geider
a8e4fdb4e0 Merge branch 'master' into feature/exercise-crowdsourcing
# Conflicts:
#	lib/models/workouts/log.dart
#	test/gallery/gallery_screen_test.mocks.dart
#	test/measurements/measurement_categories_screen_test.mocks.dart
#	test/measurements/measurement_provider_test.mocks.dart
#	test/nutrition/nutritional_plan_form_test.mocks.dart
#	test/other/base_provider_test.mocks.dart
#	test/workout/workout_form_test.mocks.dart
#	test/workout/workout_set_form_test.mocks.dart
2022-10-10 15:50:50 +02:00
Github-actions
8ee9aaab52 Automatic linting 2022-10-04 15:02:56 +00:00
Aditya
3e8e1c8f16 Removed Deprecated Code 2022-10-02 08:41:57 +05:30
Roland Geider
f834950cec Workout logs and settings now have a reference to an exercise base
This puts this code in sync with the backend and is logically better, since
the translations can be displayed when needed and are not hard coded
2022-05-10 16:53:44 +02:00
Roland Geider
19a504dcfb Actually create exercise bases and translations 2022-02-20 14:40:42 +01:00
Marvin M
e5a6d930cb Minor changes 2021-10-07 19:58:56 +02:00
Marvin M
45a2a5f857 Fixes pt 1 2021-10-01 17:18:17 +02:00
Github-actions
c877e436b0 Automatic linting 2021-06-22 21:10:15 +00:00
Github-actions
7492b53c67 Automatic linting 2021-06-20 13:09:24 +00:00
Roland Geider
31edbb3b48 Loop through all result pages when loading logs 2021-05-19 22:34:36 +02:00
Roland Geider
d5521082a6 Override the equals operator for workout plan logs
Two logs are considered equal if their content is equal. This is used e.g.
 in the gym mode where we want to have unique values
2021-05-18 22:14:58 +02:00
Roland Geider
68552ea277 Rename conversion functions
This makes it clearer what gets converted to what
2021-05-18 22:14:58 +02:00
Roland Geider
7e2ba3468d Show past logs in gym mode
See #13
2021-04-15 13:28:12 +02:00
Roland Geider
e76ba740c8 Use setter to save ID and object references 2021-04-14 12:21:40 +02:00
Roland Geider
ad7507c8b7 Update license header as well 2021-04-13 10:28:15 +02:00
Roland Geider
20ed6966b5 Allow setting the weight and repetition units in gym mode
(still needs to get a better UX)
2021-04-09 18:18:57 +02:00
Roland Geider
9edcaaaf0f Saving sessions at the end of the gym mode works 2021-04-06 10:48:15 +02:00
Roland Geider
ecd2773a87 Upgrade packages and move application to null safety 2021-03-25 22:20:16 +01:00
Roland Geider
65a6987a3c Render correct number of pages in gym mode 2021-03-08 23:00:02 +01:00
Roland Geider
914d93d17d More work on workout logs 2021-01-10 12:23:01 +01:00