[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:
parent
707f5a7513
commit
70bd85ad49
|
@ -87,6 +87,16 @@ export class Session{
|
||||||
public static isManager(type: string, id: string, user: User): boolean {
|
public static isManager(type: string, id: string, user: User): boolean {
|
||||||
return user && user.role.indexOf(type.toUpperCase() + '_' + id.toUpperCase() + '_MANAGER') !== -1
|
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 {
|
public static isRegisteredUser(user: User): boolean {
|
||||||
return user &&
|
return user &&
|
||||||
|
|
|
@ -146,6 +146,7 @@ export class Indicator {
|
||||||
_id: string;
|
_id: string;
|
||||||
name: string;
|
name: string;
|
||||||
description: string;
|
description: string;
|
||||||
|
additionalDescription: string;
|
||||||
type: IndicatorType;
|
type: IndicatorType;
|
||||||
width: IndicatorWidth;
|
width: IndicatorWidth;
|
||||||
tags: string[];
|
tags: string[];
|
||||||
|
@ -154,10 +155,11 @@ export class Indicator {
|
||||||
indicatorPaths: IndicatorPath[];
|
indicatorPaths: IndicatorPath[];
|
||||||
recommendedFor: string[];
|
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._id = null;
|
||||||
this.name = name;
|
this.name = name;
|
||||||
this.description = description;
|
this.description = description;
|
||||||
|
this.additionalDescription = additionalDescription;
|
||||||
this.type = type;
|
this.type = type;
|
||||||
this.width = width;
|
this.width = width;
|
||||||
this.visibility = visibility;
|
this.visibility = visibility;
|
||||||
|
|
Loading…
Reference in New Issue