1. mailPrefs.component: Bug fix: redirect to /user-info when 'save' is clicked, but preferences not changed.
2. login/user.component.html: Bug fix: When session is expired, in 'sign in' button call 'logIn()' function instead of redirect to 'loginUrl'. git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-library/trunk/ng-openaire-library/src/app@53672 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
parent
68770e1c2b
commit
1259f7bc48
|
@ -139,13 +139,14 @@ export class MailPrefsComponent {
|
|||
|
||||
saveNotification(index: number) {
|
||||
if(this.notifications.length > 0 && this.initialNotifications.length > 0) {
|
||||
if(JSON.stringify(this.notifications[index]) != JSON.stringify(this.initialNotifications[index])) {
|
||||
if(!Session.isLoggedIn()){
|
||||
if(!Session.isLoggedIn()){
|
||||
this.userValidMessage = "User session has expired. Please login again.";
|
||||
if(this.showSaveResetButtons) {
|
||||
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
|
||||
}
|
||||
}else{
|
||||
}else{
|
||||
if(JSON.stringify(this.notifications[index]) != JSON.stringify(this.initialNotifications[index])) {
|
||||
|
||||
this.status = this.errorCodes.LOADING;
|
||||
this.savedMessage = "";
|
||||
console.info("Send notification to db: ", this.notifications[index]);
|
||||
|
@ -171,15 +172,16 @@ export class MailPrefsComponent {
|
|||
}
|
||||
);
|
||||
}
|
||||
} else {
|
||||
console.info("Notification not changed: ", this.notifications[index]);
|
||||
/*UIkit.notification({
|
||||
message : '<strong>No changes selected for '+this.notifications[index].openaireName+' email preferences<strong>',
|
||||
status : 'primary',
|
||||
timeout : 3000,
|
||||
pos : 'top-center'
|
||||
});*/
|
||||
this.savedMessage = "Notification settings for claims saved!";
|
||||
else {
|
||||
console.info("Notification not changed: ", this.notifications[index]);
|
||||
/*UIkit.notification({
|
||||
message : '<strong>No changes selected for '+this.notifications[index].openaireName+' email preferences<strong>',
|
||||
status : 'primary',
|
||||
timeout : 3000,
|
||||
pos : 'top-center'
|
||||
});*/
|
||||
this.savedMessage = "Notification settings for claims saved!";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -42,7 +42,8 @@
|
|||
<div *ngIf="errorCode == '3'" class="uk-alert uk-alert-warning">
|
||||
The session has expired. Please sign in again or continue <a (click)="redirect();">browsing as a guest</a>.
|
||||
<span *ngIf="!loggedIn">
|
||||
<a class="loginLink" [href]="loginUrl" >Sign in</a>
|
||||
<!-- <a class="loginLink" [href]="loginUrl" >Sign in</a> -->
|
||||
<a class="" (click)="logIn()" >Please Sign in</a>
|
||||
</span>
|
||||
</div>
|
||||
<div *ngIf="errorCode == '4'" class="uk-alert uk-alert-warning">
|
||||
|
|
Loading…
Reference in New Issue