mirror of
https://github.com/google/nomulus
synced 2025-12-23 06:15:42 +00:00
Provide prompt for user deletion UI (#2684)
This commit is contained in:
@@ -76,7 +76,7 @@ enum Operation {
|
||||
selector: 'app-reason-dialog',
|
||||
template: `
|
||||
<h2 mat-dialog-title>
|
||||
Please provide a reason for {{ data.operation }} the domain(s):
|
||||
Please provide the (EPP) reason for {{ data.operation }} the domain(s):
|
||||
</h2>
|
||||
<mat-dialog-content>
|
||||
<mat-form-field appearance="outline" style="width:100%">
|
||||
|
||||
@@ -67,17 +67,24 @@ export class UserDetailsComponent {
|
||||
}
|
||||
|
||||
deleteUser() {
|
||||
this.isLoading = true;
|
||||
this.usersService.deleteUser(this.userDetails()).subscribe({
|
||||
error: (err) => {
|
||||
this._snackBar.open(err.error || err.message);
|
||||
this.isLoading = false;
|
||||
},
|
||||
complete: () => {
|
||||
this.isLoading = false;
|
||||
this.goBack();
|
||||
},
|
||||
});
|
||||
if (
|
||||
confirm(
|
||||
'This will permanently delete the user ' +
|
||||
this.userDetails().emailAddress
|
||||
)
|
||||
) {
|
||||
this.isLoading = true;
|
||||
this.usersService.deleteUser(this.userDetails()).subscribe({
|
||||
error: (err) => {
|
||||
this._snackBar.open(err.error || err.message);
|
||||
this.isLoading = false;
|
||||
},
|
||||
complete: () => {
|
||||
this.isLoading = false;
|
||||
this.goBack();
|
||||
},
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
goBack() {
|
||||
|
||||
Reference in New Issue
Block a user