diff --git a/frontend/components/Location/Tree/Root.vue b/frontend/components/Location/Tree/Root.vue
index 6ace6d7..4bb07f9 100644
--- a/frontend/components/Location/Tree/Root.vue
+++ b/frontend/components/Location/Tree/Root.vue
@@ -10,11 +10,9 @@
-
-
-
-
-
+
+
+
diff --git a/frontend/pages/locations.vue b/frontend/pages/locations.vue
index e6a34ef..c360a02 100644
--- a/frontend/pages/locations.vue
+++ b/frontend/pages/locations.vue
@@ -12,7 +12,9 @@
const api = useUserApi();
const { data: tree } = useAsyncData(async () => {
- const { data, error } = await api.locations.getTree();
+ const { data, error } = await api.locations.getTree({
+ withItems: true,
+ });
if (error) {
return [];
@@ -32,7 +34,7 @@
const query = route.currentRoute.value.query;
if (query && query[locationTreeId]) {
- console.log("setting tree state from query params");
+ console.debug("setting tree state from query params");
const data = JSON.parse(query[locationTreeId] as string);
for (const key in data) {
@@ -49,12 +51,28 @@
},
{ deep: true }
);
+
+ function closeAll() {
+ for (const key in treeState.value) {
+ treeState.value[key] = false;
+ }
+ }
Locations
-
-
+
+
+