Revision 44826
Added by Argiro Kokogiannaki over 7 years ago
searchOrganizations.component.ts | ||
---|---|---|
23 | 23 |
}) |
24 | 24 |
export class SearchOrganizationsComponent { |
25 | 25 |
public results =[]; |
26 |
private filters =[]; |
|
27 |
// public totalResults:number = 0 ; |
|
28 |
private baseUrl:string; |
|
26 |
public filters =[]; |
|
27 |
public baseUrl:string; |
|
29 | 28 |
public searchUtils:SearchUtilsClass = new SearchUtilsClass(); |
30 |
private sub: any;
|
|
31 |
private subResults: any;
|
|
32 |
private searchFields:SearchFields = new SearchFields();
|
|
33 |
private refineFields: string[] = this.searchFields.ORGANIZATION_INDEX;
|
|
34 |
private indexIdsMap: { [key:string]:string } = this.searchFields.ORGANIZATION_INDEX_PARAM_MAP;
|
|
35 |
private fieldIdsMap: { [key:string]:{ name:string, operator:string, type:string, indexField:string, equalityOperator:string }} = this.searchFields.ORGANIZATION_FIELDS_MAP;
|
|
36 |
private urlParams : Map<string, string>;
|
|
37 |
private _location:Location;
|
|
29 |
public sub: any;
|
|
30 |
public subResults: any;
|
|
31 |
public searchFields:SearchFields = new SearchFields();
|
|
32 |
public refineFields: string[] = this.searchFields.ORGANIZATION_INDEX;
|
|
33 |
public indexIdsMap: { [key:string]:string } = this.searchFields.ORGANIZATION_INDEX_PARAM_MAP;
|
|
34 |
public fieldIdsMap: { [key:string]:{ name:string, operator:string, type:string, indexField:string, equalityOperator:string }} = this.searchFields.ORGANIZATION_FIELDS_MAP;
|
|
35 |
public urlParams : Map<string, string>;
|
|
36 |
public _location:Location;
|
|
38 | 37 |
|
39 | 38 |
@ViewChild (SearchPageComponent) searchPage : SearchPageComponent ; |
40 | 39 |
|
... | ... | |
46 | 45 |
|
47 | 46 |
} |
48 | 47 |
|
49 |
private ngOnInit() {
|
|
48 |
public ngOnInit() {
|
|
50 | 49 |
this.searchPage.refineFields = this.refineFields; |
51 | 50 |
this.searchPage.indexIdsMap = this.indexIdsMap; |
52 | 51 |
this.searchPage.fieldIdsMap = this.fieldIdsMap; |
... | ... | |
60 | 59 |
}); |
61 | 60 |
} |
62 | 61 |
|
63 |
private ngOnDestroy() {
|
|
62 |
public ngOnDestroy() {
|
|
64 | 63 |
if(this.sub){ |
65 | 64 |
this.sub.unsubscribe(); |
66 | 65 |
} |
... | ... | |
109 | 108 |
} |
110 | 109 |
|
111 | 110 |
|
112 |
private queryChanged($event) {
|
|
111 |
public queryChanged($event) {
|
|
113 | 112 |
var parameters = $event.value; |
114 | 113 |
console.info("queryChanged: Execute search query "+parameters); |
115 | 114 |
this._getResults(parameters, true, this.searchUtils.page, this.searchUtils.size); |
Also available in: Unified diff
Make class fields public for ngfactory | use new refine fields in order to display names - not