-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
#157731614 Add Dropset Support #20
Conversation
Pull Request Test Coverage Report for Build 351
💛 - Coveralls |
work on the failing tests |
wger/core/static/js/wger-core.js
Outdated
@@ -452,6 +466,7 @@ function updateAllExerciseFormset() { | |||
$formsets.append(data); | |||
$('#exercise-search-log').scrollTop(0); | |||
$formsets.trigger('create'); | |||
console.log('value: ', setValue); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove this statement
@@ -8,33 +8,33 @@ | |||
wgerSetupSortable(); | |||
|
|||
// Init the modal dialog to edit the exercise | |||
wgerFormModalDialog(); | |||
// wgerFormModalDialog(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are you commenting this line?
"category": "dropset" | ||
} | ||
} | ||
] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add new line
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do remove the multiple migration files you have. We need to have one migration per django app
Change the |
2f7ef20
to
481c689
Compare
481c689
to
97d9e5e
Compare
97d9e5e
to
4a4e72b
Compare
4a4e72b
to
46e5a7d
Compare
46e5a7d
to
2e9b7e3
Compare
2e9b7e3
to
7ce194b
Compare
7ce194b
to
3d594fb
Compare
3d594fb
to
cfaaabc
Compare
cfaaabc
to
a355553
Compare
a355553
to
56f1c95
Compare
@dondrzzy, awesome job. Please don't forget to run autopep8 command to fix all pep8 issues in the new lines of code you added. Coveralls is still complaining though. |
This commit adds a feature that allows users to add dropset workouts. Users define the workout on creation as a dropset. Create new model WorkoutType, alter field reps in Setting Add category field to Setting model as a foreign key. Add workout to the returned response for url `workout/day/1/log/add/` and `workout/set/day/<id>/set/add` Add handle workoutype change event handler to `workoutType` button in `wger/manager/templates/set/add.html` through `wger/core/static/js/wger-core.js` [Delivers #157731614]
56f1c95
to
580ddc3
Compare
What does this PR do?
This PR creates a feature that enables users to add dropset workouts.
Add
changeWorkoutTyp
e function towger/core/static/js/wger-core.js
Add a onClick event handler to function to
addEntry button
inwger/manager/templates/day/log.html
Add functionality to enable adding new sets to the existing sets in
wger/manager/views/log.py
Create new model WorkoutType, add category field to Setting model as a
foreign key.
Description of Task to be completed?
Add support for dropsets((https://en.wikipedia.org/wiki/Drop_set)
How should this be manually tested?
1: Clone the application and install the requirements in your virtual environment.
2: Update the database settings in the
settings.py
file with your postgres user, password and database name.3: Run the application with
python manage.py runserver
.4: Register and login.
5: Hover over
Workouts
in the navbar menu and selectWorkouts
.6: Add a
workout
then aday
anddescription
then add anexercise
to the workout:7: Add an initial weight and amount
8: You should be able to declare a workout type as a
dropset
ordefault
workout.Expected response
8: Click save and you should view the created workout as a dropset workout.
Expected response
9: Go to
Workouts
->carlendar
and add new log to the workout of the day respectively.10: You should be able to add a new dropset reports while you work out.
Expected response
Any background context you want to provide?
This feature was not available.
What are the relevant pivotal tracker stories?
#157731614