Fix: affichage des descriptions

Pour les feuilles dérivées de RdDItemSheet, il faut appeler
super.getData() pour préparer les données à afficher dans le formulaire.
This commit is contained in:
Vincent Vandemeulebrouck 2022-12-17 20:06:51 +01:00
parent ceb4095c31
commit b2d8c2439a
3 changed files with 3 additions and 21 deletions

View File

@ -23,15 +23,8 @@ export class RdDRencontreItemSheet extends RdDItemSheet {
/* -------------------------------------------- */
async getData() {
const formData = duplicate(this.item);
const formData = await super.getData();
mergeObject(formData, {
title: formData.name,
isGM: game.user.isGM,
owner: this.actor?.isOwner,
isOwned: this.actor ? true : false,
actorId: this.actor?.id,
editable: this.isEditable,
cssClass: this.isEditable ? "editable" : "locked",
effets: {
succes: {
liste: RdDRencontre.getEffetsSucces(),

View File

@ -23,18 +23,9 @@ export class RdDSigneDraconiqueItemSheet extends RdDItemSheet {
/* -------------------------------------------- */
async getData() {
const formData = duplicate(this.item);
const formData = await super.getData();
this.tmrs = TMRUtility.buildSelectionTypesTMR(this.item.system.typesTMR);
mergeObject(formData, {
tmrs: this.tmrs,
title: formData.name,
isGM: game.user.isGM,
owner: this.actor?.isOwner,
isOwned: this.actor ? true : false,
actorId: this.actor?.id,
editable: this.isEditable,
cssClass: this.isEditable ? "editable" : "locked",
});
formData.tmrs = this.tmrs;
return formData;
}

View File

@ -9,9 +9,7 @@
<a class="item" data-tab="frequence">Fréquences</a>
{{/unless}}
</nav>
<section class="sheet-body">
<div class="tab items" data-group="primary" data-tab="rencontre">
{{#if isOwned}}
<div class="form-group">