From fbb8039c3da7177a066d1999ac7807f35ee9e52d Mon Sep 17 00:00:00 2001 From: Vladyslav_Prykhodko Date: Tue, 7 Jan 2025 11:51:51 +0200 Subject: [PATCH] UI: Improved recipient table config --- .../recipient/recipient-table-config.resolver.ts | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/ui-ngx/src/app/modules/home/pages/notification/recipient/recipient-table-config.resolver.ts b/ui-ngx/src/app/modules/home/pages/notification/recipient/recipient-table-config.resolver.ts index 3d8764413d..5cb91db712 100644 --- a/ui-ngx/src/app/modules/home/pages/notification/recipient/recipient-table-config.resolver.ts +++ b/ui-ngx/src/app/modules/home/pages/notification/recipient/recipient-table-config.resolver.ts @@ -15,7 +15,6 @@ /// import { - CellActionDescriptor, DateEntityTableColumn, EntityTableColumn, EntityTableConfig @@ -66,13 +65,10 @@ export class RecipientTableConfigResolver { this.config.deleteEntity = id => this.notificationService.deleteNotificationTarget(id.id); - this.config.cellActionDescriptors = this.configureCellActions(); - this.config.defaultSortOrder = {property: 'createdTime', direction: Direction.DESC}; this.config.handleRowClick = ($event, target) => { - $event?.stopPropagation(); - this.notificationTargetDialog(target).subscribe(res => res ? this.config.updateData() : null); + this.editTarget($event, target); return true; }; @@ -92,8 +88,9 @@ export class RecipientTableConfigResolver { return this.config; } - private configureCellActions(): Array> { - return []; + private editTarget($event: Event, target: NotificationTarget): void { + $event?.stopPropagation(); + this.notificationTargetDialog(target).subscribe(res => res ? this.config.updateData() : null); } private notificationTargetDialog(target: NotificationTarget, isAdd = false): Observable {