Fixed slot fill dialog to new parenting schema

This commit is contained in:
Thaum Rystra
2024-06-05 17:28:58 +02:00
parent b60dcc5e73
commit 37916e266d

View File

@@ -101,7 +101,7 @@
</div> </div>
</v-layout> </v-layout>
<div class="text-caption text-no-wrap text-truncate"> <div class="text-caption text-no-wrap text-truncate">
{{ libraryNames[libraryNode.ancestors[0].id ] }} {{ libraryNames[libraryNode.root.id ] }}
</div> </div>
</v-layout> </v-layout>
<div <div
@@ -440,14 +440,14 @@ export default {
alreadyAdded() { alreadyAdded() {
let added = new Set(); let added = new Set();
if (!this.model.unique) return added; if (!this.model.unique) return added;
let ancestorId; let rootId;
if (this.model.unique === 'uniqueInSlot') { if (this.model.unique === 'uniqueInSlot') {
ancestorId = this.model._id; rootId = this.model._id;
} else if (this.model.unique === 'uniqueInCreature') { } else if (this.model.unique === 'uniqueInCreature') {
ancestorId = this.creatureId; rootId = this.creatureId;
} }
CreatureProperties.find({ CreatureProperties.find({
'ancestors.id': ancestorId, 'root.id': rootId,
libraryNodeId: { $exists: true }, libraryNodeId: { $exists: true },
removed: { $ne: true }, removed: { $ne: true },
}, { }, {