From 4f64501eecddee2c3e3d8e590db8ed4302110e7d Mon Sep 17 00:00:00 2001 From: Nicola Lanzilotto Date: Mon, 25 Nov 2024 16:59:42 +0100 Subject: [PATCH] Minor improvements --- src/app/components/sidebar/sidebar.component.ts | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/src/app/components/sidebar/sidebar.component.ts b/src/app/components/sidebar/sidebar.component.ts index acf8f1232804..dd4baad21e4c 100755 --- a/src/app/components/sidebar/sidebar.component.ts +++ b/src/app/components/sidebar/sidebar.component.ts @@ -1223,12 +1223,14 @@ export class SidebarComponent implements OnInit, AfterViewInit { // this.logger.log('[SIDEBAR] NavigationEnd - EDIT_PROJECT_USER_ROUTE_IS_ACTIVE ', this.EDIT_PROJECT_USER_ROUTE_IS_ACTIVE); } - if (event.url.indexOf('/messages') !== -1) { + // if (event.url.indexOf('/messages') !== -1) { + + if (event.url.indexOf('/wsrequest') !== -1) { this.CONV_DETAIL_ROUTE_IS_ACTIVE = true; - // this.logger.log('[SIDEBAR] NavigationEnd - CONV_DETAIL_ROUTE_IS_ACTIVE ', this.CONV_DETAIL_ROUTE_IS_ACTIVE); + console.log('[SIDEBAR] NavigationEnd - CONV_DETAIL_ROUTE_IS_ACTIVE ', this.CONV_DETAIL_ROUTE_IS_ACTIVE); } else { this.CONV_DETAIL_ROUTE_IS_ACTIVE = false; - // this.logger.log('[SIDEBAR] NavigationEnd - CONV_DETAIL_ROUTE_IS_ACTIVE ', this.CONV_DETAIL_ROUTE_IS_ACTIVE); + console.log('[SIDEBAR] NavigationEnd - CONV_DETAIL_ROUTE_IS_ACTIVE ', this.CONV_DETAIL_ROUTE_IS_ACTIVE); } if (event.url.indexOf('/wsrequests-demo') !== -1) { @@ -1338,12 +1340,13 @@ export class SidebarComponent implements OnInit, AfterViewInit { } - if (event.url.indexOf('/support') !== -1) { + // if (event.url.indexOf('/support') !== -1) { + if (event.url.substring(event.url.lastIndexOf('/') + 1) === 'support') { this.SUPPORT_ROUTE_IS_ACTIVE = true; - this.logger.log('[SIDEBAR] NavigationEnd - SUPPORT_ROUTE_IS_ACTIVE; ', this.SUPPORT_ROUTE_IS_ACTIVE); + console.log('[SIDEBAR] NavigationEnd - SUPPORT_ROUTE_IS_ACTIVE; ', this.SUPPORT_ROUTE_IS_ACTIVE); } else { this.SUPPORT_ROUTE_IS_ACTIVE = false; - this.logger.log('[SIDEBAR] NavigationEnd - SUPPORT_ROUTE_IS_ACTIVE ', this.SUPPORT_ROUTE_IS_ACTIVE); + console.log('[SIDEBAR] NavigationEnd - SUPPORT_ROUTE_IS_ACTIVE ', this.SUPPORT_ROUTE_IS_ACTIVE); } if (event.url.indexOf('/home') !== -1) {