Déplacement update competences

Placé sur les feuilles d'acteurs qui ont des compétences
This commit is contained in:
Vincent Vandemeulebrouck 2024-12-14 00:38:39 +01:00
parent 2d2b75e33f
commit ded92ddf2d
2 changed files with 13 additions and 15 deletions

View File

@ -48,6 +48,19 @@ export class RdDBaseActorReveSheet extends RdDBaseActorSheet {
}], { renderSheet: true })
)
if (this.options.vueDetaillee) {
// On carac change
this.html.find('.carac-value').change(async event => {
let caracName = event.currentTarget.name.replace(".value", "").replace("system.carac.", "");
this.actor.updateCarac(caracName, parseInt(event.target.value));
});
// On competence change
this.html.find('.competence-value').change(async event => {
let compName = event.currentTarget.attributes.compname.value;
//console.log("Competence changed :", compName);
this.actor.updateCompetence(compName, parseInt(event.target.value));
});
}
}
}

View File

@ -177,21 +177,6 @@ export class RdDBaseActorSheet extends ActorSheet {
this.options.vueDetaillee = !this.options.vueDetaillee;
this.render(true);
});
if (this.options.vueDetaillee) {
// On carac change
this.html.find('.carac-value').change(async event => {
let caracName = event.currentTarget.name.replace(".value", "").replace("system.carac.", "");
this.actor.updateCarac(caracName, parseInt(event.target.value));
});
// On competence change
this.html.find('.competence-value').change(async event => {
let compName = event.currentTarget.attributes.compname.value;
//console.log("Competence changed :", compName);
this.actor.updateCompetence(compName, parseInt(event.target.value));
});
}
}
_rechercherKeyup(event) {