Search Page: Fix an error with expression change. Change in all fields with vocubulary or entity plus pid the equality operator to exact.

This commit is contained in:
Konstantinos Triantafyllou 2022-06-02 17:44:56 +03:00
parent bc5f5860f9
commit c69ff39d03
3 changed files with 24 additions and 9 deletions

View File

@ -17,7 +17,7 @@ import {FullScreenModalComponent} from '../utils/modal/full-screen-modal/full-sc
template: ` template: `
<div class="deposit"> <div class="deposit">
<div class="uk-container uk-container-large uk-section uk-section-small uk-padding-remove-bottom"> <div class="uk-container uk-container-large uk-section uk-section-small uk-padding-remove-bottom">
<div class="uk-padding-small"> <div class="uk-padding-small uk-padding-remove-horizontal">
<breadcrumbs [breadcrumbs]="breadcrumbs"></breadcrumbs> <breadcrumbs [breadcrumbs]="breadcrumbs"></breadcrumbs>
</div> </div>
</div> </div>

View File

@ -1,4 +1,14 @@
import {ChangeDetectorRef, Component, ElementRef, Input, Output, ViewChild} from '@angular/core'; import {
ChangeDetectorRef,
Component,
ElementRef,
Input,
OnChanges,
OnDestroy,
OnInit,
Output, SimpleChanges,
ViewChild
} from '@angular/core';
import {Location} from '@angular/common'; import {Location} from '@angular/common';
import {ActivatedRoute, Router} from '@angular/router'; import {ActivatedRoute, Router} from '@angular/router';
import {Meta, Title} from '@angular/platform-browser'; import {Meta, Title} from '@angular/platform-browser';
@ -36,7 +46,7 @@ declare var UIkit: any;
selector: 'new-search-page', selector: 'new-search-page',
templateUrl: 'newSearchPage.component.html' templateUrl: 'newSearchPage.component.html'
}) })
export class NewSearchPageComponent { export class NewSearchPageComponent implements OnInit, OnDestroy, OnChanges {
@ViewChild('mobileFilters') mobileFilters: ElementRef; @ViewChild('mobileFilters') mobileFilters: ElementRef;
@Input() piwikSiteId = null; @Input() piwikSiteId = null;
@Input() hasPrefix: boolean = true; @Input() hasPrefix: boolean = true;
@ -228,6 +238,11 @@ export class NewSearchPageComponent {
}); });
} }
ngOnChanges(changes: SimpleChanges) {
this.cdr.detectChanges();
}
get disabled() { get disabled() {
return this.disableForms || this.disableRefineForms; return this.disableForms || this.disableRefineForms;
} }

View File

@ -72,7 +72,7 @@ export class SearchFields {
equalityOperator: "=", equalityOperator: "=",
filterType: null filterType: null
}, },
["pid"]: {name: "PID", type: "keyword", param: "pid", operator: "pd", equalityOperator: " = ", filterType: null}, ["pid"]: {name: "PID", type: "keyword", param: "pid", operator: "pd", equalityOperator: " exact ", filterType: null},
["resulthostingdatasourceid"]: { ["resulthostingdatasourceid"]: {
name: "Hosting "+OpenaireEntities.DATASOURCE, name: "Hosting "+OpenaireEntities.DATASOURCE,
type: "entity", type: "entity",
@ -280,7 +280,7 @@ export class SearchFields {
filterType: null filterType: null
}, },
["projectkeywords"]: { ["projectkeywords"]: {
name: "Keywords", name: "Keyword",
type: "keyword", type: "keyword",
param: "keywords", param: "keywords",
operator: "ky", operator: "ky",
@ -515,7 +515,7 @@ export class SearchFields {
type: "vocabulary", type: "vocabulary",
param: "country", param: "country",
operator: "cu", operator: "cu",
equalityOperator: "=", equalityOperator: " exact ",
filterType: "checkbox" filterType: "checkbox"
}, },
["datasourcethematic"]: { ["datasourcethematic"]: {
@ -531,7 +531,7 @@ export class SearchFields {
type: "vocabulary", type: "vocabulary",
param: "jurisdiction", param: "jurisdiction",
operator: "ju", operator: "ju",
equalityOperator: "=", equalityOperator: " exact ",
filterType: "checkbox" filterType: "checkbox"
} }
}; };
@ -561,7 +561,7 @@ export class SearchFields {
type: "vocabulary", type: "vocabulary",
param: "country", param: "country",
operator: "cu", operator: "cu",
equalityOperator: "=", equalityOperator: " exact ",
filterType: "checkbox" filterType: "checkbox"
}, },
["datasourceodsubjects"]: { ["datasourceodsubjects"]: {
@ -622,7 +622,7 @@ export class SearchFields {
type: "vocabulary", type: "vocabulary",
param: "country", param: "country",
operator: "cu", operator: "cu",
equalityOperator: "=", equalityOperator: " exact ",
filterType: "checkbox" filterType: "checkbox"
}, },
}; };