diff --git a/counter/models.py b/counter/models.py index 7ec0c573..038a546a 100644 --- a/counter/models.py +++ b/counter/models.py @@ -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 diff --git a/counter/templates/counter/activity.jinja b/counter/templates/counter/activity.jinja index d8a21aa1..65d5a8e3 100644 --- a/counter/templates/counter/activity.jinja +++ b/counter/templates/counter/activity.jinja @@ -8,13 +8,21 @@ {% block content %}

{% trans counter_name=counter %}{{ counter_name }} activity{% endtrans %}

{% if counter.type == 'BAR' %} -

{% trans %}Barman list{% endtrans %}

+

{% trans %}Barmen list{% endtrans %}

{% endif %} + + +
{% trans %}Legend{% endtrans %}
+ : {% trans %}counter is open, there's at least one barman connected{% endtrans %} +
+ ? : {% trans %}counter is open but not active, the last sale was done at least 10 minutes ago {% endtrans %} +
+ : {% trans %}counter is not open : no one is connected{% endtrans %} {% endblock %}