Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(advanced search): update comparison operators in case of rich text (DEV-326) #633

Merged
merged 2 commits into from Jan 12, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
@@ -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