From df62ccee8bb7985d7da8496b6e06eebeaa25f6b4 Mon Sep 17 00:00:00 2001 From: Javier Segarra Date: Tue, 25 Feb 2025 13:50:07 +0100 Subject: [PATCH] feat: detect when is descriptor proxy --- src/components/ui/CardDescriptor.vue | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/components/ui/CardDescriptor.vue b/src/components/ui/CardDescriptor.vue index e6e7e6fa0..8ed1fa0fa 100644 --- a/src/components/ui/CardDescriptor.vue +++ b/src/components/ui/CardDescriptor.vue @@ -76,6 +76,15 @@ onBeforeMount(async () => { ); }); +const routeName = computed(() => { + const DESCRIPTOR_PROXY = 'DescriptorProxy'; + + let name = $props.dataKey; + if ($props.dataKey.includes(DESCRIPTOR_PROXY)) { + name = name.split(DESCRIPTOR_PROXY)[0]; + } + return `${name}Summary`; +}); async function getData() { store.url = $props.url; store.filter = $props.filter ?? {}; @@ -154,9 +163,7 @@ const toModule = computed(() => {{ t('components.smartCard.openSummary') }} - +