tarification: taux de réduction au lieu d'un tarif minimum unique, on a besoin de matrices de tarif minimum (#89605) #186
No reviewers
Labels
No Label
No Milestone
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: entrouvert/lingo#186
Loading…
Reference in New Issue
No description provided.
Delete Branch "wip/89605-pricing-reduction-min-price"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
09005b9613
to8678ec90dc
WIP: tarification: taux de réduction au lieu d'un tarif minimum unique, on a besoin de matrices de tarif minimum (#89605)to tarification: taux de réduction au lieu d'un tarif minimum unique, on a besoin de matrices de tarif minimum (#89605)(Je commence à relire.)
Un premier bout de relecture, surtout des remarques de forme, dis-moi ce que tu en penses, je referai un tour ensuite.
@ -585,3 +595,3 @@
return self.get_extra_variables(request, context)
def format_pricing_data(self):
def format_pricing_data(self, field):
Par principe je me disais peut-être mettre une valeur par défaut
field='pricing'
pour ce nouveau paramètre histoire de ne pas casser l’interface existante (?)ok, j'ai ajouté un fixup
Ok top.
@ -21,2 +21,4 @@
</form>
{% endblock %}
{% block sidebar %}
Question d’UI, à relire l’héritage de gabarits j’ai l’impression qu’on ajoute une barre latérale vide à chaque fois, ici et dans les gabarits suivants, je loupe un truc ou bien c’est volontaire que d’avoir hérité de manager_pricing_parameters pour ensuite effacer le contenu de la barre latérale qui y était défini ?
L'héritage c'est surtout pour avoir les breadcrumbs et pouvoir en ajouter un.
Ah ok j’avais loupé ça, merci.
@ -48,0 +20,4 @@
<button aria-controls="panel-matrix" aria-selected="true" id="tab-matrix" role="tab" tabindex="0">{% trans "Pricings" context 'amount' %}</button>
{% if object.kind == 'effort' %}
<button aria-controls="panel-pricing-options" aria-selected="false" id="tab-pricing-options" role="tab" tabindex="-1">{% trans "Pricing options" %}</button>
{% endif %}
(Juste in elif ici pour gagner une ligne ? 🙂)
yep, fixup :)
Top.
@ -275,0 +77,4 @@
<ul>
<li>{% trans "Minimal pricing:" %} {{ object.min_pricing|default_if_none:"" }}</li>
</ul>
{% if object.kind == 'effort' %}
Un if pas nécessaire ici, il reprend exactement la même condition que le if du bloc parent.
en effet, fixup
@ -275,0 +86,4 @@
<a class="pk-button" rel="popup" href="{% url 'lingo-manager-pricing-pricingoptions-edit' object.pk %}">{% trans "Edit pricing options" %}</a>
</div>
</div>
{% endif %}
(Pareil ici peut-être juste un elif car les conditions sont mutuellement exclues ?)
fixup aussi
@ -5,3 +5,3 @@
{{ block.super }}
{% if matrix.criteria %}
<a href="{% url 'lingo-manager-pricing-matrix-slug-edit' object.pk matrix.criteria.slug %}">{% trans "Edit pricing" %}</a>
<a href="{% url 'lingo-manager-pricing-matrix-slug-edit' object.pk matrix.criteria.slug %}">{% trans "Edit pricing" context 'matrix' %}</a>
Pas compris ici pourquoi il y a besoin d’un contexte i.e. de quelles autres façons ce “Edit pricing” pourrait se traduire ?
On pourrait traduire par "modification de la grille tarifaire" ou "modification du tarif", ou encore "modification des tarifs".
Ca dépend du contexte, en somme :)
Ok j’avais clairement pas saisi cette nuance dans les traductions, très bien.
(Je vais refaire un tour à tête reposée mais a priori on n’est pas loin du ack.)
Ok j’ai refait un tour plus diagonalisant, rien à redire, c’est bon pour moi.
688d5157c2
to6448b16220