[develop]: Role verification reload page instead of removing params.
This commit is contained in:
parent
c69d1cd94d
commit
0111ea6681
|
@ -203,20 +203,13 @@ export class RoleVerificationComponent extends BaseComponent implements OnInit,
|
|||
this.clearCacheService.clearCache('Managers updated');
|
||||
this.managerModal.cancel();
|
||||
this.error = null;
|
||||
this.userManagementService.updateUserInfo(() => {
|
||||
if (this.paramsSubscription instanceof Subscription) {
|
||||
this.paramsSubscription.unsubscribe();
|
||||
}
|
||||
if(this.service === "irish") {
|
||||
this.loading = false;
|
||||
this.userManagementService.login(properties.domain + '/admin/' + this.verification.entity);
|
||||
} else if (this.service === "monitor" ) {
|
||||
this.loading = false;
|
||||
this._router.navigate(['/admin/' + this.verification.entity]);
|
||||
} else {
|
||||
this.subscriptions.push(this.emailService.notifyManagers(this.id, 'manager',
|
||||
if(this.service === "irish" || this.service === "monitor") {
|
||||
this.loading = false;
|
||||
this.userManagementService.login(properties.domain + '/admin/' + this.verification.entity);
|
||||
} else {
|
||||
this.subscriptions.push(this.emailService.notifyManagers(this.id, 'manager',
|
||||
Composer.composeEmailToInformOldManagersForTheNewOnes(this.name, this.id)).subscribe(() => {
|
||||
this.subscriptions.push(this.emailService.notifyNewManager(Composer.composeEmailForNewManager(this.id, this.name)).subscribe(
|
||||
this.subscriptions.push(this.emailService.notifyNewManager(Composer.composeEmailForNewManager(this.id, this.name)).subscribe(
|
||||
() => {
|
||||
this.loading = false;
|
||||
window.location.href = properties.adminPortalURL + '/' + this.verification.entity;
|
||||
|
@ -226,14 +219,13 @@ export class RoleVerificationComponent extends BaseComponent implements OnInit,
|
|||
this.loading = false;
|
||||
window.location.href = properties.adminPortalURL + '/' + this.verification.entity;
|
||||
}
|
||||
));
|
||||
}, error => {
|
||||
console.error(error);
|
||||
this.loading = false;
|
||||
window.location.href = properties.adminPortalURL + '/' + this.verification.entity;
|
||||
}));
|
||||
}
|
||||
});
|
||||
));
|
||||
}, error => {
|
||||
console.error(error);
|
||||
this.loading = false;
|
||||
window.location.href = properties.adminPortalURL + '/' + this.verification.entity;
|
||||
}));
|
||||
}
|
||||
}, error => {
|
||||
this.loading = false;
|
||||
this.error = 'The verification code is invalid';
|
||||
|
@ -247,12 +239,7 @@ export class RoleVerificationComponent extends BaseComponent implements OnInit,
|
|||
this.memberModal.cancel();
|
||||
this.loading = false;
|
||||
this.error = null;
|
||||
this.userManagementService.updateUserInfo(() => {
|
||||
if (this.paramsSubscription instanceof Subscription) {
|
||||
this.paramsSubscription.unsubscribe();
|
||||
}
|
||||
this.cancel();
|
||||
});
|
||||
window.location.href = window.location.href.split('?')[0];
|
||||
}, error => {
|
||||
this.loading = false;
|
||||
this.error = 'The verification code is invalid';
|
||||
|
@ -264,7 +251,6 @@ export class RoleVerificationComponent extends BaseComponent implements OnInit,
|
|||
}
|
||||
|
||||
cancel() {
|
||||
this._router.navigate([], {relativeTo: this.relativeTo});
|
||||
this.init();
|
||||
this._router.navigate([]);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue