Ajout bouton Item diminuer quantité

Pour diminuer la quantité des objets multiples sans avoir à éditer
This commit is contained in:
2023-03-30 02:56:06 +02:00
parent 2aa62cffe9
commit de56fa909a
5 changed files with 22 additions and 14 deletions

View File

@ -209,6 +209,14 @@ export class RdDItemSheet extends ItemSheet {
this.html.find('.item-vendre').click(async event => RdDSheetUtility.getItem(event, this.actor)?.proposerVente());
this.html.find('.item-montrer').click(async event => RdDSheetUtility.getItem(event, this.actor)?.postItemToChat());
this.html.find('.item-action').click(async event => RdDSheetUtility.getItem(event, this.actor)?.actionPrincipale(this.actor, async () => this.render(true)));
this.html.find('.item-quantite-plus').click(async event => {
await this.actor.itemQuantiteIncDec(RdDSheetUtility.getItemId(event), 1)
this.render();
});
this.html.find('.item-quantite-moins').click(async event => {
await this.actor.itemQuantiteIncDec(RdDSheetUtility.getItemId(event), -1)
this.render();
});
const updateItemTimestamp = (path, timestamp) => this.item.update({ [path]: duplicate(timestamp) })