Remove unnecessary extra calls to setPlanSaving.
This commit is contained in:
parent
200bdf7793
commit
dab7f56bfb
1 changed files with 1 additions and 2 deletions
|
@ -321,6 +321,7 @@ export const moveItem = (
|
||||||
const result = await api.updateShowplan(timeslotid, ops);
|
const result = await api.updateShowplan(timeslotid, ops);
|
||||||
if (!result.every((x) => x.status)) {
|
if (!result.every((x) => x.status)) {
|
||||||
dispatch(showplan.actions.planSaveError("Failed to update show plan."));
|
dispatch(showplan.actions.planSaveError("Failed to update show plan."));
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -393,7 +394,6 @@ export const addItem = (
|
||||||
const result = await api.updateShowplan(timeslotId, ops);
|
const result = await api.updateShowplan(timeslotId, ops);
|
||||||
if (!result.every((x) => x.status)) {
|
if (!result.every((x) => x.status)) {
|
||||||
dispatch(showplan.actions.planSaveError("Failed to update show plan."));
|
dispatch(showplan.actions.planSaveError("Failed to update show plan."));
|
||||||
dispatch(showplan.actions.setPlanSaving(false));
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const lastResult = result[result.length - 1]; // this is the add op
|
const lastResult = result[result.length - 1]; // this is the add op
|
||||||
|
@ -450,7 +450,6 @@ export const removeItem = (
|
||||||
const result = await api.updateShowplan(timeslotId, ops);
|
const result = await api.updateShowplan(timeslotId, ops);
|
||||||
if (!result.every((x) => x.status)) {
|
if (!result.every((x) => x.status)) {
|
||||||
dispatch(showplan.actions.planSaveError("Failed to update show plan."));
|
dispatch(showplan.actions.planSaveError("Failed to update show plan."));
|
||||||
dispatch(showplan.actions.setPlanSaving(false));
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue