0
0
Fork 0

refs #5293 open section in the same page

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