Skip to content

A continuation of HomeBox the inventory and organization system built for the Home User

Add a tenant get param when generating labels on the item page. (#1303)

Cary Kempston0348d2b12e4a
diff --git a/frontend/components/global/LabelMaker.vue b/frontend/components/global/LabelMaker.vue
index 36167648..9ad44c18 100644
--- a/frontend/components/global/LabelMaker.vue
+++ b/frontend/components/global/LabelMaker.vue
@@ -1,6 +1,6 @@
<script setup lang="ts">
import { useI18n } from "vue-i18n";
- import { route } from "../../lib/api/base";
+ import { type QueryValue, route } from "../../lib/api/base/urls";
import PageQRCode from "./PageQRCode.vue";
import { DialogID } from "@/components/ui/dialog-provider/utils";
import { toast } from "@/components/ui/sonner";
@@ -78,7 +78,12 @@
}
function getLabelUrl(print: boolean): string {
- const params = { print };
+ const { selectedId } = useCollections();
+ const params: Record<string, QueryValue> = { print };
+
+ if (selectedId.value) {
+ params.tenant = selectedId.value;
+ }
if (props.type === "item") {
return route(`/labelmaker/item/${props.id}`, params);