diff --git a/ui/src/routes/WorkingHours/Formular.svelte b/ui/src/routes/WorkingHours/Formular.svelte index c8c1d41..cd78af2 100644 --- a/ui/src/routes/WorkingHours/Formular.svelte +++ b/ui/src/routes/WorkingHours/Formular.svelte @@ -12,10 +12,10 @@ Controller.nextDay() }); }, - 'nextDay': () => { + 'nextDay': async () => { let actDate = new TimekeepingDate(activeRecord.workingDay) let nextDay = actDate.getNextDay() - activeRecord = WorkingHoursRepository.readOrNew(nextDay.getDateString()) + activeRecord = await WorkingHoursRepository.readOrNew(nextDay.getDateString()) }, 'cancelActiveRecord': () => { activeRecord = null; diff --git a/ui/src/routes/WorkingHours/List.svelte b/ui/src/routes/WorkingHours/List.svelte index 741fce3..c6d7a32 100644 --- a/ui/src/routes/WorkingHours/List.svelte +++ b/ui/src/routes/WorkingHours/List.svelte @@ -18,9 +18,9 @@ isLoading = false }); }, - 'newRecord': () => { + 'newRecord': async () => { const actDate = new TimekeepingDate() - activeRecord = WorkingHoursRepository.readOrNew(actDate.getDateString()) + activeRecord = await WorkingHoursRepository.readOrNew(actDate.getDateString()) }, 'selectActiveRecord': record => WorkingHoursRepository.read(record.workingDay).then(data => { if (data === null) {