Correction des updates multiples
Utilisation d'un render sur timer pour forcer le réaffichage
This commit is contained in:
+15
-1
@@ -116,7 +116,6 @@ export class RdDItem extends Item {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
static itemTypePluriel(type) {
|
||||
if (ITEM_TYPES[type]) {
|
||||
return ITEM_TYPES_PLURIEL[type] ?? (type + 's')
|
||||
@@ -175,6 +174,21 @@ export class RdDItem extends Item {
|
||||
super(docData, context);
|
||||
}
|
||||
|
||||
async _preCreate(data, options, user) {
|
||||
await this.parent?.delayedRenderSheet('_preCreateItem', data, options)
|
||||
return super._preCreate(data, options, user)
|
||||
}
|
||||
|
||||
async _preUpdate(changed, options, user) {
|
||||
await this.parent?.delayedRenderSheet('_preUpdateItem', changed, options)
|
||||
return super._preUpdate(changed, options, user)
|
||||
}
|
||||
|
||||
async _preDelete(options, user) {
|
||||
await this.parent?.delayedRenderSheet('_preDeleteItem', { id: this.id }, options)
|
||||
return super._preDelete(options, user)
|
||||
}
|
||||
|
||||
getUniteQuantite() {
|
||||
switch (this.type) {
|
||||
case ITEM_TYPES.monnaie: return "(Pièces)"
|
||||
|
||||
Reference in New Issue
Block a user