implement basic multi-day support
This commit is contained in:
parent
4a3ffb5ac6
commit
d7fc530201
10 changed files with 98 additions and 44 deletions
|
|
@ -20,7 +20,7 @@
|
|||
{% for counter in self::range(10) %}
|
||||
{% if loop.index as i32 <= food.target_servings %}
|
||||
<label class="ok">
|
||||
{% if loop.index as i32 <= food.actual_servings %}
|
||||
{% if loop.index as i32 <= food.servings_eaten %}
|
||||
<input type="button" hx-post="/set/{{ food.id }}/to/{{ loop.index as i32 - 1}}" hx-target="#card-{{ food.id }}" value="●" class="checked">
|
||||
{% else %}
|
||||
<input type="button" hx-post="/set/{{ food.id }}/to/{{ loop.index as i32 }}" hx-target="#card-{{ food.id }}" value="●" class="unchecked">
|
||||
|
|
@ -28,7 +28,7 @@
|
|||
</label>
|
||||
{% else %}
|
||||
<label class="bad">
|
||||
{% if loop.index as i32 <= food.actual_servings %}
|
||||
{% if loop.index as i32 <= food.servings_eaten %}
|
||||
<input type="button" hx-post="/set/{{ food.id }}/to/{{ loop.index as i32 - 1}}" hx-target="#card-{{ food.id }}" value="●" class="checked">
|
||||
{% else %}
|
||||
<input type="button" hx-post="/set/{{ food.id }}/to/{{ loop.index as i32 }}" hx-target="#card-{{ food.id }}" value="●" class="unchecked">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue