stash
This commit is contained in:
parent
8d96bc97c4
commit
ed04d98bf1
54 changed files with 661 additions and 1214 deletions
|
|
@ -128,9 +128,8 @@ export default {
|
|||
},
|
||||
methods: {
|
||||
...mapActions(["fetchInventoryItems", "deleteInventoryItem", "fetchStorageLocations", "fetchIdMap"]),
|
||||
// This list is always the viewer's own personal items (fetchInventoryItems has no
|
||||
// group filter) - the owner handle is always their own, but it's always included
|
||||
// rather than special-cased, so /inventory/:handle/:id has exactly one shape.
|
||||
// Always the viewer's own items (fetchInventoryItems has no group filter); the owner
|
||||
// handle is always included so /inventory/:handle/:id has exactly one shape.
|
||||
itemRoute(item) {
|
||||
return `/inventory/${encodeHandleForUrl(this.user)}/${item.id}`
|
||||
},
|
||||
|
|
@ -151,13 +150,8 @@ 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.
|
||||
// Routes to Print.vue with this item's raw identity rather than a pre-built link.
|
||||
// See docs/implementation.md#print-link-shape-for-personal-items.
|
||||
printLinkFor(item) {
|
||||
if (!item.owner) return null
|
||||
return {path: '/print', query: {kind: 'item', userHandle: item.owner, id: item.id}}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue