Containers that have ancestor containers no longer show up in top level inventory
This commit is contained in:
@@ -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(){
|
||||
|
||||
Reference in New Issue
Block a user