Skip to content

Commit

Permalink
fix(advanced search): update comparison operators in case of rich text (
Browse files Browse the repository at this point in the history
  • Loading branch information
kilchenmann committed Jan 12, 2022
1 parent 3d029a1 commit cd01d87
Showing 1 changed file with 8 additions and 4 deletions.
@@ -1,6 +1,7 @@
import { AfterViewChecked, AfterViewInit, Component, Inject, Input, OnChanges, OnDestroy, ViewChild } from '@angular/core';
import { Constants, ResourcePropertyDefinition } from '@dasch-swiss/dsp-js';
import { Component, Inject, Input, OnChanges, OnDestroy, ViewChild } from '@angular/core';
import { FormBuilder, FormGroup, Validators } from '@angular/forms';
import { Constants, ResourcePropertyDefinition } from '@dasch-swiss/dsp-js';
import { Subscription } from 'rxjs';
import {
ComparisonOperator, ComparisonOperatorAndValue,
Equals,
Expand All @@ -13,7 +14,6 @@ import {
Match,
NotEquals, PropertyValue, Value
} from './operator';
import { Subscription } from 'rxjs';

// https://stackoverflow.com/questions/45661010/dynamic-nested-reactive-form-expressionchangedafterithasbeencheckederror
const resolvedPromise = Promise.resolve(null);
Expand Down Expand Up @@ -118,7 +118,11 @@ export class SpecifyPropertyValueComponent implements OnChanges, OnDestroy {
switch (this.propertyValueType) {

case Constants.TextValue:
this.comparisonOperators = [new Like(), new Match(), new Equals(), new NotEquals(), new Exists()];
if (this._property.guiElement === Constants.SalsahGui + Constants.HashDelimiter + 'Richtext') {
this.comparisonOperators = [new Like(), new Match(), new Exists()];
} else {
this.comparisonOperators = [new Like(), new Match(), new Equals(), new NotEquals(), new Exists()];
}
break;

case Constants.BooleanValue:
Expand Down

0 comments on commit cd01d87

Please sign in to comment.