Add console bulk delete (#2641)

* Add bulk actions to console

* Add console bulk delete

* Add console bulk delete
This commit is contained in:
Pavlo Tkach
2025-01-22 15:54:59 +00:00
committed by GitHub
parent 799f0449ad
commit e3c386a8a7
22 changed files with 359 additions and 46 deletions
@@ -19,6 +19,7 @@ export enum RESTRICTED_ELEMENTS {
REGISTRAR_ELEMENT,
OTE,
USERS,
BULK_DELETE,
}
export const DISABLED_ELEMENTS_PER_ROLE = {
@@ -26,6 +27,7 @@ export const DISABLED_ELEMENTS_PER_ROLE = {
RESTRICTED_ELEMENTS.REGISTRAR_ELEMENT,
RESTRICTED_ELEMENTS.OTE,
RESTRICTED_ELEMENTS.USERS,
RESTRICTED_ELEMENTS.BULK_DELETE,
],
SUPPORT_LEAD: [RESTRICTED_ELEMENTS.USERS],
SUPPORT_AGENT: [RESTRICTED_ELEMENTS.USERS],
@@ -180,6 +180,23 @@ export class BackendService {
.pipe(catchError((err) => this.errorCatcher<any>(err)));
}
bulkDomainAction(
domainNames: string[],
reason: string,
bulkDomainAction: string,
registrarId: string
) {
return this.http
.post<any>(
`/console-api/bulk-domain?registrarId=${registrarId}&bulkDomainAction=${bulkDomainAction}`,
{
domainList: domainNames,
reason,
}
)
.pipe(catchError((err) => this.errorCatcher<any>(err)));
}
updateUser(registrarId: string, updatedUser: User): Observable<any> {
return this.http
.put<User>(`/console-api/users?registrarId=${registrarId}`, updatedUser)