diff --git a/ui-ngx/src/app/modules/home/components/alias/entity-alias-dialog.component.ts b/ui-ngx/src/app/modules/home/components/alias/entity-alias-dialog.component.ts index 6cc8b0e59b..d06f94b552 100644 --- a/ui-ngx/src/app/modules/home/components/alias/entity-alias-dialog.component.ts +++ b/ui-ngx/src/app/modules/home/components/alias/entity-alias-dialog.component.ts @@ -20,11 +20,11 @@ import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog'; import { Store } from '@ngrx/store'; import { AppState } from '@core/core.state'; import { + FormGroupDirective, + NgForm, UntypedFormBuilder, UntypedFormControl, UntypedFormGroup, - FormGroupDirective, - NgForm, ValidatorFn, Validators } from '@angular/forms'; @@ -36,6 +36,7 @@ import { UtilsService } from '@core/services/utils.service'; import { TranslateService } from '@ngx-translate/core'; import { EntityService } from '@core/http/entity.service'; import { Observable } from 'rxjs'; +import { isEmpty, isEqual } from '@core/utils'; export interface EntityAliasDialogData { isAdd: boolean; @@ -141,6 +142,12 @@ export class EntityAliasDialogComponent extends DialogComponent + self.findIndex(v => v.relationType === value.relationType && isEqual(v.entityTypes, value.entityTypes)) === index && + (value.relationType || value.entityTypes.length) + ); + } if (this.alias.filter.type) { this.validate().subscribe(() => { if (this.isAdd) {