🐛 Fix notes not being displayed

This commit is contained in:
2022-05-04 14:34:27 +02:00
parent a04c7c627d
commit d9179cc611
2 changed files with 3 additions and 0 deletions

View File

@ -72,6 +72,7 @@ export async function getSubstitutions(req, res) {
type: element.type,
lesson: element.lesson,
date: new Date(element.date).getTime(),
notes: element.notes,
change: {},
};
if (element.changedRoom) substitution.change.room = element.changedRoom;
@ -131,6 +132,7 @@ export async function getHistory(req, res) {
updatedAt: new Date(element.createdAt).getTime(),
date: new Date(element.substitution.date).getTime(),
change: element.changes,
notes: element.notes,
parseEventId: element.parseEventId,
};
});

View File

@ -135,6 +135,7 @@ export class Parser {
type: change.type == "Entfall" ? "cancellation" : "change",
lesson: parseInt(change.lesson),
date: new Date(date),
notes: change.notes,
change: {
teacher: change.changedTeacher,
room: change.room || undefined,