From 0968de8881743a6a8a6dc674ac8855875e66f987 Mon Sep 17 00:00:00 2001 From: rusikv Date: Mon, 10 Jun 2024 16:44:54 +0300 Subject: [PATCH 1/3] UI: fixed error on save relation qeury alias with empty relation filter, not option disabled if relation type is empty --- .../home/components/alias/entity-alias-dialog.component.ts | 2 +- .../home/components/relation/relation-filters.component.html | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) 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 21d90e0c12..ac25981f6e 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 @@ -145,7 +145,7 @@ export class EntityAliasDialogComponent extends DialogComponent self.findIndex(v => v.relationType === value.relationType && isEqual(v.entityTypes, value.entityTypes)) === index && - (value.relationType || value.entityTypes.length) + (value.relationType || value.entityTypes?.length) ); } if (this.alias.filter.type) { diff --git a/ui-ngx/src/app/modules/home/components/relation/relation-filters.component.html b/ui-ngx/src/app/modules/home/components/relation/relation-filters.component.html index 055b5df22e..1d6fdb7ea1 100644 --- a/ui-ngx/src/app/modules/home/components/relation/relation-filters.component.html +++ b/ui-ngx/src/app/modules/home/components/relation/relation-filters.component.html @@ -27,7 +27,10 @@
- {{ 'relation.not' | translate}} + + {{ 'relation.not' | translate}} + Date: Mon, 10 Jun 2024 17:25:09 +0300 Subject: [PATCH 2/3] UI: set value of not option to false if relation type cleared --- .../relation/relation-filters.component.html | 5 +---- .../relation/relation-filters.component.ts | 12 +++++++++++- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/ui-ngx/src/app/modules/home/components/relation/relation-filters.component.html b/ui-ngx/src/app/modules/home/components/relation/relation-filters.component.html index 1d6fdb7ea1..6973a6a32d 100644 --- a/ui-ngx/src/app/modules/home/components/relation/relation-filters.component.html +++ b/ui-ngx/src/app/modules/home/components/relation/relation-filters.component.html @@ -27,10 +27,7 @@
- - {{ 'relation.not' | translate}} - + {{ 'relation.not' | translate }} { + if (value) { + formGroup.get('negate').enable({emitEvent: false}); + } else { + formGroup.get('negate').setValue(false, {emitEvent:false}); + formGroup.get('negate').disable({emitEvent: false}); + } + }); } return formGroup; } From 1b854fb87667f82e89e11a16d04f7da273bfc796 Mon Sep 17 00:00:00 2001 From: rusikv Date: Tue, 11 Jun 2024 11:36:45 +0300 Subject: [PATCH 3/3] UI: removed negate option set to false on relation types clear of relation filters --- .../home/components/relation/relation-filters.component.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/ui-ngx/src/app/modules/home/components/relation/relation-filters.component.ts b/ui-ngx/src/app/modules/home/components/relation/relation-filters.component.ts index 5bbce12bec..66d188248a 100644 --- a/ui-ngx/src/app/modules/home/components/relation/relation-filters.component.ts +++ b/ui-ngx/src/app/modules/home/components/relation/relation-filters.component.ts @@ -135,7 +135,6 @@ export class RelationFiltersComponent extends PageComponent implements ControlVa if (value) { formGroup.get('negate').enable({emitEvent: false}); } else { - formGroup.get('negate').setValue(false, {emitEvent:false}); formGroup.get('negate').disable({emitEvent: false}); } });