Roland Geider
08a22e5ab0
Allow selecting start dates for routines in the future
2025-10-17 18:53:31 +02:00
Roland Geider
85ba00b654
Merge branch 'master' into feature/day-type
...
# Conflicts:
# lib/models/workouts/day.g.dart
# lib/models/workouts/day_data.g.dart
# lib/models/workouts/set_config_data.g.dart
# lib/models/workouts/slot_data.g.dart
# lib/models/workouts/slot_entry.g.dart
# lib/models/workouts/weight_unit.g.dart
# test/auth/auth_screen_test.mocks.dart
# test/core/settings_test.mocks.dart
# test/exercises/contribute_exercise_test.mocks.dart
# test/gallery/gallery_form_test.mocks.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_meal_form_test.mocks.dart
# test/nutrition/nutritional_plan_form_test.mocks.dart
# test/nutrition/nutritional_plan_screen_test.mocks.dart
# test/nutrition/nutritional_plans_screen_test.mocks.dart
# test/other/base_provider_test.mocks.dart
# test/routine/day_form_test.mocks.dart
# test/routine/gym_mode_screen_test.mocks.dart
# test/routine/gym_mode_session_screen_test.mocks.dart
# test/routine/repetition_unit_form_widget_test.mocks.dart
# test/routine/routine_edit_screen_test.mocks.dart
# test/routine/routine_edit_test.mocks.dart
# test/routine/routine_form_test.mocks.dart
# test/routine/routine_logs_screen_test.mocks.dart
# test/routine/routine_screen_test.mocks.dart
# test/routine/routines_provider_test.mocks.dart
# test/routine/routines_screen_test.mocks.dart
# test/routine/slot_entry_form_test.mocks.dart
# test/routine/weight_unit_form_widget_test.mocks.dart
# test/user/provider_test.mocks.dart
# test/weight/weight_provider_test.mocks.dart
# test/weight/weight_screen_test.mocks.dart
2025-10-09 17:39:39 +02: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
6146201531
Allow setting the slot entry type as well
2025-10-09 17:28:23 +02:00
Roland Geider
39be6a3edf
Allow setting the day type in the edit form
2025-10-06 11:36:27 +02:00
Roland Geider
a7ee4ff5b3
Merge pull request #855 from wger-project/nutrition-plan-stats
...
Nutrition plan stats
2025-09-22 16:19:04 +02:00
Roland Geider
798406eaa9
Make routineId nullable in session and related files
...
Sessions can be added ad-hoc, without needing to be part of any specific
routine.
2025-09-16 14:47:47 +02:00
Roland Geider
9b3957fe35
Use "clock" for mocking dates and datetimes
...
This should make the tests a bit more robust, specially in CI since these
tended to fail depending on how long and when the tests run. Also, rework
a bit the way the start and end dates in sessions were being handled and
initialised
2025-09-16 14:45:16 +02:00
Roland Geider
dbd3fa915d
Refactor PlanForm
...
* Date values are now localized
* Remove text controllers since we were setting the values in the plan
object directly as well as setting them in the controllers anyway. Note
that this is still not an ideal solution since if we change something
in the form and close it, the changes are still reflected in the UI, just
not preserved to the server.
* Move basic date sanity cheks to the model
2025-09-12 16:24:56 +02:00
Roland Geider
68e8721cdb
Refresh routine data on load when starting the gym mode
...
This prevents errors when the user created or deleted a workout session for
the current routine over the web interface
See #876
2025-09-07 15:32:19 +02:00
Roland Geider
76adb1aa8f
Localize field names in routine form
2025-08-28 22:47:31 +02:00
Roland Geider
b996b4b88b
Bump last selectable date to 1 year in the future
2025-08-25 19:31:26 +02:00
Afzal Momin
a78da55464
changed calender settings to allow to choose future days upto 112 days.
2025-07-23 21:32:15 +05:30
Roland Geider
8ae889a1ea
Improve decimal input handling
...
We now use TextInputType.numberWithOptions(decimal: true) which seems to have
a more consistent behaviour under android and iOS. Also, we now use NumberFormat
to parse the inputs according to the user's locale.
2025-06-27 13:24:53 +02:00
Roland Geider
8e567e332d
Split up some files for easier editing
2025-05-14 14:45:04 +02:00
Roland Geider
e9435cd4aa
Fix test
2025-05-09 21:46:09 +02:00
Roland Geider
7141e26480
Update SessionForm test
2025-05-09 21:23:09 +02:00
Roland Geider
01c5c9186d
Merge branch 'master' into feature/better-error-handling
...
# Conflicts:
# lib/widgets/routines/gym_mode/session_page.dart
2025-05-09 21:16:55 +02:00
Roland Geider
d663bcd88a
Move common logic to SessionForm
...
Refactor and polish a bit the form in the log overview.
2025-05-09 21:12:49 +02:00
Roland Geider
aafb2c90c8
Delete unused file
2025-05-09 14:16:45 +02:00
Roland Geider
f8000a5454
Catch and handle WgerHttpException specially
...
This shows the server errors directly in the form, instead of a modal dialog
(which is the default for all the other forms and places that throw the exception)
2025-05-09 13:54:58 +02:00
Roland Geider
7f42b47f97
Actually set the RiR value in the logs
2025-04-27 16:10:41 +02:00
Roland Geider
4effd5af5a
Show server side validation errors
2025-04-04 19:22:21 +02:00
Roland Geider
d071d143df
Update flutter to 3.29
...
The translations are not stored in a synthetic package anymore, but the
files are just copied to a specific folder so it can be more easily imported
Also, flutter_barcode_scanner was replaced by simple_barcode_scanner since
the first hasn't been updated in 3 years and was already causing problems
for some time
2025-03-18 17:28:19 +01:00
Roland Geider
58a641d298
Also put the list tile to add exercises in a card
...
This makes it look the same as the one to add new days and makes for
a more consistent behaviour
2025-03-17 19:44:58 +01:00
Roland Geider
5fdcb63207
Remove the optional refresh parameter
...
We always want to refresh the data since we don't update manually the
dayData lists
2025-03-17 19:27:43 +01:00
Roland Geider
8de2199742
Render the "add day" within a Card
...
This makes it visually more similar to the rest of the options
2025-03-14 15:16:21 +01:00
Roland Geider
325cc93865
Refresh the whole routine after modifying further objects.
...
This makes sure that all the structures are present and have the correct
content (dayData, etc.). Also, add more feedback to the user for some operations
that take a bit longer due to loading the whole routine.
2025-03-11 20:36:38 +01:00
Roland Geider
3abfd43be0
Rename variable to make it clearer what it does
2025-03-11 14:27:15 +01:00
Roland Geider
929acc7938
Refresh the whole routine after modifying a day
...
This makes sure that all the structures are present and have the correct
content (dayData, etc.)
2025-03-11 14:06:09 +01:00
Roland Geider
1f647b5033
Correctly navigate to new routine after creating it
2025-03-11 13:50:13 +01:00
Roland Geider
883490ecd4
Juggle with the widgets so the routine form doesn't cause overflow errors
...
Seems this is the only form to make it work within the SingleChildScrollView
2025-03-11 13:25:30 +01:00
Roland Geider
f25e9867a2
Cleanup
2025-02-21 22:05:29 +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
2498183094
Rename further instances of "reps" to "repetitions"
2025-02-01 19:24:15 +01:00
Roland Geider
323b18320f
Rename key to be more consistent
2025-02-01 15:34:00 +01:00
Roland Geider
4d55f8c901
Add some more tests
2025-01-24 20:22:22 +01:00
Roland Geider
b4ff0b74aa
Some cleanup, renaming, reformating
2025-01-24 17:01:27 +01:00
Roland Geider
a770c97573
Add smoke test for the routine edit form
2025-01-21 20:58:57 +01:00
Roland Geider
5a39c6c229
Rename some functions, a bit of cleanup
2025-01-10 15:52:26 +01:00
Roland Geider
6bfcb3ebe9
Round the value of the slider
...
This prevents float values from being sent to the server
2025-01-07 21:02:22 +01:00
Roland Geider
462cc95979
Fix test
2025-01-06 22:01:33 +01:00
Roland Geider
5f89ab4b6f
Add missing max fields to the slot entry form
2025-01-06 20:28:14 +01:00
Roland Geider
1ad59486c2
Start implementing the expanded mode on the slot entry form
2025-01-05 22:49:00 +01:00
Roland Geider
ca6c682483
Remove more unused code
2025-01-05 20:17:26 +01:00
Roland Geider
b66aa7444d
Some polishing, adding missing fields and other QoL
2025-01-05 19:45:02 +01:00
Roland Geider
7794948f28
Cleanup
2024-11-17 01:08:47 +01:00
Roland Geider
aa6468ebc8
Use a slider to select the number of sets
2024-11-17 01:04:20 +01:00
Roland Geider
be28c27fd0
Give feedback to the user when the form is being saved
2024-11-17 00:24:25 +01:00
Roland Geider
8020bd21b6
More polish and i18n work
...
Also make sure that we don't update the routine while editing, since
some of the changes could pull the rug under our feet and felt strange.
Now there's a manual refresh button for the resulting routine
2024-11-16 22:21:27 +01:00