From 566a649c208c4a1d85ba7b0438b3abe730f49d61 Mon Sep 17 00:00:00 2001 From: jorgep Date: Mon, 26 Aug 2024 16:34:46 +0200 Subject: [PATCH] fix: refs #7524 use limit item Section --- src/components/ui/VnFilterPanel.vue | 2 +- src/pages/Item/Card/ItemBotanical.vue | 28 +++++++++------------------ src/pages/Item/Card/ItemShelving.vue | 24 ++++++----------------- src/pages/Item/Card/ItemTags.vue | 4 +++- src/pages/Item/ItemListFilter.vue | 12 ++++-------- src/pages/Item/ItemRequest.vue | 12 +++--------- src/pages/Item/ItemRequestFilter.vue | 18 ++++------------- 7 files changed, 30 insertions(+), 70 deletions(-) diff --git a/src/components/ui/VnFilterPanel.vue b/src/components/ui/VnFilterPanel.vue index ab4e2e0da..b12a9f7b8 100644 --- a/src/components/ui/VnFilterPanel.vue +++ b/src/components/ui/VnFilterPanel.vue @@ -202,7 +202,7 @@ function formatValue(value) { function sanitizer(params) { for (const [key, value] of Object.entries(params)) { if (typeof value == 'object') - params[key] = Object.values(value)[0].replaceAll('%', ''); + params[key] = Object.values(value)?.[0]?.replaceAll('%', ''); } return params; } diff --git a/src/pages/Item/Card/ItemBotanical.vue b/src/pages/Item/Card/ItemBotanical.vue index 416c7f78b..599cd2b32 100644 --- a/src/pages/Item/Card/ItemBotanical.vue +++ b/src/pages/Item/Card/ItemBotanical.vue @@ -19,15 +19,6 @@ const itemSpeciesOptions = ref([]); const itemBotanicals = ref([]); let itemBotanicalsForm = reactive({ itemFk: null }); -const onGenusCreated = (response, formData) => { - itemGenusOptions.value = [...itemGenusOptions.value, response]; - formData.genusFk = response.id; -}; - -const onSpecieCreated = (response, formData) => { - itemSpeciesOptions.value = [...itemSpeciesOptions.value, response]; - formData.specieFk = response.id; -}; const entityId = computed(() => { return route.params.id; }); @@ -69,36 +60,35 @@ onMounted(async () => {