diff options
| -rw-r--r-- | package.json | 2 | ||||
| -rw-r--r-- | src/models/EventInfo.ts | 6 | ||||
| -rw-r--r-- | src/models/PeerTeacher.ts | 4 |
3 files changed, 6 insertions, 6 deletions
diff --git a/package.json b/package.json index 879c77a..dd035af 100644 --- a/package.json +++ b/package.json @@ -31,4 +31,4 @@ "dependencies": { "sirv-cli": "^1.0.0" } -} +}
\ No newline at end of file diff --git a/src/models/EventInfo.ts b/src/models/EventInfo.ts index b0ac25b..a6819db 100644 --- a/src/models/EventInfo.ts +++ b/src/models/EventInfo.ts @@ -22,7 +22,7 @@ export default class EventInfo { this.end = end; } - static fromJSON({days, start, end}: EventInfoSerializeInfo) { + static fromJSON({ days, start, end }: EventInfoSerializeInfo) { return new EventInfo(days, start, end); } @@ -49,9 +49,9 @@ export default class EventInfo { } get info() { - if(this.days === "") { + if (this.days === "") { return `WEB`; - }else if(this.start === -1 || this.end === -1) { + } else if (this.start === -1 || this.end === -1) { return `${this.days}`; } else { return `${this.days} ${EventInfo.timeToStr(this.start)}-${EventInfo.timeToStr(this.end)}`; diff --git a/src/models/PeerTeacher.ts b/src/models/PeerTeacher.ts index 5d955fd..a93e7de 100644 --- a/src/models/PeerTeacher.ts +++ b/src/models/PeerTeacher.ts @@ -20,7 +20,7 @@ export default class PeerTeacher { labs: Set<number>; constructor(id: number | string, firstname: string, lastname: string) { - if(typeof id === "string") { + if (typeof id === "string") { id = parseInt(id, 10); } @@ -31,7 +31,7 @@ export default class PeerTeacher { this.labs = new Set(); } - static fromJSON({id, firstname, lastname, events, labs}: PeerTeacherSerializeInfo) { + static fromJSON({ id, firstname, lastname, events, labs }: PeerTeacherSerializeInfo) { const pt = new PeerTeacher(id, firstname, lastname); pt.events = events.map(e => EventInfo.fromJSON(e)); pt.labs = new Set(labs); |
