Skip to content

Commit

Permalink
Fix meal selection for santropolroulant#93
Browse files Browse the repository at this point in the history
  • Loading branch information
guillaumep committed Feb 28, 2024
1 parent f73572c commit 62292bd
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

setuptools.setup(
name="souschef",
version="1.3.8dev3",
version="1.3.8dev4",
license="AGPL-3.0",
author="Santropol Roulant and Savoir Faire Linux",
author_email="[email protected]",
Expand Down
2 changes: 1 addition & 1 deletion souschef/delivery/templates/ingredients.html
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ <h1 class="ui header">{% trans "Pick ingredients" %}</h1>
</div>

<form class="ui form" action="{% url 'delivery:meal' %}" method="post">
<input type="hidden" name="delivery_date" value="{{ delivery_date.isoformat }}">
<div class="ui stackable relaxed grid container">
<div class="six wide column">
{{form.errors}}
Expand Down Expand Up @@ -80,7 +81,6 @@ <h1 class="ui header">{% trans "Pick ingredients" %}</h1>
<a class="ui labeled icon big button" href="{% url 'delivery:order' %}?delivery_date={{ delivery_date.isoformat }}">
<i class="chevron left icon"></i>{% trans "Back" %}
</a>
<input type="hidden" name="delivery_date" value="{{ delivery_date.isoformat }}">
<input class="ui big yellow button confirmingredients {% if not ingredients_changed %}disabled{% endif %}" type="submit" value="{% trans "Confirm all ingredients" %}" name="_update" />
<a class="ui labeled icon yellow big button nextkitchencount {% if ingredients_changed %}disabled{% endif %}" href="{% url 'delivery:kitchen_count' %}?delivery_date={{ delivery_date.isoformat }}">
<i class="chevron right icon"></i>{% trans "Next: Print Kitchen Count" %}
Expand Down
2 changes: 1 addition & 1 deletion souschef/delivery/templates/kitchen_count_steps.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<div class="ui four ordered steps">
<a class="{% if step == 'orders' %} active{% endif %} step" href="{% url 'delivery:order' %}?delivery_date={{ delivery_date.isoformat }}">
<div class="content">
<div class="title">{% trans 'Generate orders' %}</div>
<div class="title">{% trans 'Review orders' %}</div>
<div class="description">{% trans 'Generate and review orders.' %}</div>
</div>
</a>
Expand Down
4 changes: 2 additions & 2 deletions souschef/delivery/templates/review_orders.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<div class="ui secondary pointing fluid menu">
<h1 class="ui header">
{% if delivery_date %}
{% trans "Generate and Review orders" %}
{% trans "Review orders" %}
{% else %}
{% trans "Kitchen Count" %}
{% endif %}
Expand Down Expand Up @@ -95,7 +95,7 @@ <h1 class="ui header">
<h4 class="ui horizontal divider header">
<i class="unhide icon"></i>
{% blocktrans trimmed %}
Review order for {{ delivery_date }}
Review orders for {{ delivery_date }}
{% endblocktrans %}
</h4>

Expand Down
3 changes: 2 additions & 1 deletion souschef/frontend/js/delivery.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ $(function() {

$('.ui.dropdown.maindish.selection').dropdown('setting', 'onChange', function(value, text, $selectedItem) {
$url = $(".field.dish.selection").data('url');
window.location.replace($url+value);
var deliveryDate = $("input[name=delivery_date]").val();
window.location.replace($url+value+"?delivery_date="+deliveryDate);
});

$('.ui.dropdown.mainingredients.selection').dropdown('setting', 'onChange', function(value, text, $selectedItem) {
Expand Down

0 comments on commit 62292bd

Please sign in to comment.