Browse Source

UI: Refactoring

pull/9735/head
Artem Dzhereleiko 3 years ago
parent
commit
e8371389ad
  1. 4
      ui-ngx/src/app/modules/home/components/dashboard-page/states/manage-dashboard-states-dialog.component.ts

4
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')} `; const suffix = ` - ${this.translate.instant('action.copy')} `;
let counter = 0; let counter = 0;
while (++counter < Number.MAX_SAFE_INTEGER) { while (++counter < Number.MAX_SAFE_INTEGER) {
const newName = `${filterName}${suffix}${counter}`; const newName = `${stateName}${suffix}${counter}`;
if (!this.stateNames.has(newName)) { if (!this.stateNames.has(newName)) {
return newName; return newName;
} }

Loading…
Cancel
Save