[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
This commit is contained in:
konstantina.galouni 2021-01-12 12:09:21 +00:00
parent 73dc4abd98
commit 28d2affb66
2 changed files with 6 additions and 1 deletions

View File

@ -1,7 +1,7 @@
<!-- <div id="tm-main" class=" uk-section uk-margin-small-top tm-middle">
<div uk-grid uk-grid>
<div class="tm-main uk-width-1-1@s uk-width-1-1@m uk-width-1-1@l uk-row-first"> -->
<div class="uk-container uk-margin-top">
<div *ngIf="!hidden" class="uk-container uk-margin-top">
<div class="uk-article-title custom-article-title">
User Email Preferences for Claims Notifications
</div>

View File

@ -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);
}