stash
This commit is contained in:
parent
5c3b7fc252
commit
bbe52e4a78
9 changed files with 817 additions and 287 deletions
|
|
@ -43,6 +43,9 @@
|
|||
<router-link v-if="shortIdLink(item)" :to="shortIdLink(item)">
|
||||
<b-icon-link></b-icon-link>
|
||||
</router-link>
|
||||
<router-link v-if="printLinkFor(item)" :to="printLinkFor(item)">
|
||||
<b-icon-qr-code></b-icon-qr-code>
|
||||
</router-link>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
|
@ -77,6 +80,10 @@
|
|||
class="btn btn-secondary btn-sm">
|
||||
<b-icon-link></b-icon-link>
|
||||
</router-link>
|
||||
<router-link v-if="printLinkFor(item)" :to="printLinkFor(item)"
|
||||
class="btn btn-secondary btn-sm">
|
||||
<b-icon-qr-code></b-icon-qr-code>
|
||||
</router-link>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -138,6 +145,17 @@ export default {
|
|||
if (owner_identity_id === undefined) return null
|
||||
return shortenedRoute({kind: 'item', owner_identity_id, item_local_id: item.id})
|
||||
},
|
||||
// Routes to Print.vue with this item's own raw identity - userHandle + id, the same shape
|
||||
// InventoryDetail.vue's own Print label button sends - rather than any pre-built link, so
|
||||
// the print page can derive every item template (item-handle, owner-handle, item-url,
|
||||
// the short link, …) itself and isn't tied to whichever one this button "suggests".
|
||||
// Group-owned items have no individual owner handle - short-id.js's group_item kind
|
||||
// resolves them via owner_group instead (see shortIdLink above) - so there's no
|
||||
// {userHandle, id} to build here yet; they get no print link until that's supported too.
|
||||
printLinkFor(item) {
|
||||
if (!item.owner) return null
|
||||
return {path: '/print', query: {kind: 'item', userHandle: item.owner, id: item.id}}
|
||||
},
|
||||
},
|
||||
async mounted() {
|
||||
await this.fetchInventoryItems()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue