feat: 🎸 Ämnesnamn syns nu i schemat i Hjärntorget. (#596)

* feat: 🎸 Curriculum names in hjarntorget

* style: 💄 removed commented code
This commit is contained in:
Kajetan Kazimierczak 2021-12-11 00:15:04 +01:00 committed by GitHub
parent 555ba0fb0f
commit 14ff985b0c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -51,6 +51,7 @@ import {
verifyUrlBase,
wallMessagesUrl,
} from './routes'
import parse from '@skolplattformen/curriculum'
function getDateOfISOWeek(week: number, year: number) {
const simple = new Date(year, 0, 1 + (week - 1) * 7)
@ -470,9 +471,8 @@ export class ApiHjarntorget extends EventEmitter implements Api {
zone: FixedOffsetZone.instance(l.endDate.timezoneOffsetMinutes),
})
return {
...parse(l.title, _lang),
id: l.id,
code: l.title,
name: l.title,
teacher: l.bookedTeacherNames && l.bookedTeacherNames[0],
location: l.location,
timeStart: start.toISOTime().substring(0, 5),
@ -480,7 +480,7 @@ export class ApiHjarntorget extends EventEmitter implements Api {
dayOfWeek: start.toJSDate().getDay(),
blockName: l.title,
dateStart: start.toISODate(),
dateEnd: start.toISODate(),
dateEnd: end.toISODate(),
} as TimetableEntry
})
}