some fix
This commit is contained in:
@@ -164,7 +164,7 @@ export class TwentyQuestionsDialog extends FormApplication {
|
|||||||
this._addOwnedItem(item, stepKey);
|
this._addOwnedItem(item, stepKey);
|
||||||
|
|
||||||
// TODO specific event (no added honor if tech selected etc)
|
// TODO specific event (no added honor if tech selected etc)
|
||||||
console.log(this.object.data, this.cache);
|
// console.log(this.object.data, this.cache);
|
||||||
|
|
||||||
this.render(false);
|
this.render(false);
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
@@ -237,7 +237,10 @@ export class TwentyQuestionsDialog extends FormApplication {
|
|||||||
*/
|
*/
|
||||||
_addOwnedItem(item, stepName) {
|
_addOwnedItem(item, stepName) {
|
||||||
// Add to Step (uniq id only)
|
// Add to Step (uniq id only)
|
||||||
const step = getProperty(this.object.data, stepName);
|
let step = getProperty(this.object.data, stepName);
|
||||||
|
if (!step) {
|
||||||
|
step = [];
|
||||||
|
}
|
||||||
if (step.some((e) => e === item.id)) {
|
if (step.some((e) => e === item.id)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -308,6 +308,9 @@ export class TwentyQuestions {
|
|||||||
const exceed = {};
|
const exceed = {};
|
||||||
TwentyQuestions[listName].forEach((formName) => {
|
TwentyQuestions[listName].forEach((formName) => {
|
||||||
const id = getProperty(this.data, formName);
|
const id = getProperty(this.data, formName);
|
||||||
|
if (id === "none") {
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (!store[id]) {
|
if (!store[id]) {
|
||||||
store[id] = 0;
|
store[id] = 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<fieldset data-step="{{stepName}}" class="tq-drag-n-drop">
|
<fieldset data-step="{{stepName}}" class="tq-drag-n-drop">
|
||||||
<ul class="item-list">
|
<ul class="item-list">
|
||||||
{{#each itemsList as |item id|}}
|
{{#each itemsList as |item id|}}
|
||||||
{{> 'systems/l5r5e/templates/items/property/property-entry.html' item=item id=id }}
|
{{> 'systems/l5r5e/templates/items/property/property-entry.html' item=item id=id editable=../options.editable }}
|
||||||
{{/each}}
|
{{/each}}
|
||||||
</ul>
|
</ul>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
|
|||||||
Reference in New Issue
Block a user