[Library | develop]: helper.class.ts: Added return false in method "isCurator()" as fallback | stakeholder.ts: Added return "" in methods "getFilter()", "getResultFilter()", "getProjectFilter()", "getOrganizationFilter()", "getCountryFilter()" as fallback | string-utils.class.ts: Added return null in method "getPIDFromIdentifiers()" as fallback.
This commit is contained in:
parent
27f644aad1
commit
52fc9ce22a
|
@ -131,6 +131,7 @@ export class Session {
|
|||
} else if (type == 'project') {
|
||||
return user && this.isProjectCurator(user);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public static isPortalAdministrator(user: User): boolean {
|
||||
|
|
|
@ -246,6 +246,8 @@ export class IndicatorFilterUtils {
|
|||
}else if (table == "organization"){
|
||||
return this.getOrganizationFilter(filterType);
|
||||
}
|
||||
|
||||
return "";
|
||||
}
|
||||
static getResultFilter(table: string = null, filterType:FilterType) {
|
||||
//works for tables ["publication", "software", "dataset", "other", "result"]
|
||||
|
@ -258,24 +260,28 @@ export class IndicatorFilterUtils {
|
|||
}else if (filterType == "co-funded") {
|
||||
return '{"groupFilters":[{"field":"' + table + '.No of funders","type":">","values":["1"]}],"op":"AND"}';
|
||||
}
|
||||
return "";
|
||||
}
|
||||
static getProjectFilter( filterType:FilterType) {
|
||||
//works for table "project"
|
||||
if (filterType == "fundingL0") {
|
||||
return '{"groupFilters":[{"field":"project.funding level 0","type":"=","values":["' + ChartHelper.prefix + 'fundingL0' + ChartHelper.suffix + '"]}],"op":"AND"}';
|
||||
}
|
||||
return "";
|
||||
}
|
||||
static getOrganizationFilter( filterType:FilterType) {
|
||||
//works for table "organization"
|
||||
if (filterType == "fundingL0") {
|
||||
return '{"groupFilters":[{"field":"organization.project.funding level 0","type":"=","values":["' + ChartHelper.prefix + 'fundingL0' + ChartHelper.suffix + '"]}],"op":"AND"}';
|
||||
}
|
||||
return "";
|
||||
}
|
||||
static getCountryFilter( filterType:FilterType) {
|
||||
//works for table "country"
|
||||
if (filterType == "fundingL0") {
|
||||
return '{"groupFilters":[{"field":"country.organization.project.funding level 0","type":"=","values":["' + ChartHelper.prefix + 'fundingL0' + ChartHelper.suffix + '"]}],"op":"AND"}';
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
static filterIndexOf(filterToAdd, currentFilters):any{
|
||||
|
|
Loading…
Reference in New Issue