Fixed folder groupStats behaviour when !groupStats

This commit is contained in:
Stefan Zermatten
2022-11-29 12:06:27 +02:00
parent 704314a7eb
commit e87772c2a3
6 changed files with 7 additions and 2 deletions

View File

@@ -61,6 +61,7 @@ export default {
const folderIds = CreatureProperties.find({ const folderIds = CreatureProperties.find({
'ancestors.id': this.creatureId, 'ancestors.id': this.creatureId,
type: 'folder', type: 'folder',
groupStats: true,
hideStatsGroup: true, hideStatsGroup: true,
removed: { $ne: true }, removed: { $ne: true },
inactive: { $ne: true }, inactive: { $ne: true },

View File

@@ -59,6 +59,7 @@ export default {
const folderIds = CreatureProperties.find({ const folderIds = CreatureProperties.find({
'ancestors.id': this.creatureId, 'ancestors.id': this.creatureId,
type: 'folder', type: 'folder',
groupStats: true,
hideStatsGroup: true, hideStatsGroup: true,
removed: { $ne: true }, removed: { $ne: true },
inactive: { $ne: true }, inactive: { $ne: true },

View File

@@ -145,6 +145,7 @@ export default {
return CreatureProperties.find({ return CreatureProperties.find({
'ancestors.id': this.creatureId, 'ancestors.id': this.creatureId,
type: 'folder', type: 'folder',
groupStats: true,
hideStatsGroup: true, hideStatsGroup: true,
removed: { $ne: true }, removed: { $ne: true },
inactive: { $ne: true }, inactive: { $ne: true },

View File

@@ -63,6 +63,7 @@ export default {
const folderIds = CreatureProperties.find({ const folderIds = CreatureProperties.find({
'ancestors.id': this.creatureId, 'ancestors.id': this.creatureId,
type: 'folder', type: 'folder',
groupStats: true,
hideStatsGroup: true, hideStatsGroup: true,
removed: { $ne: true }, removed: { $ne: true },
inactive: { $ne: true }, inactive: { $ne: true },

View File

@@ -81,6 +81,7 @@ export default {
return CreatureProperties.find({ return CreatureProperties.find({
'ancestors.id': this.creatureId, 'ancestors.id': this.creatureId,
type: 'folder', type: 'folder',
groupStats: true,
hideStatsGroup: true, hideStatsGroup: true,
removed: { $ne: true }, removed: { $ne: true },
inactive: { $ne: true }, inactive: { $ne: true },

View File

@@ -427,10 +427,10 @@ const propertyHandlers = {
folder(prop) { folder(prop) {
let skipChildren; let skipChildren;
let propPath = null; let propPath = null;
if (prop.hideStatsGroup) { if (prop.groupStats && prop.hideStatsGroup) {
skipChildren = true; skipChildren = true;
} }
if (prop.tab === 'stats') { if (prop.groupStats && prop.tab === 'stats') {
propPath = ['folder', prop.location] propPath = ['folder', prop.location]
} }
return { skipChildren, propPath } return { skipChildren, propPath }