Garder trace du vendeur

This commit is contained in:
Vincent Vandemeulebrouck 2021-04-14 22:40:12 +02:00
parent a282575422
commit 413893bc67
2 changed files with 9 additions and 7 deletions

View File

@ -150,7 +150,9 @@ export class RdDItem extends Item {
let chatData = duplicate(Misc.data(this)); let chatData = duplicate(Misc.data(this));
const properties = this[`_${chatData.type}ChatData`](); const properties = this[`_${chatData.type}ChatData`]();
chatData["properties"] = properties chatData["properties"] = properties
if (this.actor){
chatData.actor = {id: this.actor.id };
}
//Check if the posted item should have availability/pay buttons //Check if the posted item should have availability/pay buttons
chatData.hasPrice = "cout" in chatData.data; chatData.hasPrice = "cout" in chatData.data;
chatData.data.cout_deniers = 0; chatData.data.cout_deniers = 0;

View File

@ -15,20 +15,20 @@
<b>Quantité: </b> <span class="postQuantity">{{postQuantity}}</span> <b>Quantité: </b> <span class="postQuantity">{{postQuantity}}</span>
{{/if}} {{/if}}
{{#if postPrice}} {{#if postPrice}}
<b>Prix: </b> <span class="postPrice">{{postPrice}} Sols</span><br> <b>Prix: </b> <span class="postPrice">{{postPrice}} Sols</span>
{{/if}} {{/if}}
</span> </span><br>
{{/if}} {{/if}}
{{#if finalPrice}}
<span> <span>
<b>Prix Total: </b> <span class="postPrice">{{finalPrice}} Sols</span><br> <b>Prix Total: </b> <span class="postPrice">{{finalPrice}} Sols</span><br>
</span> </span>
{{/if}}
</p> </p>
{{#if hasPrice}} {{#if hasPrice}}
<span class="chat-card-button-area"> <span class="chat-card-button-area">
<a class='payer-button chat-card-button market-button' data-jsondata='{{jsondata}}' <a class='payer-button chat-card-button market-button'
data-jsondata='{{jsondata}}'
{{#if actor.id}}data-actor-id='{{actor.id}}'{{/if}}
data-somme-denier="{{data.cout_deniers_total}}" data-quantite="{{data.quantite}}">Payer</a> data-somme-denier="{{data.cout_deniers_total}}" data-quantite="{{data.quantite}}">Payer</a>
</span> </span>
{{/if}} {{/if}}