Feature: Allow password change
This commit is contained in:
@ -232,6 +232,15 @@
|
||||
>
|
||||
<h3 class="item-name">Users</h3>
|
||||
</mat-card>
|
||||
<mat-card
|
||||
fxLayout="column"
|
||||
class="square-button"
|
||||
matRipple
|
||||
*ngIf="auth.allowed('authenticated')"
|
||||
[routerLink]="['/', 'users', 'me']"
|
||||
>
|
||||
<h3 class="item-name">Change Password</h3>
|
||||
</mat-card>
|
||||
<mat-card
|
||||
fxLayout="column"
|
||||
class="square-button"
|
||||
|
||||
@ -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);
|
||||
|
||||
Reference in New Issue
Block a user