diff --git a/src/lib/components/Calendar/Editor.svelte b/src/lib/components/Calendar/Editor.svelte index 921ff5c..486adc1 100644 --- a/src/lib/components/Calendar/Editor.svelte +++ b/src/lib/components/Calendar/Editor.svelte @@ -25,18 +25,22 @@ const clickOnSave = async () => { try { - await markRowAsAvailable({ + const newRow = await markRowAsAvailable({ unsavedRow: unsavedRows[i], timeZone }); - dispatch('markedRow'); + + dispatch('markedRow', { + i, + newRow + }); } catch (err) { console.log(err); if (!(err instanceof Response)) { dispatch('markBadTime'); } - // alert('Something went wrong with saving'); // TODO: come up with better UI for showing err + alert('Something went wrong with saving'); // TODO: come up with better UI for showing err console.error('Something went wrong with marking row as available', err); } }; diff --git a/src/lib/components/Calendar/ScheduleTable.svelte b/src/lib/components/Calendar/ScheduleTable.svelte index 80c89ac..44e45bb 100644 --- a/src/lib/components/Calendar/ScheduleTable.svelte +++ b/src/lib/components/Calendar/ScheduleTable.svelte @@ -1,11 +1,7 @@