Revision 60202
Added by Argiro Kokogiannaki over 3 years ago
stakeholder.ts | ||
---|---|---|
209 | 209 |
}else if (field == "project"){ |
210 | 210 |
return this.getProjectFilter(filterType); |
211 | 211 |
} |
212 |
//TODO add other options |
|
212 |
//TODO uncomment to add other options --> following doesn't work |
|
213 |
/* else if (field == "country"){ |
|
214 |
return this.getCountryFilter(filterType); |
|
215 |
}else if (field == "organization"){ |
|
216 |
return this.getOrganizationFilter(filterType); |
|
217 |
}*/ |
|
213 | 218 |
|
214 | 219 |
} |
215 | 220 |
static getResultFilter(dbType: string = null, filterType:FilterType) { |
... | ... | |
233 | 238 |
} |
234 | 239 |
} |
235 | 240 |
static getOrganizationFilter( filterType:FilterType) { |
236 |
if (filterType == "fundingL0") {
|
|
237 |
return '';
|
|
238 |
} else if (filterType == "start_year") {
|
|
239 |
return '';
|
|
240 |
} else if (filterType == "end_year") {
|
|
241 |
return '';
|
|
242 |
}
|
|
241 |
if (filterType == "fundingL0") { |
|
242 |
return '{"groupFilters":[{"field":"organization.project.funding level 0","type":"=","values":["' + ChartHelper.prefix + 'fundingL0' + ChartHelper.suffix + '"]}],"op":"AND"}';
|
|
243 |
} else if (filterType == "start_year") { |
|
244 |
return '{"groupFilters":[{"field":"organization.project.start year","type":">=","values":["' + ChartHelper.prefix + 'start_year' + ChartHelper.suffix + '"]}],"op":"AND"}';
|
|
245 |
} else if (filterType == "end_year") { |
|
246 |
return '{"groupFilters":[{"field":"organization.project.start year","type":"<=","values":["' + ChartHelper.prefix + 'end_year' + ChartHelper.suffix + '"]}],"op":"AND"}';
|
|
247 |
} |
|
243 | 248 |
} |
249 |
static getCountryFilter( filterType:FilterType) { |
|
250 |
if (filterType == "fundingL0") { |
|
251 |
return '{"groupFilters":[{"field":"country.organization.project.funding level 0","type":"=","values":["' + ChartHelper.prefix + 'fundingL0' + ChartHelper.suffix + '"]}],"op":"AND"}'; |
|
252 |
} else if (filterType == "start_year") { |
|
253 |
return '{"groupFilters":[{"field":"country.organization.project.start year","type":">=","values":["' + ChartHelper.prefix + 'start_year' + ChartHelper.suffix + '"]}],"op":"AND"}'; |
|
254 |
} else if (filterType == "end_year") { |
|
255 |
return '{"groupFilters":[{"field":"country.organization.project.start year","type":"<=","values":["' + ChartHelper.prefix + 'end_year' + ChartHelper.suffix + '"]}],"op":"AND"}'; |
|
256 |
} |
|
257 |
} |
|
244 | 258 |
|
245 | 259 |
static filterIndexOf(filterToAdd, currentFilters):any{ |
246 | 260 |
for(let fi =0; fi< currentFilters.length; fi++){ |
Also available in: Unified diff
[Library | Trunk]
Dashboard - Admin tool pages:
- add tabs components
- add rout module (without guards)
- put tabs and page-content in pages, classes, entities pages
Stakeholder:
initial try to add filters for country and organization fields (doesn't work properly)