refs #5293 open section in the same page
gitea/salix-front/pipeline/head This commit looks good Details

This commit is contained in:
Alexandre Riera 2023-04-20 08:04:07 +02:00
parent 0204208bf7
commit f4098380f1
1 changed files with 5 additions and 10 deletions

View File

@ -22,20 +22,15 @@ const entityId = computed(() => {
return $props.id || route.params.id;
});
const claimSections = [
{ name: 'Details', url: '/detail' },
{ name: 'Notes', url: '/note/index' },
{ name: 'Development', url: '/development' },
{ name: 'Action', url: '/action' },
{ name: 'Notes', url: '/note/index', icon: 'draft' },
{ name: 'Development', url: '/development', icon: 'vn:traceability' },
{ name: 'Action', url: '/action', icon: 'vn:actions' },
];
let salixUrl;
onMounted(async () => {
salixUrl = await getUrl(`claim/${entityId.value}`);
});
function openNewTab(url) {
window.open(url, '_blank');
}
</script>
<template>
<Teleport to="#searchbar" v-if="stateStore.isHeaderMounted()">
@ -57,12 +52,12 @@ function openNewTab(url) {
v-for="section in claimSections"
:key="section.name"
active-class="text-primary"
@click="openNewTab(salixUrl + section.url)"
:href="salixUrl + section.url"
clickable
v-ripple
>
<QItemSection avatar>
<QIcon name="disabled_by_default" />
<QIcon :name="section.icon" />
</QItemSection>
<QItemSection> {{ t(section.name) }} </QItemSection>
</QItem>