stash
This commit is contained in:
parent
25cef95711
commit
7d7730354e
8 changed files with 381 additions and 39 deletions
|
|
@ -46,6 +46,11 @@
|
|||
<b-icon-trash></b-icon-trash>
|
||||
Delete
|
||||
</button>
|
||||
<button class="btn btn-secondary"
|
||||
@click="$router.push({path: '/print', query: {text: itemUrl}})">
|
||||
<b-icon-printer></b-icon-printer>
|
||||
Print label
|
||||
</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
|
@ -75,12 +80,18 @@ export default {
|
|||
},
|
||||
computed: {
|
||||
...mapGetters(["loaded_items", "getNameFromHandle"]),
|
||||
...mapState(["storage_locations"]),
|
||||
...mapState(["storage_locations", "user"]),
|
||||
item() {
|
||||
return this.loaded_items.find(item => item.id === parseInt(this.id)) || {}
|
||||
},
|
||||
location() {
|
||||
return this.storage_locations.find(loc => loc.id === this.item.storage_location) || null
|
||||
},
|
||||
itemUrl() {
|
||||
// The self-contained Item URL (see docs/design-in-progress/items-labels.md) - what
|
||||
// a printed label actually encodes, since scanning it has to resolve the right
|
||||
// frontend/backend/item with no other context, not just this browser's history.
|
||||
return `${window.location.origin}/i/${this.user}/${this.id}`
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue