refs #5989 btn redirection #69

Merged
alexm merged 19 commits from 5989-redirectSalix into dev 2023-08-09 10:39:54 +00:00
2 changed files with 16 additions and 6 deletions
Showing only changes of commit 566f7df2d0 - Show all commits

View File

@ -64,6 +64,9 @@ const pinnedModulesRef = ref();
@click="pinnedModulesRef.redirect($route.params.id)"
icon="more_up"
>
<QTooltip>
carlossa marked this conversation as resolved Outdated
Outdated
Review

Li podries possar un tooltip que pose t('go to Salix')

Li podries possar un tooltip que pose t('go to Salix')
{{ t('Go to Salix') }}
</QTooltip>
</QBtn>
<QBtn id="pinnedModules" icon="apps" flat dense rounded>
<QTooltip bottom>
@ -89,3 +92,10 @@ const pinnedModulesRef = ref();
</QToolbar>
</QHeader>
</template>
<i18n>
en:
Go to Salix: Go to Salix
es:
Go to Salix: Ir a Salix
</i18n>

View File

@ -24,17 +24,17 @@ async function redirect() {
let section = route.path.substring(1);
if (!route.path.includes('/')) return (window.location.href = await getUrl(section));
section = section.substring(0, section.indexOf('/'));
if (route?.params?.id) {
window.location.href = await getUrl(`${section}/${route.params.id}/summary`);
} else {
window.location.href = await getUrl(section + 'dashboard');
}
if (route?.params?.id)
carlossa marked this conversation as resolved Outdated
Outdated
Review

Seria millor:

    if (route?.params?.id) {
        return window.location.href = await getUrl(`${section}/${route.params.id}/summary`);

     return window.location.href = await getUrl(section + 'dashboard');
Seria millor: ``` if (route?.params?.id) { return window.location.href = await getUrl(`${section}/${route.params.id}/summary`); return window.location.href = await getUrl(section + 'dashboard'); ```
return (window.location.href = await getUrl(
`${section}/${route.params.id}/summary`
));
return (window.location.href = await getUrl(section + 'dashboard'));
}
</script>
<template>
<QMenu anchor="bottom left" max-width="300px" max-height="400px">
<div v-if="pinnedModules.length" class="row justify-around q-pa-md">
<div v-if="pinnedModules.length >= 0" class="row justify-around q-pa-md">
<QBtn
flat
stack