stash
This commit is contained in:
parent
5c3b7fc252
commit
bbe52e4a78
9 changed files with 817 additions and 287 deletions
|
|
@ -46,6 +46,9 @@
|
|||
<router-link v-if="shortIdLink(location)" :to="shortIdLink(location)">
|
||||
<b-icon-link></b-icon-link>
|
||||
</router-link>
|
||||
<router-link v-if="printLinkFor(location)" :to="printLinkFor(location)">
|
||||
<b-icon-qr-code></b-icon-qr-code>
|
||||
</router-link>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
|
@ -79,6 +82,10 @@
|
|||
class="btn btn-secondary btn-sm">
|
||||
<b-icon-link></b-icon-link>
|
||||
</router-link>
|
||||
<router-link v-if="printLinkFor(location)" :to="printLinkFor(location)"
|
||||
class="btn btn-secondary btn-sm">
|
||||
<b-icon-qr-code></b-icon-qr-code>
|
||||
</router-link>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -126,6 +133,14 @@ export default {
|
|||
if (owner_identity_id === undefined) return null
|
||||
return shortenedRoute({kind: 'storage_location', owner_identity_id, storage_location_id: location.id})
|
||||
},
|
||||
// Routes to Print.vue with this location's own raw identity - userHandle + id - rather
|
||||
// than any pre-built link, the same shape Inventory.vue's printLinkFor sends for an item
|
||||
// (see label.js's "storage-location" LABEL_FIELD_BUILDERS entry). Locations are always
|
||||
// individually owned (see StorageLocationViewSet.get_queryset), so unlike Inventory.vue's
|
||||
// version this never has to fall back to "no metadata available".
|
||||
printLinkFor(location) {
|
||||
return {path: '/print', query: {kind: 'storage-location', userHandle: location.owner, id: location.id}}
|
||||
},
|
||||
},
|
||||
async mounted() {
|
||||
await this.fetchStorageLocations()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue