UI: fixed error on save relation qeury alias with empty relation filter, not option disabled if relation type is empty
This commit is contained in:
parent
2c2273d15b
commit
0968de8881
@ -145,7 +145,7 @@ export class EntityAliasDialogComponent extends DialogComponent<EntityAliasDialo
|
||||
if (!isEmpty(this.alias.filter?.filters)) {
|
||||
this.alias.filter.filters = this.alias.filter.filters.filter((value, index, self) =>
|
||||
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) {
|
||||
|
||||
@ -27,7 +27,10 @@
|
||||
<div class="tb-form-table-row align-start"
|
||||
*ngFor="let relationFilterControl of relationFiltersFormArray.controls; let $index = index">
|
||||
<mat-chip-listbox *ngIf="enableNotOption" class="flex-18 center-stretch" [formControl]="relationFilterControl.get('negate')">
|
||||
<mat-chip-option color="primary" [value]="true">{{ 'relation.not' | translate}}</mat-chip-option>
|
||||
<mat-chip-option color="primary" [value]="true"
|
||||
[disabled]="!relationFilterControl.get('relationType').value">
|
||||
{{ 'relation.not' | translate}}
|
||||
</mat-chip-option>
|
||||
</mat-chip-listbox>
|
||||
<tb-relation-type-autocomplete subscriptSizing="dynamic"
|
||||
class="flex-50" showLabel="false"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user