[Library|Trunk]

Monitor - stakeholder: add additional description field

Session: add isKindOfMonitorManager 


git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-library/trunk/ng-openaire-library/src/app@59712 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
argiro.kokogiannaki 2020-10-29 08:52:05 +00:00
parent 707f5a7513
commit 70bd85ad49
2 changed files with 13 additions and 1 deletions

View File

@ -87,6 +87,16 @@ export class Session{
public static isManager(type: string, id: string, user: User): boolean {
return user && user.role.indexOf(type.toUpperCase() + '_' + id.toUpperCase() + '_MANAGER') !== -1
}
public static isKindOfMonitorManager(user: User): boolean {
if(user){
for(let role of user.role ){
if(role.indexOf('_MANAGER') !== -1){
return true;
}
}
}
return false;
}
public static isRegisteredUser(user: User): boolean {
return user &&

View File

@ -146,6 +146,7 @@ export class Indicator {
_id: string;
name: string;
description: string;
additionalDescription: string;
type: IndicatorType;
width: IndicatorWidth;
tags: string[];
@ -154,10 +155,11 @@ export class Indicator {
indicatorPaths: IndicatorPath[];
recommendedFor: string[];
constructor(name: string, description: string, type: IndicatorType, width: IndicatorWidth, visibility: Visibility, indicatorPaths: IndicatorPath[], defaultId: string = null) {
constructor(name: string, description: string, additionalDescription:string, type: IndicatorType, width: IndicatorWidth, visibility: Visibility, indicatorPaths: IndicatorPath[], defaultId: string = null) {
this._id = null;
this.name = name;
this.description = description;
this.additionalDescription = additionalDescription;
this.type = type;
this.width = width;
this.visibility = visibility;