refs #5995 test
gitea/salix-front/pipeline/head This commit looks good Details

This commit is contained in:
Alex Moreno 2023-08-10 14:10:57 +02:00
parent 6097fb2516
commit fb7d1fc38e
1 changed files with 31 additions and 24 deletions

View File

@ -56,8 +56,8 @@ const columns = computed(() => [
}, },
]); ]);
function getProjectUrl() { function getProjectUrl() {
return ((new URL(window.location)).origin); return new URL(window.location).origin;
}; }
</script> </script>
<template> <template>
<div class="column items-center"> <div class="column items-center">
@ -80,11 +80,16 @@ function getProjectUrl() {
auto-load auto-load
> >
<template #top> <template #top>
<div v-if="rows.length">
{{ t('route.cmr.list.total', [rows.length]) }} {{ t('route.cmr.list.total', [rows.length]) }}
</div>
</template> </template>
<template #body-cell-cmrFk="{ value }"> <template #body-cell-cmrFk="{ value }">
<QTd align="right" class="text-primary"> <QTd align="right" class="text-primary">
<a :href="`${getProjectUrl()}/api/Routes/${value}/cmr?access_token=${token}`" target="_blank"> <a
:href="`${getProjectUrl()}/api/Routes/${value}/cmr?access_token=${token}`"
target="_blank"
>
<span class="text-primary">{{ value }}</span> <span class="text-primary">{{ value }}</span>
</a> </a>
</QTd> </QTd>
@ -92,10 +97,12 @@ function getProjectUrl() {
<template #body-cell-hasCmrDms="{ value }"> <template #body-cell-hasCmrDms="{ value }">
<QTd align="center"> <QTd align="center">
<QBadge <QBadge
:id="(value) ? 'true' : 'false'" :id="value ? 'true' : 'false'"
:label="(value) :label="
value
? t('route.cmr.list.true') ? t('route.cmr.list.true')
: t('route.cmr.list.false')" : t('route.cmr.list.false')
"
/> />
</QTd> </QTd>
</template> </template>