From f7db2d03b2eb3c4f14f7e0dc67dff0f9dc8947d8 Mon Sep 17 00:00:00 2001 From: "k.triantafyllou" Date: Mon, 7 Nov 2022 17:01:30 +0200 Subject: [PATCH] Merge indicators and indicators/:topic path in one route configuration. Fix transitions in admin dashboard --- .../admin-stakeholder-routing.module.ts | 9 +-- src/app/app.component.ts | 4 +- src/app/openaireLibrary | 2 +- src/app/topic/topic.component.html | 8 +- src/app/topic/topic.component.ts | 77 ++++++++++++++----- 5 files changed, 67 insertions(+), 33 deletions(-) diff --git a/src/app/admin-stakeholder/admin-stakeholder-routing.module.ts b/src/app/admin-stakeholder/admin-stakeholder-routing.module.ts index 84d378d..fb8a2a8 100644 --- a/src/app/admin-stakeholder/admin-stakeholder-routing.module.ts +++ b/src/app/admin-stakeholder/admin-stakeholder-routing.module.ts @@ -1,5 +1,6 @@ import {NgModule} from "@angular/core"; import {RouterModule} from "@angular/router"; +import {HelperFunctions} from "../openaireLibrary/utils/HelperFunctions.class"; @NgModule({ imports: [RouterModule.forChild([ @@ -19,13 +20,7 @@ import {RouterModule} from "@angular/router"; pathMatch: 'full' }, { - path: 'indicators', - loadChildren: () => import('../topic/topic.module').then(m => m.TopicModule), - data: {hasInternalSidebar: true}, - pathMatch: 'full' - }, - { - path: 'indicators/:topic', + matcher: HelperFunctions.routingMatcher(['indicators', 'indicators/:topic']), loadChildren: () => import('../topic/topic.module').then(m => m.TopicModule), data: {hasInternalSidebar: true}, pathMatch: 'full' diff --git a/src/app/app.component.ts b/src/app/app.component.ts index 089b784..c71c6a3 100644 --- a/src/app/app.component.ts +++ b/src/app/app.component.ts @@ -350,8 +350,8 @@ export class AppComponent implements OnInit, OnDestroy { title: this.stakeholder.name, logoUrl: StringUtils.getLogoUrl(this.stakeholder), logoSmallUrl: StringUtils.getLogoUrl(this.stakeholder), - logoInfo: '
Dashboard
' + - '
' + this.stakeholder.name + '
', + logoInfo: '
Monitor
' + + '
Dashboard
', position: 'center', badge: true, menuPosition: "center" diff --git a/src/app/openaireLibrary b/src/app/openaireLibrary index 7bae3b1..ed20502 160000 --- a/src/app/openaireLibrary +++ b/src/app/openaireLibrary @@ -1 +1 @@ -Subproject commit 7bae3b1ebb01a87246f9cc886cc5777ab5ddcf33 +Subproject commit ed20502959df400f5ba38fdd5d4b3ba3cf9389c4 diff --git a/src/app/topic/topic.component.html b/src/app/topic/topic.component.html index ca04ab4..cf30962 100644 --- a/src/app/topic/topic.component.html +++ b/src/app/topic/topic.component.html @@ -12,7 +12,7 @@