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()