stash
This commit is contained in:
parent
7c91661be2
commit
796fef81be
37 changed files with 3404 additions and 108 deletions
|
|
@ -109,16 +109,21 @@ export default {
|
|||
},
|
||||
computed: {
|
||||
...mapGetters(["inventory_items", "loaded_items"]),
|
||||
...mapState(["user"]),
|
||||
...mapState(["user", "storage_locations"]),
|
||||
},
|
||||
methods: {
|
||||
...mapActions(["fetchInventoryItems", "deleteInventoryItem"]),
|
||||
...mapActions(["fetchInventoryItems", "deleteInventoryItem", "fetchStorageLocations"]),
|
||||
only_images(files) {
|
||||
return files.filter(file => file.mime_type.startsWith("image/"));
|
||||
},
|
||||
locationPath(item) {
|
||||
const loc = this.storage_locations.find(loc => loc.id === item.storage_location)
|
||||
return loc ? loc.path : null
|
||||
},
|
||||
},
|
||||
async mounted() {
|
||||
await this.fetchInventoryItems()
|
||||
await this.fetchStorageLocations()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue