Merge branch 'master' of Software_Engineering_I/greenvironment-frontend into max_dev
commit
5b2b5c0936
@ -1,16 +1,17 @@
|
|||||||
import {Levellist} from 'src/app/models/levellist';
|
import {Levellist} from 'src/app/models/levellist';
|
||||||
|
|
||||||
export class FriendInfo {
|
export class FriendInfo {
|
||||||
levellist: Levellist = new Levellist();
|
|
||||||
id: number;
|
id: number;
|
||||||
name: string;
|
name: string;
|
||||||
rankname: string;
|
rankname = 'Rookie';
|
||||||
profilePicture: string;
|
profilePicture: string;
|
||||||
|
|
||||||
constructor(pId: number, pName: string, pLevel: number, pic: string) {
|
constructor(id: number, name: string, level: {name: string}, pic: string) {
|
||||||
this.id = pId;
|
this.id = id;
|
||||||
this.name = pName;
|
this.name = name;
|
||||||
this.rankname = this.levellist.getLevelName(pLevel);
|
if (level) {
|
||||||
|
this.rankname = level.name;
|
||||||
|
}
|
||||||
this.profilePicture = pic;
|
this.profilePicture = pic;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue