From 696be32fa6c8c43e45294f358f345df61022732f Mon Sep 17 00:00:00 2001 From: Javier Segarra Date: Fri, 13 Dec 2024 06:54:40 +0100 Subject: [PATCH 1/4] feat: remove search after category --- src/pages/Order/Card/OrderCatalogFilter.vue | 1 - 1 file changed, 1 deletion(-) diff --git a/src/pages/Order/Card/OrderCatalogFilter.vue b/src/pages/Order/Card/OrderCatalogFilter.vue index 1dd569fb5..39627595d 100644 --- a/src/pages/Order/Card/OrderCatalogFilter.vue +++ b/src/pages/Order/Card/OrderCatalogFilter.vue @@ -65,7 +65,6 @@ const selectCategory = async (params, category, search) => { params.typeFk = null; params.categoryFk = category.id; await loadTypes(category?.id); - await search(); }; const loadTypes = async (id) => { From bd15d2e73aef226c68e04d51d88098e72703af7e Mon Sep 17 00:00:00 2001 From: Javier Segarra Date: Fri, 13 Dec 2024 06:56:22 +0100 Subject: [PATCH 2/4] feat: remove re-fetch when add element --- src/pages/Order/Card/OrderCatalog.vue | 22 +++++++++---------- .../Order/Card/OrderCatalogItemDialog.vue | 15 ++++++++----- src/pages/Order/Card/OrderDescriptor.vue | 11 +++++++--- 3 files changed, 27 insertions(+), 21 deletions(-) diff --git a/src/pages/Order/Card/OrderCatalog.vue b/src/pages/Order/Card/OrderCatalog.vue index 453037f15..0b01c88ac 100644 --- a/src/pages/Order/Card/OrderCatalog.vue +++ b/src/pages/Order/Card/OrderCatalog.vue @@ -75,19 +75,17 @@ watch( }, { immediate: true } ); -const onItemSaved = (updatedItem) => { - requestAnimationFrame(() => { - scrollToItem(updatedItem.items[0].itemFk); - }); -}; +// const onItemSaved = (updatedItem) => { +// console.error(stateStore); +// }; -const scrollToItem = async (id) => { - const element = itemRefs.value[id]?.$el; - if (element) { - element.scrollIntoView({ behavior: 'smooth', block: 'center' }); - } -}; -provide('onItemSaved', onItemSaved); +// const scrollToItem = async (id) => { +// const element = itemRefs.value[id]?.$el; +// if (element) { +// element.scrollIntoView({ behavior: 'smooth', block: 'center' }); +// } +// }; +// provide('onItemSaved', onItemSaved);