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