Show error to user on failing to save timing markers.

This commit is contained in:
Matthew Stratford 2020-09-25 22:48:00 +01:00
parent 5cd80faa75
commit c7a507e8f2
2 changed files with 7 additions and 4 deletions

View file

@ -70,7 +70,8 @@ const setTrackIntro = (
await api.setTrackIntro(track.trackid, secs);
dispatch(ShowPlanState.setItemTimings({ item: track, intro: secs }));
} catch (e) {
console.error("Failed to Set Track Intro: " + e);
dispatch(ShowPlanState.planSaveError("Failed saving track outro."));
console.error("Failed to set track intro: " + e);
}
};
@ -84,7 +85,8 @@ const setTrackOutro = (
await api.setTrackOutro(track.trackid, secs);
dispatch(ShowPlanState.setItemTimings({ item: track, outro: secs }));
} catch (e) {
console.error("Failed to Set Track Outro: " + e);
dispatch(ShowPlanState.planSaveError("Failed saving track outro."));
console.error("Failed to set track outro: " + e);
}
};
@ -98,7 +100,8 @@ const setTrackCue = (
await api.setTimeslotItemCue(item.timeslotitemid, secs);
dispatch(ShowPlanState.setItemTimings({ item, cue: secs }));
} catch (e) {
console.error("Failed to Set Track Cue: " + e);
dispatch(ShowPlanState.planSaveError("Failed saving track cue."));
console.error("Failed to set track cue: " + e);
}
};

View file

@ -199,7 +199,7 @@ const showplan = createSlice({
export default showplan.reducer;
export const { setItemTimings } = showplan.actions;
export const { setItemTimings, planSaveError } = showplan.actions;
export const moveItem = (
timeslotid: number,