Save original teacher in substitution entries

This commit is contained in:
2022-06-02 16:30:33 +02:00
parent 50baefabfe
commit 5c4bf21a77
3 changed files with 9 additions and 1 deletions

View File

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