blob: 00a2f0dcef8a5cc17d47f599825d6c7d2ae585ad (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
export default class PeerTeacher {
constructor(firstname = '', lastname = '', uin = 0) {
this.firstname = firstname;
this.lastname = lastname;
this.uin = uin;
this.events = [];
this.assignedLabs = new Set();
}
conflictsWith(event) {
let conflicts = false;
this.events.every((item) => {
if (item.conflictsWith(event)) {
conflicts = true;
return false;
}
return true;
});
return conflicts;
}
get name() {
return `${this.firstname} ${this.lastname}`;
}
get id() {
return this.uin;
}
}
|