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);
} else {
return CreatureProperties.find({
'parent.id': property._id,
'parentId': property._id,
removed: { $ne: true },
}, {
sort: { order: 1 },

View File

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

View File

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

View File

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

View File

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

View File

@@ -188,7 +188,7 @@ export default {
const docName = this.doc.name;
let parentHref = '/docs';
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;
}
softRemoveDoc.call({ _id }, (error) => {

View File

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

View File

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

View File

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

View File

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

View File

@@ -94,7 +94,7 @@ export default {
meteor: {
items() {
return CreatureProperties.find({
'parent.id': this.model._id,
'parentId': this.model._id,
type: { $in: ['item', 'container'] },
removed: { $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
return CreatureProperties.find({
'ancestors.id': this.model._id,
'parent.id': {
'parentId': {
$nin: folderIds,
},
type: 'attribute',

View File

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