mirror of
https://github.com/almet/copanier.git
synced 2025-04-28 19:42:37 +02:00
Cosmetic changes
This commit is contained in:
parent
4dbd9d8e34
commit
406e8a5c3d
2 changed files with 35 additions and 25 deletions
|
@ -311,6 +311,18 @@ class Delivery(PersistedBase):
|
||||||
max_age = self.from_date.date() - timedelta(days=60)
|
max_age = self.from_date.date() - timedelta(days=60)
|
||||||
return any([product.last_update.date() < max_age for product in products])
|
return any([product.last_update.date() < max_age for product in products])
|
||||||
|
|
||||||
|
@property
|
||||||
|
def dates(self):
|
||||||
|
delivery_date = self.from_date.date()
|
||||||
|
return {
|
||||||
|
"creation_date": self.order_before - timedelta(weeks=4),
|
||||||
|
"price_update_start": self.order_before - timedelta(weeks=4),
|
||||||
|
"price_update_deadline": self.order_before - timedelta(weeks=2),
|
||||||
|
"order_before": self.order_before,
|
||||||
|
"adjustment_deadline": self.order_before + timedelta(days=4),
|
||||||
|
"delivery_date": delivery_date
|
||||||
|
}
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def has_products(self):
|
def has_products(self):
|
||||||
return len(self.products) > 0
|
return len(self.products) > 0
|
||||||
|
@ -495,15 +507,3 @@ class Delivery(PersistedBase):
|
||||||
percentage_person = person_amount / producer_total
|
percentage_person = person_amount / producer_total
|
||||||
shipping = percentage_person * producer_shipping
|
shipping = percentage_person * producer_shipping
|
||||||
return shipping
|
return shipping
|
||||||
|
|
||||||
@property
|
|
||||||
def dates(self):
|
|
||||||
delivery_date = self.from_date.date()
|
|
||||||
return {
|
|
||||||
"creation_date": self.order_before - timedelta(weeks=4),
|
|
||||||
"price_update_start": self.order_before - timedelta(weeks=4),
|
|
||||||
"price_update_deadline": self.order_before - timedelta(weeks=2),
|
|
||||||
"order_before": self.order_before,
|
|
||||||
"adjustment_deadline": self.order_before + timedelta(days=4),
|
|
||||||
"delivery_date": delivery_date
|
|
||||||
}
|
|
||||||
|
|
|
@ -11,6 +11,7 @@
|
||||||
{% set display_counts = True %}
|
{% set display_counts = True %}
|
||||||
{% include "includes/delivery_head.html" %}
|
{% include "includes/delivery_head.html" %}
|
||||||
|
|
||||||
|
<h2>Rappel des dates</h2>
|
||||||
<table class="pure-table fixed-table">
|
<table class="pure-table fixed-table">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
|
@ -63,22 +64,31 @@
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<h3>Emails des référent⋅e⋅s</h3>
|
<h2>Emails des référent⋅e⋅s</h2>
|
||||||
<p>Au cas où, quoi.</p>
|
<p>Ça peut être utile pour leur envoyer un email groupé.</p>
|
||||||
<textarea class="list-emails" rows=5>{{ referents | join(', ') }}</textarea>
|
<textarea class="list-emails" rows=5>{{ referents | join(', ') }}</textarea>
|
||||||
|
|
||||||
<h3>Avant et pendant la distribution</h3>
|
<h2>Quelques liens utiles</h2>
|
||||||
<a class="button" href="/distribution/{{ delivery.id }}/edit"><i class="icon-pencil"></i> Modifier la commande (dates, lieu, référent⋅e, etc)</a>
|
|
||||||
<a class="button" href="/produits/{{ delivery.id }}"><i class="icon-pencil"></i> Modifier les produits, les product⋅rices⋅eurs</a>
|
|
||||||
<a class="button" href="/groupes"><i class="icon-globe"></i> Gérer les groupes / colocs</a>
|
|
||||||
|
|
||||||
<h3>Une fois les commandes passées (après le {{ delivery.order_before|date }})</h3>
|
Avant et pendant la distribution :
|
||||||
<a class="button" href="/produits/{{ delivery.id }}/produits.pdf"><i class="icon-download"></i> Télécharger les bons de distribution</a>
|
<ul>
|
||||||
<a class="button" href="/distribution/{{ delivery.id }}/rapport-complet.xlsx"><i class="icon-download"></i> Télécharger le tableau des commandes</a>
|
<li><a href="/groupes"><i class="icon-globe"></i> Gérer les groupes / colocs</a></li>
|
||||||
<a class="button" href="/distribution/{{ delivery.id }}/envoi-email-referentes"><i class="icon-envelope"></i> Envoyer les infos de commande aux référent⋅e⋅s</a>
|
<li><a href="/distribution/{{ delivery.id }}/edit"><i class="icon-pencil"></i> Modifier la commande (dates, lieu, référent⋅e, etc)</a></li>
|
||||||
|
<li><a href="/produits/{{ delivery.id }}"><i class="icon-pencil"></i> Gérer les produits</a></li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
<h3>Pour préparer la distribution (le {{ delivery.from_date|date }})</h3>
|
Une fois les commandes passées :
|
||||||
<a class="button" href="/distribution/{{ delivery.id }}/émargement"><i class="icon-document"></i> Fiches de commandes par groupe</a>
|
<ul>
|
||||||
<a class="button" href="/distribution/{{ delivery.id }}/solde"><i class="icon-gears"></i> Faire la répartition des paiements</a>
|
<li><a href="/produits/{{ delivery.id }}/produits.pdf"><i class="icon-download"></i> Télécharger la liste des produits commandés</a></li>
|
||||||
|
<li><a href="/distribution/{{ delivery.id }}/rapport-complet.xlsx"><i class="icon-download"></i> Télécharger le tableau des commandes</a></li>
|
||||||
|
<li><a href="/distribution/{{ delivery.id }}/envoi-email-referentes"><i class="icon-envelope"></i> Envoyer les infos de commande aux référent⋅e⋅s</a></li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
Pour préparer la distribution :
|
||||||
|
|
||||||
|
<ul>
|
||||||
|
<li><a href="/distribution/{{ delivery.id }}/émargement"><i class="icon-document"></i> Fiches de commandes par groupe</a></li>
|
||||||
|
<li><a href="/distribution/{{ delivery.id }}/solde"><i class="icon-gears"></i> Faire la répartition des paiements</a></li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
Loading…
Reference in a new issue