Containers that have ancestor containers no longer show up in top level inventory

This commit is contained in:
Stefan Zermatten
2020-03-13 11:42:19 +02:00
parent 0e71d1c719
commit c1aacb9ebe

View File

@@ -31,7 +31,7 @@
group="inventory"
/>
</v-card>
<div v-for="container in containers" :key="container._id">
<div v-for="container in containersWithoutAncestorContainers" :key="container._id">
<container-card
:model="container"
:organize="organize"
@@ -69,6 +69,18 @@ export default {
sort: {order: 1},
});
},
containersWithoutAncestorContainers(){
return CreatureProperties.find({
'ancestors.id': {
$eq: this.creatureId,
$nin: this.containerIds
},
type: 'container',
removed: {$ne: true},
}, {
sort: {order: 1},
});
},
},
computed: {
containerIds(){