From 28d2affb66ee66a553836c554825965fe3e74044 Mon Sep 17 00:00:00 2001 From: "konstantina.galouni" Date: Tue, 12 Jan 2021 12:09:21 +0000 Subject: [PATCH] [Trunk | Library]: userEmailPreferences/mailPrefs.component: Add field "hidden", to hide "User Email Preferences for Claims Notifications" when not available for user. git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-library/trunk/ng-openaire-library/src/app@60217 d315682c-612b-4755-9ff5-7f18f6832af3 --- connect/userEmailPreferences/mailPrefs.component.html | 2 +- connect/userEmailPreferences/mailPrefs.component.ts | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/connect/userEmailPreferences/mailPrefs.component.html b/connect/userEmailPreferences/mailPrefs.component.html index 2c2d6692..fec187b6 100644 --- a/connect/userEmailPreferences/mailPrefs.component.html +++ b/connect/userEmailPreferences/mailPrefs.component.html @@ -1,7 +1,7 @@ -
+
User Email Preferences for Claims Notifications
diff --git a/connect/userEmailPreferences/mailPrefs.component.ts b/connect/userEmailPreferences/mailPrefs.component.ts index 84874100..85dba382 100644 --- a/connect/userEmailPreferences/mailPrefs.component.ts +++ b/connect/userEmailPreferences/mailPrefs.component.ts @@ -29,6 +29,7 @@ export class MailPrefsComponent { public notifications = []; public initialNotifications = []; public prefsChanged = {}; + public hidden: boolean = true; //public showForbiddenMessage:boolean = false; public userValidMessage:string = ""; @@ -48,6 +49,8 @@ export class MailPrefsComponent { ngOnInit() { this.properties = properties; this.subscriptions.push(this.route.queryParams.subscribe(params => { + this.hidden = true; + this.communityId = ConnectHelper.getCommunityFromDomain(this.properties.domain); if(!this.communityId) { this.communityId = params['communityId']; @@ -79,9 +82,11 @@ export class MailPrefsComponent { this.notifications = JSON.parse(JSON.stringify( this.initialNotifications )); this.status = this.errorCodes.DONE; + this.hidden = false; } }, err => { + this.hidden = false; this.handleErrors(err); this.handleError("Error getting user email preferences for community with id: "+this.communityId, err); }