Project

General

Profile

« Previous | Next » 

Revision 59712

[Library|Trunk]
Monitor - stakeholder: add additional description field

Session: add isKindOfMonitorManager

View differences:

modules/uoa-services-library/trunk/ng-openaire-library/src/app/monitor/entities/stakeholder.ts
146 146
  _id: string;
147 147
  name: string;
148 148
  description: string;
149
  additionalDescription: string;
149 150
  type: IndicatorType;
150 151
  width: IndicatorWidth;
151 152
  tags: string[];
......
154 155
  indicatorPaths: IndicatorPath[];
155 156
  recommendedFor: string[];
156 157
  
157
  constructor(name: string, description: string, type: IndicatorType, width: IndicatorWidth, visibility: Visibility, indicatorPaths: IndicatorPath[], defaultId: string = null) {
158
  constructor(name: string, description: string, additionalDescription:string, type: IndicatorType, width: IndicatorWidth, visibility: Visibility, indicatorPaths: IndicatorPath[], defaultId: string = null) {
158 159
    this._id = null;
159 160
    this.name = name;
160 161
    this.description = description;
162
    this.additionalDescription = additionalDescription;
161 163
    this.type = type;
162 164
    this.width = width;
163 165
    this.visibility = visibility;
modules/uoa-services-library/trunk/ng-openaire-library/src/app/login/utils/helper.class.ts
87 87
  public static isManager(type: string, id: string, user: User): boolean {
88 88
    return user && user.role.indexOf(type.toUpperCase() + '_' + id.toUpperCase() + '_MANAGER') !== -1
89 89
  }
90
    public static isKindOfMonitorManager(user: User): boolean {
91
        if(user){
92
            for(let role of user.role ){
93
                if(role.indexOf('_MANAGER') !== -1){
94
                    return true;
95
                }
96
            }
97
        }
98
        return false;
99
    }
90 100

  
91 101
  public static isRegisteredUser(user: User): boolean {
92 102
    return user &&

Also available in: Unified diff