Action Refoulement de queue

This commit is contained in:
Vincent Vandemeulebrouck
2022-09-16 23:27:26 +02:00
parent 63c6d5ff0f
commit 1251d04860
8 changed files with 64 additions and 52 deletions

View File

@ -1424,6 +1424,15 @@ export class RdDActor extends Actor {
}
}
/* -------------------------------------------- */
async actionRefoulement(item) {
const refoulement = item?.system.refoulement ?? 0;
if (refoulement>0){
await this.ajouterRefoulement(refoulement);
await item.delete();
}
}
/* -------------------------------------------- */
async ajouterRefoulement(value = 1) {
let refoulement = this.system.reve.refoulement.value + value;
@ -1924,6 +1933,7 @@ export class RdDActor extends Actor {
}
return;
}
case 'queue': case 'ombre': return await this.actionRefoulement(item);
}
}