better handling of updating units and quantities
This commit is contained in:
@@ -62,7 +62,7 @@ $(document).ready(function(){
|
||||
<a class="btn btn-{% if item.is_suggestion %}primary{% else %}info{% endif %} btn-sm" name="{{ item.id }}" onclick='handleAddOne(this);'> + </a>
|
||||
{{ item.label }}</td>
|
||||
<td style="text-align: right">
|
||||
{% if item.quantity %}
|
||||
{% if item.quantity > 1 or item.unit != 'x' %}
|
||||
<a class="btn btn-outline-primary btn-sm" name="{{ item.id }}" onclick='handleAddWithQuantity(this, {{ item.quantity }} );'>{{ item.quantity }}{{ item.unit }}</a>
|
||||
|
||||
{% endif %}
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
{{ item.label }}
|
||||
</div>
|
||||
<div>
|
||||
{% if item.quantity > 1 %}
|
||||
{% if item.quantity > 1 or item.unit != 'x' %}
|
||||
{{ item.quantity }}{{ item.unit }}
|
||||
{% endif %}
|
||||
<img src="/static/categories/{{ item.category }}.svg" style="height: 2em;" alt="...">
|
||||
|
||||
Reference in New Issue
Block a user