Commit be7e0401 authored by Lo-J's avatar Lo-J Committed by Skia

Fix the number of minutes for a counter to be inactive to 10

parent 63f10c13
......@@ -223,10 +223,10 @@ class Counter(models.Model):
def is_inactive(self):
"""
Returns True if the counter self is inactive from 5 minutes, else False
Returns True if the counter self is inactive from 10 minutes, else False
"""
if (self.is_open()):
return ((timezone.now() - self.permanencies.model.objects.order_by('-activity').first().activity) > datetime.timedelta(minutes=5))
return ((timezone.now() - self.permanencies.model.objects.order_by('-activity').first().activity) > datetime.timedelta(minutes=10))
else:
return False
......
......@@ -8,13 +8,21 @@
{% block content %}
<h3>{% trans counter_name=counter %}{{ counter_name }} activity{% endtrans %}</h3>
{% if counter.type == 'BAR' %}
<h4>{% trans %}Barman list{% endtrans %}</h4>
<h4>{% trans %}Barmen list{% endtrans %}</h4>
<ul>
{% for b in counter.get_barmen_list() %}
<li>{{ user_profile_link(b) }}</li>
{% endfor %}
</ul>
{% endif %}
<h5>{% trans %}Legend{% endtrans %}</h5>
<span style="color: green">&#x2713;</span> : {% trans %}counter is open, there's at least one barman connected{% endtrans %}
<br>
<span style="color: orange">&#x3f;</span> : {% trans %}counter is open but not active, the last sale was done at least 10 minutes ago {% endtrans %}
<br>
<span style="color: red">&#10007;</span> : {% trans %}counter is not open : no one is connected{% endtrans %}
{% endblock %}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment