diff --git a/monitor/entities/stakeholder.ts b/monitor/entities/stakeholder.ts index e31bf3aa..4cf2e81d 100644 --- a/monitor/entities/stakeholder.ts +++ b/monitor/entities/stakeholder.ts @@ -205,7 +205,7 @@ export class IndicatorPath { } } -export type FilterType = "fundingL0"|"start_year" | "end_year"; +export type FilterType = "fundingL0"|"start_year" | "end_year" | "co-funded"; export class IndicatorFilterUtils{ static getFilter(field: string, filterType:FilterType) { if(["publication", "software", "dataset", "other", "result"].indexOf(field)!=-1){ @@ -223,6 +223,8 @@ export class IndicatorFilterUtils{ return '{"groupFilters":[{"field":"' + dbType + '.year","type":">=","values":["' + ChartHelper.prefix + 'start_year' + ChartHelper.suffix + '"]}],"op":"AND"}'; } else if (filterType == "end_year") { return '{"groupFilters":[{"field":"' + dbType + '.year","type":"<=","values":["' + ChartHelper.prefix + 'end_year' + ChartHelper.suffix + '"]}],"op":"AND"}'; + }else if (filterType == "co-funded") { + return '{"groupFilters":[{"field":"' + dbType + '.No of funders","type":">","values":["1"]}],"op":"AND"}'; } } static getProjectFilter( filterType:FilterType) { diff --git a/searchPages/searchUtils/searchFilter.component.ts b/searchPages/searchUtils/searchFilter.component.ts index 6248ccf7..648307a1 100644 --- a/searchPages/searchUtils/searchFilter.component.ts +++ b/searchPages/searchUtils/searchFilter.component.ts @@ -66,7 +66,7 @@ export class SearchFilterComponent implements OnInit, OnChanges{ } public _formatTitle(title,length){ - return (((title+" ("+length+")").length >this._maxCharacters)?(title.substring(0,(this._maxCharacters - (" ("+length+")").length - ('...').length))+"..."):title+" ("+(length>95?"100":length)+")") + return (((title+" ("+length+")").length >this._maxCharacters)?(title.substring(0,(this._maxCharacters - (" ("+length+")").length - ('...').length))+"..."):title)+" ("+(length>95?"100":length)+")"; } public _formatName(value){ //let maxLineLength = 24;