From 68552b8da9bdb61237ed7c356671e3c34d4f4de4 Mon Sep 17 00:00:00 2001 From: Javier Segarra Date: Fri, 28 Jun 2024 11:07:32 +0200 Subject: [PATCH] perf: add QBtn in CardDescriptor instead each ModuleDescriptor --- src/components/ui/CardDescriptor.vue | 25 ++++++++++++++++++- src/pages/Account/Card/AccountDescriptor.vue | 14 ----------- src/pages/Agency/Card/AgencyDescriptor.vue | 16 ------------ src/pages/Claim/Card/ClaimDescriptor.vue | 16 ------------ .../ItemType/Card/ItemTypeDescriptor.vue | 14 ----------- src/pages/Order/Card/OrderDescriptor.vue | 16 ------------ src/pages/Route/Roadmap/RoadmapDescriptor.vue | 16 ------------ .../Shelving/Card/ShelvingDescriptor.vue | 16 ------------ .../Supplier/Card/SupplierDescriptor.vue | 16 ------------ 9 files changed, 24 insertions(+), 125 deletions(-) diff --git a/src/components/ui/CardDescriptor.vue b/src/components/ui/CardDescriptor.vue index 8bb2a603e..481e2ec12 100644 --- a/src/components/ui/CardDescriptor.vue +++ b/src/components/ui/CardDescriptor.vue @@ -78,13 +78,36 @@ async function getData() { } } const emit = defineEmits(['onFetch']); + +const iconModule = computed(() => route.matched[1].meta.icon); +const toModule = computed(() => + route.matched[1].path.split('/').length > 2 + ? route.matched[1].redirect + : route.matched[1].children[0].redirect +);