fix: card descriptor merge
gitea/salix-front/pipeline/pr-test There was a failure building this commit Details

This commit is contained in:
Jon Elias 2025-03-18 14:03:38 +01:00
parent fb912725b3
commit 092a338e72
1 changed files with 0 additions and 18 deletions

View File

@ -48,7 +48,6 @@ const $props = defineProps({
const state = useState(); const state = useState();
const route = useRoute(); const route = useRoute();
const router = useRouter(); const router = useRouter();
const router = useRouter();
const { t } = useI18n(); const { t } = useI18n();
const { copyText } = useClipboard(); const { copyText } = useClipboard();
const { viewSummary } = useSummaryDialog(); const { viewSummary } = useSummaryDialog();
@ -60,9 +59,6 @@ const isSameDataKey = computed(() => $props.dataKey === route.meta.moduleName);
const DESCRIPTOR_PROXY = 'DescriptorProxy'; const DESCRIPTOR_PROXY = 'DescriptorProxy';
const moduleName = ref(); const moduleName = ref();
const isSameModuleName = route.matched[1].meta.moduleName !== moduleName.value; const isSameModuleName = route.matched[1].meta.moduleName !== moduleName.value;
const DESCRIPTOR_PROXY = 'DescriptorProxy';
const moduleName = ref();
const isSameModuleName = route.matched[1].meta.moduleName !== moduleName.value;
defineExpose({ getData }); defineExpose({ getData });
onBeforeMount(async () => { onBeforeMount(async () => {
@ -89,7 +85,6 @@ onBeforeMount(async () => {
); );
}); });
function getName() {
function getName() { function getName() {
let name = $props.dataKey; let name = $props.dataKey;
if ($props.dataKey.includes(DESCRIPTOR_PROXY)) { if ($props.dataKey.includes(DESCRIPTOR_PROXY)) {
@ -97,17 +92,11 @@ function getName() {
} }
return name; return name;
} }
const routeName = computed(() => {
let routeName = getName();
return `${routeName}Summary`;
return name;
}
const routeName = computed(() => { const routeName = computed(() => {
let routeName = getName(); let routeName = getName();
return `${routeName}Summary`; return `${routeName}Summary`;
}); });
async function getData() { async function getData() {
store.url = $props.url; store.url = $props.url;
store.filter = $props.filter ?? {}; store.filter = $props.filter ?? {};
@ -176,8 +165,6 @@ const toModule = computed(() => {
<div class="descriptor"> <div class="descriptor">
<template v-if="entity && !isLoading"> <template v-if="entity && !isLoading">
<div class="header bg-primary q-pa-sm justify-between"> <div class="header bg-primary q-pa-sm justify-between">
<slot name="header-extra-action">
<QBtn
<slot name="header-extra-action"> <slot name="header-extra-action">
<QBtn <QBtn
round round
@ -188,14 +175,11 @@ const toModule = computed(() => {
color="white" color="white"
class="link" class="link"
:to="toModule" :to="toModule"
:to="toModule"
> >
<QTooltip> <QTooltip>
{{ t('globals.goToModuleIndex') }} {{ t('globals.goToModuleIndex') }}
</QTooltip> </QTooltip>
</QBtn> </QBtn>
</slot>
</QBtn>
</slot> </slot>
<QBtn <QBtn
@click.stop="viewSummary(entity.id, $props.summary, $props.width)" @click.stop="viewSummary(entity.id, $props.summary, $props.width)"
@ -208,7 +192,6 @@ const toModule = computed(() => {
class="link" class="link"
v-if="summary" v-if="summary"
data-cy="openSummaryBtn" data-cy="openSummaryBtn"
data-cy="openSummaryBtn"
> >
<QTooltip> <QTooltip>
{{ t('components.smartCard.openSummary') }} {{ t('components.smartCard.openSummary') }}
@ -224,7 +207,6 @@ const toModule = computed(() => {
round round
size="md" size="md"
data-cy="goToSummaryBtn" data-cy="goToSummaryBtn"
data-cy="goToSummaryBtn"
> >
<QTooltip> <QTooltip>
{{ t('components.cardDescriptor.summary') }} {{ t('components.cardDescriptor.summary') }}