mirror of
https://github.com/zitadel/zitadel.git
synced 2025-01-07 22:27:40 +00:00
fix(console): username dialog response (#2888)
This commit is contained in:
parent
cf727b7fff
commit
2553bb173e
@ -69,7 +69,7 @@ export class AuthUserDetailComponent implements OnDestroy {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public changeUsername(): void {
|
public changeUsername(): void {
|
||||||
const dialogRefPhone = this.dialog.open(EditDialogComponent, {
|
const dialogRef = this.dialog.open(EditDialogComponent, {
|
||||||
data: {
|
data: {
|
||||||
confirmKey: 'ACTIONS.CHANGE',
|
confirmKey: 'ACTIONS.CHANGE',
|
||||||
cancelKey: 'ACTIONS.CANCEL',
|
cancelKey: 'ACTIONS.CANCEL',
|
||||||
@ -81,10 +81,10 @@ export class AuthUserDetailComponent implements OnDestroy {
|
|||||||
width: '400px',
|
width: '400px',
|
||||||
});
|
});
|
||||||
|
|
||||||
dialogRefPhone.afterClosed().subscribe((resp) => {
|
dialogRef.afterClosed().subscribe((resp: { value: string }) => {
|
||||||
if (resp && resp !== this.user.userName) {
|
if (resp && resp.value && resp.value !== this.user.userName) {
|
||||||
this.userService
|
this.userService
|
||||||
.updateMyUserName(resp)
|
.updateMyUserName(resp.value)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
this.toast.showInfo('USER.TOAST.USERNAMECHANGED', true);
|
this.toast.showInfo('USER.TOAST.USERNAMECHANGED', true);
|
||||||
this.refreshUser();
|
this.refreshUser();
|
||||||
|
@ -85,7 +85,7 @@ export class UserDetailComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public changeUsername(): void {
|
public changeUsername(): void {
|
||||||
const dialogRefPhone = this.dialog.open(EditDialogComponent, {
|
const dialogRef = this.dialog.open(EditDialogComponent, {
|
||||||
data: {
|
data: {
|
||||||
confirmKey: 'ACTIONS.CHANGE',
|
confirmKey: 'ACTIONS.CHANGE',
|
||||||
cancelKey: 'ACTIONS.CANCEL',
|
cancelKey: 'ACTIONS.CANCEL',
|
||||||
@ -97,10 +97,10 @@ export class UserDetailComponent implements OnInit {
|
|||||||
width: '400px',
|
width: '400px',
|
||||||
});
|
});
|
||||||
|
|
||||||
dialogRefPhone.afterClosed().subscribe((resp) => {
|
dialogRef.afterClosed().subscribe((resp: { value: string }) => {
|
||||||
if (resp && resp !== this.user.userName) {
|
if (resp.value && resp.value !== this.user.userName) {
|
||||||
this.mgmtUserService
|
this.mgmtUserService
|
||||||
.updateUserName(this.user.id, resp)
|
.updateUserName(this.user.id, resp.value)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
this.toast.showInfo('USER.TOAST.USERNAMECHANGED', true);
|
this.toast.showInfo('USER.TOAST.USERNAMECHANGED', true);
|
||||||
this.refreshUser();
|
this.refreshUser();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user