From d490fa560ebd51de2bc1fbd6f13f1f59e12176d3 Mon Sep 17 00:00:00 2001 From: "k.triantafyllou" Date: Mon, 8 Apr 2024 14:15:10 +0300 Subject: [PATCH] [master]: Add members as managers in admin and rename managers to primary dashboard managers --- src/app/admin/admin.module.ts | 2 +- src/app/admin/users/users.component.html | 8 ++++++-- src/app/admin/users/users.component.ts | 8 ++++---- src/app/app-routing.module.ts | 5 ++--- src/app/openaireLibrary | 2 +- src/app/shared/irish.ts | 3 +++ 6 files changed, 17 insertions(+), 11 deletions(-) diff --git a/src/app/admin/admin.module.ts b/src/app/admin/admin.module.ts index 5bde4cc..8261841 100644 --- a/src/app/admin/admin.module.ts +++ b/src/app/admin/admin.module.ts @@ -47,7 +47,7 @@ import {CacheIndicatorsModule} from "../openaireLibrary/monitor-admin/utils/cach pathMatch: 'full' }, { - path: 'users/manager', + path: 'users/:user_type', loadChildren: () => import('./users/users.module').then(m => m.UsersModule), pathMatch: 'full' }, diff --git a/src/app/admin/users/users.component.html b/src/app/admin/users/users.component.html index 47d9ed0..8d49af6 100644 --- a/src/app/admin/users/users.component.html +++ b/src/app/admin/users/users.component.html @@ -3,7 +3,11 @@ - + + diff --git a/src/app/admin/users/users.component.ts b/src/app/admin/users/users.component.ts index 05a19d4..1b4fff0 100644 --- a/src/app/admin/users/users.component.ts +++ b/src/app/admin/users/users.component.ts @@ -59,10 +59,10 @@ export class UsersComponent extends StakeholderBaseComponent { this.title = this.stakeholder.name + " | " + this.users; this.setMetadata(); this.link = this.getURL(this.stakeholder.alias); - this.messages.set("member", 'A member has the right to view the restricted access areas of this indicator\'s profile. ' + - 'A member has no access to the administration part of the profile.'); - this.messages.set("manager", 'A manager has the right to access the administration part of this indicator\'s profile, ' + - 'where he is able to invite other users as members and access the sandbox.'); + this.messages.set("member", 'A ' + this.stakeholderUtils.roles.member + ' has the right to access the sandbox of this indicator\'s profile. ' + + 'A ' + this.stakeholderUtils.roles.member + ' has no access to the administration part of the profile.'); + this.messages.set("manager", 'A ' + this.stakeholderUtils.roles.manager + ' has the right to access the administration part of this indicator\'s profile, ' + + 'where he is able to invite other users as ' + this.stakeholderUtils.roles.member + 's and access the sandbox.'); this.loading = false; } })); diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts index 4fe88af..d8146a4 100644 --- a/src/app/app-routing.module.ts +++ b/src/app/app-routing.module.ts @@ -1,8 +1,7 @@ -import { NgModule } from '@angular/core'; -import { RouterModule, Routes } from '@angular/router'; +import {NgModule} from '@angular/core'; +import {RouterModule, Routes} from '@angular/router'; import {Irish} from "./shared/irish"; import {ErrorPageComponent} from "./openaireLibrary/error/errorPage.component"; -import {AdminLoginGuard} from "./openaireLibrary/login/adminLoginGuard.guard"; import {HasConsentGuard} from "./shared/hasConsent.guard"; const routes: Routes = [ diff --git a/src/app/openaireLibrary b/src/app/openaireLibrary index e91830f..e6d03d3 160000 --- a/src/app/openaireLibrary +++ b/src/app/openaireLibrary @@ -1 +1 @@ -Subproject commit e91830f2f8c1182c6e728f87a03af3a2932d816e +Subproject commit e6d03d324f698f0de61e7a67f96314c6922d95f7 diff --git a/src/app/shared/irish.ts b/src/app/shared/irish.ts index 02e40cb..3888967 100644 --- a/src/app/shared/irish.ts +++ b/src/app/shared/irish.ts @@ -15,6 +15,9 @@ export class Irish { constructor() { LinksResolver.setDefaultProperties('national/'); + StakeholderConfiguration.ROLES.manager = 'primary dashboard manager'; + StakeholderConfiguration.ROLES.member = 'manager'; + StakeholderConfiguration.ENTITIES.stakeholder = 'Monitor'; StakeholderConfiguration.ENTITIES.stakeholders = 'Monitors'; StakeholderConfiguration.ENTITIES.funder = 'RFO';