From ed95d19b93fed85e6664b15bad6e83617d49cf82 Mon Sep 17 00:00:00 2001 From: Pavlo Tkach <3469726+ptkach@users.noreply.github.com> Date: Fri, 21 Feb 2025 15:30:03 -0500 Subject: [PATCH] Provide prompt for user deletion UI (#2684) --- .../src/app/domains/domainList.component.ts | 2 +- .../src/app/users/userDetails.component.ts | 29 ++++++++++++------- 2 files changed, 19 insertions(+), 12 deletions(-) diff --git a/console-webapp/src/app/domains/domainList.component.ts b/console-webapp/src/app/domains/domainList.component.ts index 4f8eefe81..f29e7ef2d 100644 --- a/console-webapp/src/app/domains/domainList.component.ts +++ b/console-webapp/src/app/domains/domainList.component.ts @@ -76,7 +76,7 @@ enum Operation { selector: 'app-reason-dialog', template: `

- Please provide a reason for {{ data.operation }} the domain(s): + Please provide the (EPP) reason for {{ data.operation }} the domain(s):

diff --git a/console-webapp/src/app/users/userDetails.component.ts b/console-webapp/src/app/users/userDetails.component.ts index b7acde44c..2aeb5e785 100644 --- a/console-webapp/src/app/users/userDetails.component.ts +++ b/console-webapp/src/app/users/userDetails.component.ts @@ -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() {