From 7c377fb5c5ead6c303fc6bdf0b0e460d9d34f1b7 Mon Sep 17 00:00:00 2001 From: carlossa Date: Fri, 18 Aug 2023 08:52:35 +0200 Subject: [PATCH] refs #6082 redirect --- front/salix/components/layout/index.html | 8 ++++++++ front/salix/components/layout/index.js | 20 +++++++++++++++++++ .../salix/components/side-menu/side-menu.html | 4 ---- 3 files changed, 28 insertions(+), 4 deletions(-) diff --git a/front/salix/components/layout/index.html b/front/salix/components/layout/index.html index 972defaa1..d87836266 100644 --- a/front/salix/components/layout/index.html +++ b/front/salix/components/layout/index.html @@ -58,6 +58,14 @@ Home + + + + + + Lilium + + diff --git a/front/salix/components/layout/index.js b/front/salix/components/layout/index.js index 89912d4e3..fdd573162 100644 --- a/front/salix/components/layout/index.js +++ b/front/salix/components/layout/index.js @@ -31,6 +31,26 @@ export class Layout extends Component { window.location.reload(); } + async redirect(route) { + if (route.path === '/dashboard') { + const url = await getUrl(''); + window.location.href = url; + return; + } + + let section = route.path.substring(1); + section = section.substring(0, section.indexOf('/')); + + if (route.params && route.params.id) { + const url = await getUrl(`${section}/${route.params.id}/summary`); + window.location.href = url; + return; + } + + const url = await getUrl(section + '/index'); + window.location.href = url; + } + $onDestroy() { this.vnToken.stopRenewer(); } diff --git a/front/salix/components/side-menu/side-menu.html b/front/salix/components/side-menu/side-menu.html index c523e90c7..797690804 100644 --- a/front/salix/components/side-menu/side-menu.html +++ b/front/salix/components/side-menu/side-menu.html @@ -7,8 +7,4 @@ class="menu" ng-class="{shown: $ctrl.shown}" ng-transclude> -