Admin Dashboard - Manage Indicators
{{stakeholder.name}}
diff --git a/src/app/topic/topic.module.ts b/src/app/topic/topic.module.ts
index 39f3917..d383cdb 100644
--- a/src/app/topic/topic.module.ts
+++ b/src/app/topic/topic.module.ts
@@ -18,11 +18,12 @@ import {IconsModule} from "../openaireLibrary/utils/icons/icons.module";
import {PageContentModule} from "../openaireLibrary/dashboard/sharedComponents/page-content/page-content.module";
import {LoadingModule} from "../openaireLibrary/utils/loading/loading.module";
import {NotifyFormModule} from "../openaireLibrary/notifications/notify-form/notify-form.module";
+import {LogoUrlPipeModule} from "../openaireLibrary/utils/pipes/logoUrlPipe.module";
@NgModule({
imports: [
CommonModule, TopicRoutingModule, ClickModule, RouterModule, FormsModule, AlertModalModule,
- ReactiveFormsModule, InputModule, IconsModule, PageContentModule, LoadingModule, NotifyFormModule
+ ReactiveFormsModule, InputModule, IconsModule, PageContentModule, LoadingModule, NotifyFormModule, LogoUrlPipeModule
],
declarations: [
TopicComponent, IndicatorsComponent
diff --git a/src/app/users/users.component.html b/src/app/users/users.component.html
index 5e7cc88..2caef88 100644
--- a/src/app/users/users.component.html
+++ b/src/app/users/users.component.html
@@ -6,19 +6,18 @@
-
-
-
+
-
Admin Dashboard - Manage Users
-
{{name}}
+
Admin Dashboard - Manage {{users}}
+
{{stakeholder.name}}
diff --git a/src/app/users/users.component.ts b/src/app/users/users.component.ts
index bb2da85..1dda6b3 100644
--- a/src/app/users/users.component.ts
+++ b/src/app/users/users.component.ts
@@ -11,6 +11,8 @@ import {Notification} from "../openaireLibrary/notifications/notifications";
import {User} from "../openaireLibrary/login/utils/helper.class";
import {UserManagementService} from "../openaireLibrary/services/user-management.service";
import {EnvProperties} from "../openaireLibrary/utils/properties/env-properties";
+import {Stakeholder} from "../openaireLibrary/monitor/entities/stakeholder";
+import {StringUtils} from "../openaireLibrary/utils/string-utils.class";
type Tab = 'member' | 'manager';
@@ -19,11 +21,8 @@ type Tab = 'member' | 'manager';
templateUrl: 'users.component.html'
})
export class UsersComponent implements OnInit {
-
- public alias: string;
- public name: string;
- public logo: string;
- public type: string;
+
+ public stakeholder: Stakeholder;
public link: string;
public loading: boolean;
public messages: Map = new Map();
@@ -38,10 +37,10 @@ export class UsersComponent implements OnInit {
if(invitation) {
invitation.link = this.link + invitation.link;
}
- let notification: Notification = NotificationUtils.invite(this.name, role, 'user', invitation);
+ let notification: Notification = NotificationUtils.invite(this.stakeholder.name, role, 'user', invitation);
notification.entity = recipient;
- notification.stakeholderType = this.type;
- notification.stakeholder = this.alias;
+ notification.stakeholderType = this.stakeholder.type;
+ notification.stakeholder = this.stakeholder.alias;
notification.name = this.user.firstname;
notification.surname = this.user.lastname;
notification.groups = [recipient];
@@ -57,21 +56,21 @@ export class UsersComponent implements OnInit {
ngOnInit() {
this.loading = true;
- this.subscriptions.push(this.route.fragment.subscribe((fragment: Tab) => {
- if (this.isTab(fragment)) {
- this.tab = fragment;
+ this.subscriptions.push(this.route.params.subscribe(params => {
+ if (this.isTab(params['user_type'])) {
+ this.tab = params['user_type'];
} else {
this.tab = 'manager';
}
+ if(this.stakeholder) {
+ this.title.setTitle(this.stakeholder.name + " | " + this.users);
+ }
}));
this.subscriptions.push(this.stakeholderService.getStakeholderAsObservable().subscribe(stakeholder => {
if (stakeholder) {
- this.alias = stakeholder.alias;
- this.name = stakeholder.name;
- this.logo = stakeholder.logoUrl;
- this.title.setTitle(this.name + " | Users");
- this.type = stakeholder.type;
- this.link = this.getURL(this.alias);
+ this.stakeholder = stakeholder;
+ this.title.setTitle(this.stakeholder.name + " | " + this.users);
+ 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, ' +
@@ -92,6 +91,10 @@ export class UsersComponent implements OnInit {
});
}
+ get users(): string {
+ return StringUtils.capitalize(this.tab) + 's';
+ }
+
private isTab(tab: Tab): boolean {
switch (tab) {
case "manager":
diff --git a/src/app/users/users.module.ts b/src/app/users/users.module.ts
index 41add57..424ec79 100644
--- a/src/app/users/users.module.ts
+++ b/src/app/users/users.module.ts
@@ -6,9 +6,10 @@ import {LoadingModule} from "../openaireLibrary/utils/loading/loading.module";
import {PageContentModule} from "../openaireLibrary/dashboard/sharedComponents/page-content/page-content.module";
import {RoleUsersModule} from "../openaireLibrary/dashboard/users/role-users/role-users.module";
import {RouterModule} from "@angular/router";
+import {LogoUrlPipeModule} from "../openaireLibrary/utils/pipes/logoUrlPipe.module";
@NgModule({
- imports: [CommonModule, UsersRoutingModule, LoadingModule, PageContentModule, RoleUsersModule, RouterModule],
+ imports: [CommonModule, UsersRoutingModule, LoadingModule, PageContentModule, RoleUsersModule, RouterModule, LogoUrlPipeModule],
declarations: [UsersComponent],
exports: [UsersComponent]
})
diff --git a/src/assets/dashboard-theme b/src/assets/dashboard-theme
index 635d56f..cd1a176 160000
--- a/src/assets/dashboard-theme
+++ b/src/assets/dashboard-theme
@@ -1 +1 @@
-Subproject commit 635d56f198026c2d24a923ad58b813254591fa33
+Subproject commit cd1a176ceb3aaa3493e16fc4d7ef67749655f351