Fixed parent.id => parentId

This commit is contained in:
Thaum Rystra
2024-03-26 09:58:01 +02:00
parent 0eb763dc0e
commit 352e89ee9a
13 changed files with 15 additions and 15 deletions

View File

@@ -204,7 +204,7 @@ export function getPropertyChildren(creatureId, property) {
return cloneProps.sort((a, b) => a.left - b.left); return cloneProps.sort((a, b) => a.left - b.left);
} else { } else {
return CreatureProperties.find({ return CreatureProperties.find({
'parent.id': property._id, 'parentId': property._id,
removed: { $ne: true }, removed: { $ne: true },
}, { }, {
sort: { order: 1 }, sort: { order: 1 },

View File

@@ -71,7 +71,7 @@ export default {
return CreatureProperties.find({ return CreatureProperties.find({
...getFilter.descendantsOfRoot(this.creatureId), ...getFilter.descendantsOfRoot(this.creatureId),
'parent.id': { 'parentId': {
$nin: folderIds, $nin: folderIds,
}, },
type: 'action', type: 'action',

View File

@@ -69,7 +69,7 @@ export default {
return CreatureProperties.find({ return CreatureProperties.find({
...getFilter.descendantsOfRoot(this.creatureId), ...getFilter.descendantsOfRoot(this.creatureId),
'parent.id': { 'parentId': {
$nin: folderIds, $nin: folderIds,
}, },
type: 'feature', type: 'feature',

View File

@@ -156,7 +156,7 @@ export default {
containers() { containers() {
return CreatureProperties.find({ return CreatureProperties.find({
...getFilter.descendantsOfRoot(this.creatureId), ...getFilter.descendantsOfRoot(this.creatureId),
'parent.id': { 'parend': {
$nin: this.folderIds, $nin: this.folderIds,
}, },
type: 'container', type: 'container',

View File

@@ -136,7 +136,7 @@ export default {
sort: { order: 1 }, sort: { order: 1 },
}).map(c => { }).map(c => {
c.items = CreatureProperties.find({ c.items = CreatureProperties.find({
'parent.id': c._id, 'parentId': c._id,
type: { $in: ['item', 'container'] }, type: { $in: ['item', 'container'] },
removed: { $ne: true }, removed: { $ne: true },
equipped: { $ne: true }, equipped: { $ne: true },

View File

@@ -188,7 +188,7 @@ export default {
const docName = this.doc.name; const docName = this.doc.name;
let parentHref = '/docs'; let parentHref = '/docs';
if (this.doc.parent) { if (this.doc.parent) {
const parent = Docs.findOne({ _id: this.doc.parent.id }); const parent = Docs.findOne({ _id: this.doc.parentId });
parentHref = parent?.href || parentHref; parentHref = parent?.href || parentHref;
} }
softRemoveDoc.call({ _id }, (error) => { softRemoveDoc.call({ _id }, (error) => {

View File

@@ -97,7 +97,7 @@ export default {
let currentDoc = undefined; let currentDoc = undefined;
this.path.split('/').forEach(urlName => { this.path.split('/').forEach(urlName => {
currentDoc = Docs.findOne({ currentDoc = Docs.findOne({
urlName, 'parent.id': currentDoc?._id, urlName, 'parentId': currentDoc?._id,
removed: { $ne: true }, removed: { $ne: true },
}) })
if (currentDoc) { if (currentDoc) {
@@ -116,7 +116,7 @@ export default {
sort: { order: 1 } sort: { order: 1 }
}); });
return Docs.find({ return Docs.find({
'parent.id': this.doc._id, 'parentId': this.doc._id,
removed: { $ne: true }, removed: { $ne: true },
}, { }, {
sort: { order: 1 } sort: { order: 1 }
@@ -125,7 +125,7 @@ export default {
siblingDocs() { siblingDocs() {
if (!this.doc) return []; if (!this.doc) return [];
return Docs.find({ return Docs.find({
'parent.id': this.doc.parent?.id, 'parentId': this.doc.parent?.id,
removed: { $ne: true }, removed: { $ne: true },
}, { }, {
sort: { order: 1 } sort: { order: 1 }

View File

@@ -41,7 +41,7 @@ export default {
properties() { properties() {
const props = []; const props = [];
CreatureProperties.find({ CreatureProperties.find({
'parent.id': this.model._id, 'parentId': this.model._id,
removed: { $ne: true }, removed: { $ne: true },
overridden: { $ne: true }, overridden: { $ne: true },
$or: [ $or: [

View File

@@ -34,7 +34,7 @@ export default {
properties() { properties() {
const props = []; const props = [];
CreatureProperties.find({ CreatureProperties.find({
'parent.id': this.model._id, 'parentId': this.model._id,
removed: { $ne: true }, removed: { $ne: true },
overridden: { $ne: true }, overridden: { $ne: true },
$or: [ $or: [

View File

@@ -52,7 +52,7 @@ export default {
}); });
const slotIds = slots.map(s => s._id); const slotIds = slots.map(s => s._id);
const slotChildren = CreatureProperties.find({ const slotChildren = CreatureProperties.find({
'parent.id': { $in: slotIds }, 'parentId': { $in: slotIds },
removed: { $ne: true }, removed: { $ne: true },
}, { }, {
sort: { order: 1 }, sort: { order: 1 },

View File

@@ -94,7 +94,7 @@ export default {
meteor: { meteor: {
items() { items() {
return CreatureProperties.find({ return CreatureProperties.find({
'parent.id': this.model._id, 'parentId': this.model._id,
type: { $in: ['item', 'container'] }, type: { $in: ['item', 'container'] },
removed: { $ne: true }, removed: { $ne: true },
equipped: { $ne: true }, equipped: { $ne: true },

View File

@@ -100,7 +100,7 @@ export default {
// Get the properties that need to be shown as a health bar // Get the properties that need to be shown as a health bar
return CreatureProperties.find({ return CreatureProperties.find({
'ancestors.id': this.model._id, 'ancestors.id': this.model._id,
'parent.id': { 'parentId': {
$nin: folderIds, $nin: folderIds,
}, },
type: 'attribute', type: 'attribute',

View File

@@ -297,7 +297,7 @@ export default {
// Get the properties that need to be shown as an icon // Get the properties that need to be shown as an icon
const filter = { const filter = {
'ancestors.id': this.creatureId, 'ancestors.id': this.creatureId,
'parent.id': { 'parentId': {
$nin: folderIds, $nin: folderIds,
}, },
$and: [ $and: [