From ba48adab6dee434213c9cb7a58d4d48e114b3c46 Mon Sep 17 00:00:00 2001
From: Skia
Date: Fri, 29 Jul 2016 13:00:32 +0200
Subject: [PATCH] Improve launderette plannings and admin part
---
core/templates/core/user_tools.jinja | 5 +
launderette/migrations/0003_machine_type.py | 20 +++
.../migrations/0004_token_start_date.py | 22 +++
launderette/models.py | 10 +-
.../launderette/launderette_book.jinja | 23 ++-
.../launderette/launderette_detail.jinja | 9 +-
launderette/urls.py | 3 +
launderette/views.py | 105 +++++++++---
locale/fr/LC_MESSAGES/django.mo | Bin 20085 -> 20385 bytes
locale/fr/LC_MESSAGES/django.po | 150 ++++++++----------
10 files changed, 232 insertions(+), 115 deletions(-)
create mode 100644 launderette/migrations/0003_machine_type.py
create mode 100644 launderette/migrations/0004_token_start_date.py
diff --git a/core/templates/core/user_tools.jinja b/core/templates/core/user_tools.jinja
index a577ed71..e88ccb16 100644
--- a/core/templates/core/user_tools.jinja
+++ b/core/templates/core/user_tools.jinja
@@ -16,12 +16,17 @@
{% if user.is_in_group(settings.SITH_MAIN_BOARD_GROUP) or user.is_in_group(settings.SITH_GROUPS['root']['name']) %}
{% trans %}Subscriptions{% endtrans %}
{% endif %}
+ {% trans %}Launderette{% endtrans %}
+ {% if user.is_in_group(settings.SITH_GROUPS['launderette-admin']['name']) %}
+ {% trans %}Launderette{% endtrans %}
+ {% endif %}
{% trans %}Counters{% endtrans %}
{% if user.is_in_group(settings.SITH_GROUPS['counter-admin']['name']) or user.is_in_group(settings.SITH_GROUPS['root']['name']) %}
+ {% trans %}General management{% endtrans %}
- {% trans %}General counters management{% endtrans %}
- {% trans %}Products management{% endtrans %}
- {% trans %}Products type management{% endtrans %}
diff --git a/launderette/migrations/0003_machine_type.py b/launderette/migrations/0003_machine_type.py
new file mode 100644
index 00000000..fa23c679
--- /dev/null
+++ b/launderette/migrations/0003_machine_type.py
@@ -0,0 +1,20 @@
+# -*- coding: utf-8 -*-
+from __future__ import unicode_literals
+
+from django.db import migrations, models
+
+
+class Migration(migrations.Migration):
+
+ dependencies = [
+ ('launderette', '0002_auto_20160729_0138'),
+ ]
+
+ operations = [
+ migrations.AddField(
+ model_name='machine',
+ name='type',
+ field=models.CharField(choices=[('WASHING', 'Washing'), ('DRYING', 'Drying')], max_length=10, default='WASHING', verbose_name='type'),
+ preserve_default=False,
+ ),
+ ]
diff --git a/launderette/migrations/0004_token_start_date.py b/launderette/migrations/0004_token_start_date.py
new file mode 100644
index 00000000..f610a6cc
--- /dev/null
+++ b/launderette/migrations/0004_token_start_date.py
@@ -0,0 +1,22 @@
+# -*- coding: utf-8 -*-
+from __future__ import unicode_literals
+
+from django.db import migrations, models
+from django.utils.timezone import utc
+import datetime
+
+
+class Migration(migrations.Migration):
+
+ dependencies = [
+ ('launderette', '0003_machine_type'),
+ ]
+
+ operations = [
+ migrations.AddField(
+ model_name='token',
+ name='start_date',
+ field=models.DateTimeField(default=datetime.datetime(2016, 7, 29, 10, 46, 13, 675691, tzinfo=utc), verbose_name='start date'),
+ preserve_default=False,
+ ),
+ ]
diff --git a/launderette/models.py b/launderette/models.py
index d458d2e2..741df23f 100644
--- a/launderette/models.py
+++ b/launderette/models.py
@@ -35,6 +35,7 @@ class Launderette(models.Model):
class Machine(models.Model):
name = models.CharField(_('name'), max_length=30)
launderette = models.ForeignKey(Launderette, related_name='machines', verbose_name=_('launderette'))
+ type = models.CharField(_('type'), max_length=10, choices=[('WASHING', _('Washing')), ('DRYING', _('Drying'))])
is_working = models.BooleanField(_('is working'), default=True)
class Meta:
@@ -49,12 +50,16 @@ class Machine(models.Model):
return False
def __str__(self):
- return "%s - Launderette: %s - Working: %s" % (self.name, self.launderette, self.is_working)
+ return "%s %s" % (self._meta.verbose_name, self.name)
+
+ def get_absolute_url(self):
+ return reverse('launderette:launderette_details', kwargs={"launderette_id": self.launderette.id})
class Token(models.Model):
name = models.IntegerField(_('name'))
launderette = models.ForeignKey(Launderette, related_name='tokens', verbose_name=_('launderette'))
type = models.CharField(_('type'), max_length=10, choices=[('WASHING', _('Washing')), ('DRYING', _('Drying'))])
+ start_date = models.DateTimeField(_('start date'))
class Meta:
verbose_name = _('Token')
@@ -81,6 +86,7 @@ class Slot(models.Model):
return super(Slot, self).full_clean()
def __str__(self):
- return str(self.user) + " - " + str(self.start_date)
+ return "User: %s - Date: %s - Type: %s - Machine: %s - Token: %s" % (self.user, self.start_date, self.get_type_display(),
+ self.machine.name, self.token)
diff --git a/launderette/templates/launderette/launderette_book.jinja b/launderette/templates/launderette/launderette_book.jinja
index d7f54d01..6eca751a 100644
--- a/launderette/templates/launderette/launderette_book.jinja
+++ b/launderette/templates/launderette/launderette_book.jinja
@@ -7,13 +7,29 @@
{% macro choose(date) %}
{% endmacro %}
{% block content %}
-{% if request.user.is_in_group(settings.SITH_MAIN_MEMBERS_GROUP) %}
+{{ launderette }}
+
+
+
+
+
@@ -28,7 +44,7 @@
{% for hours in planning.values() %}
{% if hours[i] %}
- {{ hours[i]|localtime|time(TIME_FORMAT) }} {{ choose(hours[i]) }}
+ {{ hours[i]|time(TIME_FORMAT) }} {{ choose(hours[i]) }}
{% endif %}
|
{% endfor %}
@@ -36,7 +52,6 @@
{% endfor %}
-{% endif %}
{% endblock %}
diff --git a/launderette/templates/launderette/launderette_detail.jinja b/launderette/templates/launderette/launderette_detail.jinja
index 44885117..b94c018b 100644
--- a/launderette/templates/launderette/launderette_detail.jinja
+++ b/launderette/templates/launderette/launderette_detail.jinja
@@ -5,7 +5,14 @@
{% endblock %}
{% block content %}
-Admin
+{% trans %}Machines{% endtrans %}
+{% trans %}New machine{% endtrans %}
+
{% endblock %}
diff --git a/launderette/urls.py b/launderette/urls.py
index fe045885..6444f36c 100644
--- a/launderette/urls.py
+++ b/launderette/urls.py
@@ -11,6 +11,9 @@ urlpatterns = [
url(r'^admin/(?P[0-9]+)$', LaunderetteDetailView.as_view(), name='launderette_details'),
url(r'^admin/(?P[0-9]+)/edit$', LaunderetteEditView.as_view(), name='launderette_edit'),
url(r'^admin/new$', LaunderetteCreateView.as_view(), name='launderette_new'),
+ url(r'^admin/machine/new$', MachineCreateView.as_view(), name='machine_new'),
+ url(r'^admin/machine/(?P[0-9]+)/edit$', MachineEditView.as_view(), name='machine_edit'),
+ url(r'^admin/machine/(?P[0-9]+)/delete$', MachineDeleteView.as_view(), name='machine_delete'),
]
diff --git a/launderette/views.py b/launderette/views.py
index 7c2fa6f5..3b9a9ae8 100644
--- a/launderette/views.py
+++ b/launderette/views.py
@@ -1,5 +1,6 @@
from datetime import datetime, timedelta
from collections import OrderedDict
+import pytz
from django.shortcuts import render
from django.views.generic import ListView, DetailView, RedirectView, TemplateView
@@ -7,9 +8,10 @@ from django.views.generic.edit import UpdateView, CreateView, DeleteView, Proces
from django.forms.models import modelform_factory
from django.forms import CheckboxSelectMultiple
from django.utils.translation import ugettext as _
-from django.utils.timezone import make_aware
from django.utils import dateparse
+from django.core.urlresolvers import reverse_lazy
from django.conf import settings
+from django.db import transaction
from core.models import Page
from core.views import CanViewMixin, CanEditMixin, CanEditPropMixin, CanCreateMixin
@@ -33,27 +35,50 @@ class LaunderetteBookMainView(CanViewMixin, ListView):
model = Launderette
template_name = 'launderette/launderette_book_choose.jinja'
-class LaunderetteBookView(DetailView):
+class LaunderetteBookView(CanViewMixin, DetailView):
"""Display the launderette schedule"""
model = Launderette
pk_url_kwarg = "launderette_id"
template_name = 'launderette/launderette_book.jinja'
- def post(self, request, *args, **kwargs):
- self.object = self.get_object()
- if 'slot' in request.POST.keys() and request.user.is_authenticated():
- subscriber = get_subscriber(request.user)
- if subscriber.is_subscribed():
- date = dateparse.parse_datetime(request.POST['slot'])
- for m in self.object.machines.filter(is_working=True).all():
- slot = Slot.objects.filter(start_date=date, machine=m).first()
- print(slot)
- if slot is None:
- Slot(user=subscriber, start_date=date, machine=m, type="WASHING").save()
- print("Saved")
- break
+ def get(self, request, *args, **kwargs):
+ self.slot_type = "BOTH"
+ self.machines = {}
return super(LaunderetteBookView, self).get(request, *args, **kwargs)
+ def post(self, request, *args, **kwargs):
+ self.slot_type = "BOTH"
+ self.machines = {}
+ with transaction.atomic():
+ self.object = self.get_object()
+ if 'slot_type' in request.POST.keys():
+ self.slot_type = request.POST['slot_type']
+ if 'slot' in request.POST.keys() and request.user.is_authenticated():
+ self.subscriber = get_subscriber(request.user)
+ if self.subscriber.is_subscribed():
+ self.date = dateparse.parse_datetime(request.POST['slot']).replace(tzinfo=pytz.UTC)
+ if self.slot_type == "WASHING":
+ if self.check_slot(self.slot_type):
+ Slot(user=self.subscriber, start_date=self.date, machine=self.machines[self.slot_type], type=self.slot_type).save()
+ elif self.slot_type == "DRYING":
+ if self.check_slot(self.slot_type):
+ Slot(user=self.subscriber, start_date=self.date, machine=self.machines[self.slot_type], type=self.slot_type).save()
+ else:
+ if self.check_slot("WASHING") and self.check_slot("DRYING", self.date + timedelta(hours=1)):
+ Slot(user=self.subscriber, start_date=self.date, machine=self.machines["WASHING"], type="WASHING").save()
+ Slot(user=self.subscriber, start_date=self.date + timedelta(hours=1),
+ machine=self.machines["DRYING"], type="DRYING").save()
+ return super(LaunderetteBookView, self).get(request, *args, **kwargs)
+
+ def check_slot(self, type, date=None):
+ if date is None: date = self.date
+ for m in self.object.machines.filter(is_working=True, type=type).all():
+ slot = Slot.objects.filter(start_date=date, machine=m).first()
+ if slot is None:
+ self.machines[type] = m
+ return True
+ return False
+
@staticmethod
def date_iterator(startDate, endDate, delta=timedelta(days=1)):
currentDate = startDate
@@ -65,16 +90,20 @@ class LaunderetteBookView(DetailView):
""" Add page to the context """
kwargs = super(LaunderetteBookView, self).get_context_data(**kwargs)
kwargs['planning'] = OrderedDict()
- start_date = make_aware(datetime.now().replace(hour=0, minute=0, second=0, microsecond=0))
+ kwargs['slot_type'] = self.slot_type
+ start_date = datetime.now().replace(hour=0, minute=0, second=0, microsecond=0, tzinfo=pytz.UTC)
for date in LaunderetteBookView.date_iterator(start_date, start_date+timedelta(days=6), timedelta(days=1)):
kwargs['planning'][date] = []
for h in LaunderetteBookView.date_iterator(date, date+timedelta(days=1), timedelta(hours=1)):
free = False
- for m in self.object.machines.filter(is_working=True).all():
- s = Slot.objects.filter(start_date=h, machine=m).first()
- if s is None:
- free = True
- if free and make_aware(datetime.now()) < h:
+ if self.slot_type == "BOTH" and self.check_slot("WASHING", h) and self.check_slot("DRYING", h + timedelta(hours=1)):
+ print("GUY")
+ free = True
+ elif self.slot_type == "WASHING" and self.check_slot("WASHING", h):
+ free = True
+ elif self.slot_type == "DRYING" and self.check_slot("DRYING", h):
+ free = True
+ if free and datetime.now().replace(tzinfo=pytz.UTC) < h:
kwargs['planning'][date].append(h)
else:
kwargs['planning'][date].append(None)
@@ -105,5 +134,37 @@ class LaunderetteEditView(CanViewMixin, UpdateView):
class LaunderetteCreateView(CanCreateMixin, CreateView):
"""Create a new launderette"""
model = Launderette
- fields = ['name', 'sellers']
+ fields = ['name']
template_name = 'core/create.jinja'
+
+
+class MachineEditView(CanEditPropMixin, UpdateView):
+ """Edit a machine"""
+ model = Machine
+ pk_url_kwarg = "machine_id"
+ fields = ['name', 'launderette', 'type', 'is_working']
+ template_name = 'core/edit.jinja'
+
+class MachineDeleteView(CanEditPropMixin, DeleteView):
+ """Edit a machine"""
+ model = Machine
+ pk_url_kwarg = "machine_id"
+ template_name = 'core/delete_confirm.jinja'
+ success_url = reverse_lazy('launderette:launderette_list')
+
+class MachineCreateView(CanCreateMixin, CreateView):
+ """Create a new machine"""
+ model = Machine
+ fields = ['name', 'launderette', 'type']
+ template_name = 'core/create.jinja'
+
+ def get_initial(self):
+ ret = super(MachineCreateView, self).get_initial()
+ if 'launderette' in self.request.GET.keys():
+ obj = Launderette.objects.filter(id=int(self.request.GET['launderette'])).first()
+ if obj is not None:
+ ret['launderette'] = obj.id
+ return ret
+
+
+
diff --git a/locale/fr/LC_MESSAGES/django.mo b/locale/fr/LC_MESSAGES/django.mo
index 29621bbb11cbbc5ce17439130473f1bda2d78bdd..bfad99ae07f497fc4ba7d1be04a2e56910906d7f 100644
GIT binary patch
delta 7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;%jP=Vun5C31PKT`gfh$I#eor#MH9j|%#|4pL9M4~OVp2QiVJM~}j
zQer!yV=K{?_6&cGKl5-R;f7j+I6?eQ+(|r7Y$o~>u|yy@e}#=lPwEN8wKPn(#xKk(
zF_~Cz^=)PwuK&`?0hFDHO5c%ohXZ|^7wkGchShA?oI^V@9J%W7qq;(4NZO(ik
zG_)`&Kd&e+-*;L5=wP3($MRs`#NyJxu)#ZDm{vV4Y4Va51u;uL>b=YNT%Y1#->LqG
Yf_w)`9|;MmzIl35S%q)f(A>bk03t1^;{X5v
diff --git a/locale/fr/LC_MESSAGES/django.po b/locale/fr/LC_MESSAGES/django.po
index ddb49138..dbff0900 100644
--- a/locale/fr/LC_MESSAGES/django.po
+++ b/locale/fr/LC_MESSAGES/django.po
@@ -6,7 +6,7 @@
msgid ""
msgstr ""
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2016-07-28 20:02+0200\n"
+"POT-Creation-Date: 2016-07-29 12:46+0200\n"
"PO-Revision-Date: 2016-07-18\n"
"Last-Translator: Skia \n"
"Language-Team: AE info \n"
@@ -19,7 +19,7 @@ msgstr ""
#: accounting/models.py:32 accounting/models.py:55 accounting/models.py:94
#: club/models.py:18 counter/models.py:38 counter/models.py:63
#: counter/models.py:91 launderette/models.py:12 launderette/models.py:36
-#: launderette/models.py:52
+#: launderette/models.py:59
msgid "name"
msgstr "nom"
@@ -32,7 +32,7 @@ msgid "account number"
msgstr "numero de compte"
#: accounting/models.py:92 club/models.py:109 counter/models.py:237
-#: launderette/models.py:68
+#: launderette/models.py:62 launderette/models.py:76
msgid "start date"
msgstr "date de début"
@@ -116,12 +116,12 @@ msgstr "Il n'y a pas de types comptable dans ce site web."
#: accounting/templates/accounting/bank_account_details.jinja:5
#: accounting/templates/accounting/club_account_details.jinja:5
#: accounting/templates/accounting/journal_details.jinja:5
-#: core/templates/core/user_tools.jinja:38
+#: core/templates/core/user_tools.jinja:43
msgid "Accounting"
msgstr "Comptabilité"
#: accounting/templates/accounting/bank_account_details.jinja:8
-#: core/templates/core/user_tools.jinja:45
+#: core/templates/core/user_tools.jinja:50
msgid "Bank account: "
msgstr "Compte en banque : "
@@ -148,7 +148,7 @@ msgstr "Nouveau compte club"
#: accounting/templates/accounting/journal_details.jinja:51
#: club/templates/club/club_detail.jinja:7 core/templates/core/page.jinja:31
#: core/templates/core/user_base.jinja:8
-#: core/templates/core/user_tools.jinja:32
+#: core/templates/core/user_tools.jinja:37
#: counter/templates/counter/counter_list.jinja:15
#: counter/templates/counter/counter_list.jinja:18
#: launderette/templates/launderette/launderette_list.jinja:14
@@ -158,6 +158,7 @@ msgstr "Éditer"
#: accounting/templates/accounting/bank_account_details.jinja:19
#: accounting/templates/accounting/bank_account_list.jinja:16
#: core/templates/core/group_list.jinja:13
+#: launderette/templates/launderette/launderette_detail.jinja:13
msgid "Delete"
msgstr "Supprimer"
@@ -206,8 +207,6 @@ msgstr "Fin"
#: accounting/templates/accounting/journal_details.jinja:23
#: counter/templates/counter/user_account.jinja:17
#: counter/templates/counter/user_account.jinja:63
-#: launderette/templates/launderette/user_account.jinja:17
-#: launderette/templates/launderette/user_account.jinja:63
msgid "Amount"
msgstr "Montant"
@@ -241,7 +240,6 @@ msgstr "Voir"
#: accounting/templates/accounting/journal_details.jinja:10
#: counter/templates/counter/user_account.jinja:9
-#: launderette/templates/launderette/user_account.jinja:9
msgid "Amount: "
msgstr "Montant: "
@@ -265,9 +263,6 @@ msgstr "No"
#: counter/templates/counter/user_account.jinja:15
#: counter/templates/counter/user_account.jinja:36
#: counter/templates/counter/user_account.jinja:61
-#: launderette/templates/launderette/user_account.jinja:15
-#: launderette/templates/launderette/user_account.jinja:36
-#: launderette/templates/launderette/user_account.jinja:61
msgid "Date"
msgstr "Date"
@@ -320,7 +315,7 @@ msgid "You can not make loops in clubs"
msgstr "Vous ne pouvez pas faire de boucles dans les clubs"
#: club/models.py:107 eboutic/models.py:12 eboutic/models.py:45
-#: launderette/models.py:72
+#: launderette/models.py:80
msgid "user"
msgstr "nom d'utilisateur"
@@ -376,7 +371,6 @@ msgstr "Éditer le club"
#: core/templates/core/page_prop.jinja:8
#: core/templates/core/pagerev_edit.jinja:24
#: counter/templates/counter/counter_edit.jinja:8
-#: launderette/templates/launderette/counter_edit.jinja:8
#: subscription/templates/subscription/subscription.jinja:12
msgid "Save"
msgstr "Sauver"
@@ -406,7 +400,7 @@ msgid "Add"
msgstr "Ajouter"
#: club/templates/club/club_tools.jinja:4
-#: core/templates/core/user_tools.jinja:56
+#: core/templates/core/user_tools.jinja:61
msgid "Club tools"
msgstr "Outils club"
@@ -605,7 +599,6 @@ msgstr "Confirmation"
#: core/templates/core/delete_confirm.jinja:8
#: counter/templates/counter/counter_click.jinja:67
-#: launderette/templates/launderette/counter_click.jinja:67
msgid "Cancel"
msgstr "Annuler"
@@ -656,7 +649,6 @@ msgstr "Merci de vous identifier pour voir cette page."
#: core/templates/core/login.jinja:22
#: counter/templates/counter/counter_main.jinja:48
-#: launderette/templates/launderette/counter_main.jinja:48
msgid "login"
msgstr "login"
@@ -890,27 +882,39 @@ msgstr "Gestion de Sith"
msgid "Subscriptions"
msgstr "Cotisations"
-#: core/templates/core/user_tools.jinja:22
+#: core/templates/core/user_tools.jinja:19
+#: core/templates/core/user_tools.jinja:21 launderette/models.py:16
+#: launderette/templates/launderette/launderette_book.jinja:4
+#: launderette/templates/launderette/launderette_book_choose.jinja:4
+#: launderette/templates/launderette/launderette_main.jinja:4
+msgid "Launderette"
+msgstr "Laverie"
+
+#: core/templates/core/user_tools.jinja:26
msgid "Counters"
msgstr "Comptoirs"
-#: core/templates/core/user_tools.jinja:25
+#: core/templates/core/user_tools.jinja:29
+msgid "General management"
+msgstr "Gestion générale"
+
+#: core/templates/core/user_tools.jinja:30
msgid "General counters management"
msgstr "Gestion générale des comptoirs"
-#: core/templates/core/user_tools.jinja:26
+#: core/templates/core/user_tools.jinja:31
msgid "Products management"
msgstr "Gestion des produits"
-#: core/templates/core/user_tools.jinja:27
+#: core/templates/core/user_tools.jinja:32
msgid "Products type management"
msgstr "Gestion des types de produit"
-#: core/templates/core/user_tools.jinja:41
+#: core/templates/core/user_tools.jinja:46
msgid "General accounting"
msgstr "Comptabilité générale"
-#: core/templates/core/user_tools.jinja:49
+#: core/templates/core/user_tools.jinja:54
msgid "Club account: "
msgstr "Compte club : "
@@ -993,70 +997,56 @@ msgid "permanency"
msgstr "permanence"
#: counter/templates/counter/counter_click.jinja:20
-#: launderette/templates/launderette/counter_click.jinja:20
msgid "Counter"
msgstr "Comptoir"
#: counter/templates/counter/counter_click.jinja:22
-#: launderette/templates/launderette/counter_click.jinja:22
msgid "Club: "
msgstr "Club : "
#: counter/templates/counter/counter_click.jinja:25
-#: launderette/templates/launderette/counter_click.jinja:25
msgid "Customer"
msgstr "Client"
#: counter/templates/counter/counter_click.jinja:30
-#: launderette/templates/launderette/counter_click.jinja:30
msgid "Refilling"
msgstr "Rechargement"
#: counter/templates/counter/counter_click.jinja:35
#: counter/templates/counter/counter_click.jinja:48
-#: launderette/templates/launderette/counter_click.jinja:35
-#: launderette/templates/launderette/counter_click.jinja:48
msgid "Go"
msgstr "Valider"
#: counter/templates/counter/counter_click.jinja:40
-#: launderette/templates/launderette/counter_click.jinja:40
msgid "Selling"
msgstr "Vente"
#: counter/templates/counter/counter_click.jinja:42
-#: launderette/templates/launderette/counter_click.jinja:42
msgid "Not enough money"
msgstr "Solde insuffisant"
#: counter/templates/counter/counter_click.jinja:50
#: eboutic/templates/eboutic/eboutic_main.jinja:23
#: eboutic/templates/eboutic/eboutic_makecommand.jinja:7
-#: launderette/templates/launderette/counter_click.jinja:50
msgid "Basket: "
msgstr "Panier : "
#: counter/templates/counter/counter_click.jinja:58
#: counter/templates/counter/counter_main.jinja:24
#: eboutic/templates/eboutic/eboutic_main.jinja:30
-#: launderette/templates/launderette/counter_click.jinja:58
-#: launderette/templates/launderette/counter_main.jinja:24
msgid "Total: "
msgstr "Total : "
#: counter/templates/counter/counter_click.jinja:62
-#: launderette/templates/launderette/counter_click.jinja:62
msgid "Finish"
msgstr "Terminer"
#: counter/templates/counter/counter_click.jinja:69
#: eboutic/templates/eboutic/eboutic_main.jinja:37
-#: launderette/templates/launderette/counter_click.jinja:69
msgid "Products: "
msgstr "Produits : "
#: counter/templates/counter/counter_edit.jinja:4
-#: launderette/templates/launderette/counter_edit.jinja:4
msgid "Edit counter"
msgstr "Éditer le comptoir"
@@ -1074,135 +1064,107 @@ msgid "There is no counters in this website."
msgstr "Il n'y a pas de comptoirs dans ce site web."
#: counter/templates/counter/counter_main.jinja:12
-#: launderette/templates/launderette/counter_main.jinja:12
#, python-format
msgid "%(counter_name)s counter"
msgstr "Comptoir %(counter_name)s"
#: counter/templates/counter/counter_main.jinja:15
-#: launderette/templates/launderette/counter_main.jinja:15
msgid "Sellings"
msgstr "Ventes"
#: counter/templates/counter/counter_main.jinja:17
-#: launderette/templates/launderette/counter_main.jinja:17
msgid "Last selling: "
msgstr "Dernière vente : "
#: counter/templates/counter/counter_main.jinja:18
-#: launderette/templates/launderette/counter_main.jinja:18
msgid "Client: "
msgstr "Client : "
#: counter/templates/counter/counter_main.jinja:18
-#: launderette/templates/launderette/counter_main.jinja:18
msgid "New amount: "
msgstr "Nouveau montant : "
#: counter/templates/counter/counter_main.jinja:27
-#: launderette/templates/launderette/counter_main.jinja:27
msgid "Enter client code:"
msgstr "Entrez un code client : "
#: counter/templates/counter/counter_main.jinja:31
-#: launderette/templates/launderette/counter_main.jinja:31
msgid "validate"
msgstr "valider"
#: counter/templates/counter/counter_main.jinja:34
-#: launderette/templates/launderette/counter_main.jinja:34
msgid "Please, login"
msgstr "Merci de vous identifier"
#: counter/templates/counter/counter_main.jinja:39
-#: launderette/templates/launderette/counter_main.jinja:39
msgid "Barman: "
msgstr "Barman : "
#: counter/templates/counter/product_list.jinja:4
#: counter/templates/counter/product_list.jinja:10
-#: launderette/templates/launderette/product_list.jinja:4
-#: launderette/templates/launderette/product_list.jinja:10
msgid "Product list"
msgstr "Liste des produits"
#: counter/templates/counter/product_list.jinja:8
-#: launderette/templates/launderette/product_list.jinja:8
msgid "New product"
msgstr "Nouveau produit"
#: counter/templates/counter/product_list.jinja:17
-#: launderette/templates/launderette/product_list.jinja:17
msgid "There is no products in this website."
msgstr "Il n'y a pas de produits dans ce site web."
#: counter/templates/counter/producttype_list.jinja:4
#: counter/templates/counter/producttype_list.jinja:10
-#: launderette/templates/launderette/producttype_list.jinja:4
-#: launderette/templates/launderette/producttype_list.jinja:10
msgid "Product type list"
msgstr "Liste des types de produit"
#: counter/templates/counter/producttype_list.jinja:8
-#: launderette/templates/launderette/producttype_list.jinja:8
msgid "New product type"
msgstr "Nouveau type de produit"
#: counter/templates/counter/producttype_list.jinja:17
-#: launderette/templates/launderette/producttype_list.jinja:17
msgid "There is no product types in this website."
msgstr "Il n'y a pas de types de produit dans ce site web."
#: counter/templates/counter/user_account.jinja:4
-#: launderette/templates/launderette/user_account.jinja:4
#, python-format
msgid "%(user_name)s's account"
msgstr "Compte de %(user_name)s"
#: counter/templates/counter/user_account.jinja:8
-#: launderette/templates/launderette/user_account.jinja:8
msgid "User account"
msgstr "Compte utilisateur"
#: counter/templates/counter/user_account.jinja:11
-#: launderette/templates/launderette/user_account.jinja:11
msgid "Refillings"
msgstr "Rechargements"
#: counter/templates/counter/user_account.jinja:16
#: counter/templates/counter/user_account.jinja:37
-#: launderette/templates/launderette/user_account.jinja:16
-#: launderette/templates/launderette/user_account.jinja:37
msgid "Barman"
msgstr "Barman"
#: counter/templates/counter/user_account.jinja:32
-#: launderette/templates/launderette/user_account.jinja:32
msgid "Buyings"
msgstr "Achats"
#: counter/templates/counter/user_account.jinja:38
-#: launderette/templates/launderette/user_account.jinja:38
msgid "Product"
msgstr "Produit"
#: counter/templates/counter/user_account.jinja:39
-#: launderette/templates/launderette/user_account.jinja:39
msgid "Quantity"
msgstr "Quantité"
#: counter/templates/counter/user_account.jinja:40
-#: launderette/templates/launderette/user_account.jinja:40
msgid "Total"
msgstr "Total"
#: counter/templates/counter/user_account.jinja:57
-#: launderette/templates/launderette/user_account.jinja:57
msgid "Invoices"
msgstr "Factures"
#: counter/templates/counter/user_account.jinja:62
-#: launderette/templates/launderette/user_account.jinja:62
msgid "Items"
msgstr "Articles"
@@ -1293,52 +1255,68 @@ msgstr "Vous n'avez pas assez d'argent pour acheter le panier"
msgid "sellers"
msgstr "vendeurs"
-#: launderette/models.py:16
-#: launderette/templates/launderette/launderette_book.jinja:4
-#: launderette/templates/launderette/launderette_main.jinja:4
-msgid "Launderette"
-msgstr "Laverie"
-
-#: launderette/models.py:37 launderette/models.py:53
+#: launderette/models.py:37 launderette/models.py:60
msgid "launderette"
msgstr "laverie"
-#: launderette/models.py:38
-msgid "is working"
-msgstr "est HS"
-
-#: launderette/models.py:41
-msgid "Machine"
-msgstr "Machine"
-
-#: launderette/models.py:54 launderette/models.py:69
+#: launderette/models.py:38 launderette/models.py:61 launderette/models.py:77
msgid "type"
msgstr "type"
-#: launderette/models.py:54 launderette/models.py:69
+#: launderette/models.py:38 launderette/models.py:61 launderette/models.py:77
+#: launderette/templates/launderette/launderette_book.jinja:26
msgid "Washing"
msgstr "Lavage"
-#: launderette/models.py:54 launderette/models.py:69
+#: launderette/models.py:38 launderette/models.py:61 launderette/models.py:77
+#: launderette/templates/launderette/launderette_book.jinja:30
msgid "Drying"
msgstr "Séchage"
-#: launderette/models.py:57
+#: launderette/models.py:39
+msgid "is working"
+msgstr "fonctionne"
+
+#: launderette/models.py:42
+msgid "Machine"
+msgstr "Machine"
+
+#: launderette/models.py:65
msgid "Token"
msgstr "Jeton"
-#: launderette/models.py:70
+#: launderette/models.py:78
msgid "machine"
msgstr "machine"
-#: launderette/models.py:71
+#: launderette/models.py:79
msgid "token"
msgstr "jeton"
+#: launderette/models.py:83
+msgid "Slot"
+msgstr "Créneau"
+
+#: launderette/templates/launderette/launderette_book.jinja:11
+msgid "Choose"
+msgstr "Choisir"
+
+#: launderette/templates/launderette/launderette_book.jinja:22
+msgid "Washing and drying"
+msgstr "Lavage et séchage"
+
#: launderette/templates/launderette/launderette_detail.jinja:4
msgid "Launderette admin"
msgstr "Gestion de la laverie"
+#: launderette/templates/launderette/launderette_detail.jinja:8
+msgid "Machines"
+msgstr "Machines"
+
+#: launderette/templates/launderette/launderette_detail.jinja:9
+msgid "New machine"
+msgstr "Nouvelle machine"
+
#: launderette/templates/launderette/launderette_list.jinja:4
#: launderette/templates/launderette/launderette_list.jinja:10
msgid "Launderette admin list"