From e8371389ade2e59caef5b3cba96f1dd62f309f5f Mon Sep 17 00:00:00 2001 From: Artem Dzhereleiko Date: Thu, 30 Nov 2023 11:30:17 +0200 Subject: [PATCH] UI: Refactoring --- .../states/manage-dashboard-states-dialog.component.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ui-ngx/src/app/modules/home/components/dashboard-page/states/manage-dashboard-states-dialog.component.ts b/ui-ngx/src/app/modules/home/components/dashboard-page/states/manage-dashboard-states-dialog.component.ts index 4df881fe40..2a49be563a 100644 --- a/ui-ngx/src/app/modules/home/components/dashboard-page/states/manage-dashboard-states-dialog.component.ts +++ b/ui-ngx/src/app/modules/home/components/dashboard-page/states/manage-dashboard-states-dialog.component.ts @@ -271,11 +271,11 @@ export class ManageDashboardStatesDialogComponent } } - private getNextDuplicatedName(filterName: string): string { + private getNextDuplicatedName(stateName: string): string { const suffix = ` - ${this.translate.instant('action.copy')} `; let counter = 0; while (++counter < Number.MAX_SAFE_INTEGER) { - const newName = `${filterName}${suffix}${counter}`; + const newName = `${stateName}${suffix}${counter}`; if (!this.stateNames.has(newName)) { return newName; }