From 8b58bb60e970591d9656f1d9f45954dd8a8d05c3 Mon Sep 17 00:00:00 2001 From: Denys Vuika Date: Wed, 8 Jan 2025 15:52:23 -0500 Subject: [PATCH] cleanup [ci:force] --- .../task-filters/task-filters-cloud.component.ts | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/lib/process-services-cloud/src/lib/task/task-filters/components/task-filters/task-filters-cloud.component.ts b/lib/process-services-cloud/src/lib/task/task-filters/components/task-filters/task-filters-cloud.component.ts index a491a1379d..f9daf4474c 100644 --- a/lib/process-services-cloud/src/lib/task/task-filters/components/task-filters/task-filters-cloud.component.ts +++ b/lib/process-services-cloud/src/lib/task/task-filters/components/task-filters/task-filters-cloud.component.ts @@ -97,8 +97,8 @@ export class TaskFiltersCloudComponent extends BaseTaskFiltersCloudComponent imp getFilters(appName: string): void { this.filters$ = this.taskFilterCloudService.getTaskListFilters(appName); - this.filters$.pipe(takeUntilDestroyed(this.destroyRef)).subscribe( - (res) => { + this.filters$.pipe(takeUntilDestroyed(this.destroyRef)).subscribe({ + next: (res) => { this.resetFilter(); this.filters = res || []; this.initFilterCounters(); @@ -106,10 +106,10 @@ export class TaskFiltersCloudComponent extends BaseTaskFiltersCloudComponent imp this.updateFilterCounters(); this.success.emit(res); }, - (err: any) => { + error: (err) => { this.error.emit(err); } - ); + }); } /** @@ -160,8 +160,8 @@ export class TaskFiltersCloudComponent extends BaseTaskFiltersCloudComponent imp this.taskFilterCloudService .getTaskNotificationSubscription(this.appName) .pipe(debounceTime(1000)) - .subscribe((result: TaskCloudEngineEvent[]) => { - result.map((taskEvent: TaskCloudEngineEvent) => { + .subscribe((result) => { + result.forEach((taskEvent) => { this.checkFilterCounter(taskEvent.entity); }); @@ -172,7 +172,7 @@ export class TaskFiltersCloudComponent extends BaseTaskFiltersCloudComponent imp } checkFilterCounter(filterNotification: TaskDetailsCloudModel) { - this.filters.map((filter) => { + this.filters.forEach((filter) => { if (this.isFilterPresent(filter, filterNotification)) { this.addToUpdatedCounters(filter.key); } @@ -234,6 +234,7 @@ export class TaskFiltersCloudComponent extends BaseTaskFiltersCloudComponent imp } /** + * @deprecated unused method * Select as default task filter the first in the list */ public selectDefaultTaskFilter() {