Merge branch 'julius-dev' of Software_Engineering_I/greenvironment-frontend into master
commit
2eabc80eec
@ -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