refactor counter

This commit is contained in:
thomas girod
2024-07-21 10:44:43 +02:00
parent d9531838f2
commit 82d3791859
7 changed files with 98 additions and 139 deletions

View File

@ -14,9 +14,8 @@
{% if counter.type == 'BAR' %}
<h4>{% trans %}Barmen list{% endtrans %}</h4>
<ul>
{% set barmans_list = counter.get_barmen_list() %}
{% if barmans_list | length > 0 %}
{% for b in barmans_list %}
{% if counter.barmen_list | length > 0 %}
{% for b in counter.barmen_list %}
<li>{{ user_profile_link(b) }}</li>
{% endfor %}
{% else %}

View File

@ -41,9 +41,10 @@
<input type="submit" value="{% trans %}Go{% endtrans %}"/>
</form>
<h6>{% trans %}Registered cards{% endtrans %}</h6>
{% if customer.student_cards.exists() %}
{% if student_cards %}
<p>{{ student_cards }}</p>
<ul>
{% for card in customer.student_cards.all() %}
{% for card in student_cards %}
<li>{{ card.uid }}</li>
{% endfor %}
</ul>
@ -55,7 +56,7 @@
<div id="click_form">
<h5>{% trans %}Selling{% endtrans %}</h5>
<div>
{% set counter_click_url = url('counter:click', counter_id=counter.id, user_id=customer.user.id) %}
{% set counter_click_url = url('counter:click', counter_id=counter.id, user_id=customer.user_id) %}
{# Formulaire pour rechercher un produit en tapant son code dans une barre de recherche #}
<form method="post" action=""
@ -166,7 +167,7 @@
{%- endfor %}
</div>
</div>
{% endblock %}
{% endblock content %}
{% block script %}
{{ super() }}
@ -193,4 +194,4 @@
{%- endfor %}
];
</script>
{% endblock %}
{% endblock script %}