warmfix: #7451 descriptorProxy dataKey #1496

Merged
jsegarra merged 4 commits from warmfix_descriptorProxy_dataKey into test 2025-02-25 13:07:52 +00:00
2 changed files with 16 additions and 4 deletions

View File

@ -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') }}
</QTooltip>
</QBtn>
<RouterLink
:to="{ name: `${dataKey}Summary`, params: { id: entity.id } }"
>
<RouterLink :to="{ name: routeName, params: { id: entity.id } }">
<QBtn
class="link"
color="white"

View File

@ -12,6 +12,11 @@ const $props = defineProps({
<template>
<QPopupProxy>
<WorkerDescriptor v-if="$props.id" :id="$props.id" :summary="WorkerSummary" />
<WorkerDescriptor
v-if="$props.id"
:id="$props.id"
:summary="WorkerSummary"
data-key="WorkerDescriptorProxy"
/>
</QPopupProxy>
</template>