Feature: Allow password change

This commit is contained in:
2021-06-21 10:45:45 +05:30
parent 72b0e0e97d
commit 27205f7790
4 changed files with 39 additions and 11 deletions

View File

@ -73,7 +73,12 @@ export class UserDetailComponent implements OnInit, AfterViewInit {
this.ser.saveOrUpdate(this.getItem()).subscribe(
() => {
this.toaster.show('Success', '');
this.router.navigateByUrl('/users');
console.log(this.item.id);
if ((this.item.id as string) === 'me') {
this.router.navigateByUrl('/');
} else {
this.router.navigateByUrl('/users');
}
},
(error) => {
this.toaster.show('Error', error);