@@ -154,12 +154,6 @@ export function TaskUpsertModalContainer({ bodyshop, currentUser, taskUpsert, to
|
||||
);
|
||||
}
|
||||
|
||||
window.dispatchEvent(
|
||||
new CustomEvent("taskUpdated", {
|
||||
detail: { message: "A task has been created or edited." }
|
||||
})
|
||||
);
|
||||
|
||||
notification["success"]({
|
||||
message: t("tasks.successes.updated")
|
||||
});
|
||||
@@ -179,6 +173,15 @@ export function TaskUpsertModalContainer({ bodyshop, currentUser, taskUpsert, to
|
||||
bodyshopid: bodyshop.id
|
||||
}
|
||||
]
|
||||
},
|
||||
update(cache, { data }) {
|
||||
cache.modify({
|
||||
fields: {
|
||||
tasks(cached) {
|
||||
return [...data?.insert_tasks?.returning, ...cached];
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
@@ -222,12 +225,6 @@ export function TaskUpsertModalContainer({ bodyshop, currentUser, taskUpsert, to
|
||||
console.error(`Something went wrong sending email to Assigned party on Task edit. ${e.message || ""}`)
|
||||
);
|
||||
|
||||
window.dispatchEvent(
|
||||
new CustomEvent("taskUpdated", {
|
||||
detail: { message: "A task has been created or edited." }
|
||||
})
|
||||
);
|
||||
|
||||
notification["success"]({
|
||||
message: t("tasks.successes.created")
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user