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';
|
||||
|
||||
export class FriendInfo {
|
||||
levellist: Levellist = new Levellist();
|
||||
id: number;
|
||||
name: string;
|
||||
rankname: string;
|
||||
rankname = 'Rookie';
|
||||
profilePicture: string;
|
||||
|
||||
constructor(pId: number, pName: string, pLevel: number, pic: string) {
|
||||
this.id = pId;
|
||||
this.name = pName;
|
||||
this.rankname = this.levellist.getLevelName(pLevel);
|
||||
constructor(id: number, name: string, level: {name: string}, pic: string) {
|
||||
this.id = id;
|
||||
this.name = name;
|
||||
if (level) {
|
||||
this.rankname = level.name;
|
||||
}
|
||||
this.profilePicture = pic;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue