update as in the harvest plan api

This commit is contained in:
csawatzky 2025-04-21 16:02:31 -06:00
parent 0d3f7fa8a6
commit a99ab8b8b5
3 changed files with 16 additions and 13 deletions

View file

@ -48,7 +48,7 @@ export default function DuplicateHarvestPlan(props: Props) {
if (title !== "") {
planSettings.title = title;
}
harvestPlanAPI.addHarvestPlan(planSettings).then(resp => {
harvestPlanAPI.addHarvestPlan(planSettings, as).then(resp => {
let tasks = planTasks;
tasks.forEach(task => {
task.settings.objectKey = resp.data.harvestPlan;

View file

@ -307,7 +307,7 @@ export default function HarvestSettings(props: Props) {
});
setNewPlan(HarvestPlan.create(pond.HarvestPlan.fromObject({ settings: newPlanSettings })));
harvestPlanAPI.addHarvestPlan(newPlanSettings).then(resp => {
harvestPlanAPI.addHarvestPlan(newPlanSettings, as).then(resp => {
setPlanKey(resp.data.harvestPlan);
openSnack("Plan Created");
});
@ -373,7 +373,7 @@ export default function HarvestSettings(props: Props) {
tempPlan.settings.fallEquipment = fallEqCost;
if (planKey) {
harvestPlanAPI
.updateHarvestPlan(planKey, tempPlan.settings)
.updateHarvestPlan(planKey, tempPlan.settings, undefined, as)
.then(resp => openSnack("Plan Updated"));
}
closeDialog(true, tempPlan);
@ -381,7 +381,7 @@ export default function HarvestSettings(props: Props) {
const deletePlan = () => {
if (planKey) {
harvestPlanAPI.removeHarvestPlan(planKey).then(resp => {
harvestPlanAPI.removeHarvestPlan(planKey, as).then(resp => {
openSnack("Plan Deleted");
});
}