Skip to content

Commit

Permalink
feat: 🎸 Ämnesnamn syns nu i schemat i Hjärntorget. (kolplattformen#596)
Browse files Browse the repository at this point in the history
* feat: 🎸 Curriculum names in hjarntorget

* style: 💄 removed commented code
  • Loading branch information
kajetan-kazimierczak authored Dec 10, 2021
1 parent 555ba0f commit 14ff985
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions libs/api-hjarntorget/lib/apiHjarntorget.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -470,17 +471,16 @@ 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),
timeEnd: end.toISOTime().substring(0, 5),
dayOfWeek: start.toJSDate().getDay(),
blockName: l.title,
dateStart: start.toISODate(),
dateEnd: start.toISODate(),
dateEnd: end.toISODate(),
} as TimetableEntry
})
}
Expand Down

0 comments on commit 14ff985

Please sign in to comment.