Fixed parent.id => parentId
This commit is contained in:
@@ -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 },
|
||||||
|
|||||||
@@ -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',
|
||||||
|
|||||||
@@ -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',
|
||||||
|
|||||||
@@ -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',
|
||||||
|
|||||||
@@ -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 },
|
||||||
|
|||||||
@@ -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) => {
|
||||||
|
|||||||
@@ -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 }
|
||||||
|
|||||||
@@ -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: [
|
||||||
|
|||||||
@@ -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: [
|
||||||
|
|||||||
@@ -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 },
|
||||||
|
|||||||
@@ -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 },
|
||||||
|
|||||||
@@ -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',
|
||||||
|
|||||||
@@ -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: [
|
||||||
|
|||||||
Reference in New Issue
Block a user