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() { async getData() {
const formData = duplicate(this.item); const formData = await super.getData();
mergeObject(formData, { 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: { effets: {
succes: { succes: {
liste: RdDRencontre.getEffetsSucces(), liste: RdDRencontre.getEffetsSucces(),

View File

@ -23,18 +23,9 @@ export class RdDSigneDraconiqueItemSheet extends RdDItemSheet {
/* -------------------------------------------- */ /* -------------------------------------------- */
async getData() { async getData() {
const formData = duplicate(this.item); const formData = await super.getData();
this.tmrs = TMRUtility.buildSelectionTypesTMR(this.item.system.typesTMR); this.tmrs = TMRUtility.buildSelectionTypesTMR(this.item.system.typesTMR);
mergeObject(formData, { formData.tmrs = this.tmrs;
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",
});
return formData; return formData;
} }

View File

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