delivery/forms.py : add class to uniquely identify dropdowns in frontend logic.
delivery/templates/ingredients.html : add update ingredients button and logic to enable / disable buttons.
delivery/views.py : add logic to detect main dish ingredients changes VS recipe, clear all day's ingredients when changing dish, separate update ingredients and next step logic, kitchen count step verifies prerequisites.
frontend/js/delivery.js : add logic to enable / disable button when UI dropdowns are modified.
Status
[X] READY
How to verify this change
Click on Kitchen count
Generate orders for the day
Click I'm ready to go to step 2 ingredients
Select a different main dish
The Restore button is disabled
The Confirm all ingredients button is enabled
The Next button is disabled
Add two sides ingredients
Click Update all ingredients
The Next button is enabled : click it to go to step 3
Verify Kitchen count main dish and its ingredients
Go back to step 2 Ingredients
Add main dish ingredients(s)
The Restore button is enabled
The Confirm all ingredients button is enabled
The Next button is disabled
Click Update all ingredients
The Confirm all ingredients button is disabled
The Next button is enabled : click it to go to step 3
Verify Kitchen count main dish and its ingredients
Go back to step 2 Ingredients
The Restore button is enabled
Click Restore
The Restore button is disabled
The Confirm all ingredients button is enabled
The Next button is disabled
Click Update all ingredients
The Confirm all ingredients button is disabled
The Next button is enabled : click it to go to step 3
Verify Kitchen count main dish and its ingredients
Go back to step 2 Ingredients
The Confirm all ingredients button is disabled
Change side dish ingredient(s)
The Confirm all ingredients button is enabled
The Next button is disabled
Click Update all ingredients
The Confirm all ingredients button is disabled
The Next button is enabled : click it to go to step 3
Verify Kitchen count main dish and its ingredients
New translatable strings
[X] If applicable, I have included updated .po files with new strings
Coverage increased (+0.02%) to 95.362% when pulling 8b840bae79f2ae9f5164c969ee6c9cab1cdb6930 on lamontfr:fix747 into a7c706878c1ea1ecee9164444686e8e811686c13 on savoirfairelinux:dev.
Coverage increased (+0.08%) to 95.42% when pulling 3843c1c1d9f83f7193c2e6324a30f6f9e7239091 on lamontfr:fix747 into a7c706878c1ea1ecee9164444686e8e811686c13 on savoirfairelinux:dev.
Fixes #747.
Changes proposed in this pull request:
update ingredients
button and logic to enable / disable buttons.Status
How to verify this change
New translatable strings