Fix again achatVente
- remplacement des données/JSON dans le html par des Flags sur le ChatMessage - extraction de la gestion des infos de ventes pour rassembler la génération du ChatMessage - on ne perd plus la quantité ou le vendeur - attention au mergeObject: il modifie le premier parametre, ce qui modifiait parfois l'acteur (!!!) et toujours la quantité de l'objet du vendeur lors de la création de l'objet de l'acheteur!
This commit is contained in:
@ -1,3 +1,4 @@
|
||||
{{log 'chat-vente-item' this}}
|
||||
<div class="post-item" data-transfer="{{transfer}}">
|
||||
<h3>{{#if alias}}{{alias}} propose: {{else}}Acheter {{/if}}{{item.name}}</h3>
|
||||
{{#if item.img}}
|
||||
@ -12,7 +13,7 @@
|
||||
<hr>
|
||||
<p>
|
||||
{{#unless quantiteIllimite}}
|
||||
<span>Lots disponibles: <span class="quantiteNbLots">{{quantiteNbLots}}</span></span><br>
|
||||
<span>Lots disponibles: {{nbLots}}</span><br>
|
||||
{{/unless}}
|
||||
{{#if (gt tailleLot 1)}}
|
||||
<span>Lots de: <span class="tailleLot">{{tailleLot}}</span></span><br>
|
||||
@ -22,15 +23,9 @@
|
||||
<span class="prixLot">{{numberFormat prixLot decimals=2 sign=false}}</span> Sols</strong></span><br>
|
||||
{{/if}}
|
||||
</p>
|
||||
{{#if (or (gt quantiteNbLots 0) quantiteIllimite)}}
|
||||
{{#if (or (gt nbLots 0) quantiteIllimite)}}
|
||||
<span class="chat-card-button-area">
|
||||
<a class="button-acheter chat-card-button"
|
||||
data-jsondata='{{jsondata}}'
|
||||
{{#if vendeurId}}data-vendeurId='{{vendeurId}}'{{/if}}
|
||||
data-tailleLot="{{tailleLot}}"
|
||||
data-quantiteNbLots="{{quantiteNbLots}}"
|
||||
data-quantiteIllimite="{{#if quantiteIllimite}}true{{else}}false{{/if}}"
|
||||
data-prixLot="{{prixLot}}">
|
||||
<a class="button-acheter chat-card-button">
|
||||
{{#if (eq prixLot 0)}}Prendre{{else}}Acheter{{/if}}</a>
|
||||
</span>
|
||||
{{/if}}
|
||||
|
Reference in New Issue
Block a user