From 7d9f67a77a96c9c00443ad3b5b5b437cd9d4edfa Mon Sep 17 00:00:00 2001 From: jedi Date: Fri, 21 Aug 2026 19:56:55 +0200 Subject: [PATCH] stash --- frontend/src/views/Inventory.vue | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/frontend/src/views/Inventory.vue b/frontend/src/views/Inventory.vue index 38df1f8..46d228c 100644 --- a/frontend/src/views/Inventory.vue +++ b/frontend/src/views/Inventory.vue @@ -40,6 +40,9 @@ + + + @@ -65,11 +68,14 @@
Edit + + +
@@ -94,6 +100,7 @@ import {mapActions, mapGetters, mapMutations, mapState} from "vuex"; import * as BIcons from "bootstrap-icons-vue"; import BaseLayout from "@/components/BaseLayout.vue"; import AuthenticatedImage from "../components/AuthenticatedImage.vue"; +import {encodeShortId, serializeShortId} from "@/short-id"; export default { name: "Inventory", @@ -120,6 +127,13 @@ export default { const loc = this.storage_locations.find(loc => loc.id === item.storage_location) return loc ? loc.path : null }, + shortIdLink(item) { + // owner_identity_id is a placeholder until the backend exposes a KnownIdentity pk + // per item (see docs/handles-and-shortids.md) - it doesn't decode to a + // meaningful owner yet. + const ints = serializeShortId({kind: 'item', owner_identity_id: 0, item_local_id: item.id}); + return '/' + encodeShortId(ints); + }, }, async mounted() { await this.fetchInventoryItems()