mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-20 14:50:32 +00:00
fix: edit project task form.
This commit is contained in:
@@ -36,6 +36,7 @@ function ProjectTaskFormProvider({
|
|||||||
const provider = {
|
const provider = {
|
||||||
dialogName,
|
dialogName,
|
||||||
isNewMode,
|
isNewMode,
|
||||||
|
taskId,
|
||||||
projectId,
|
projectId,
|
||||||
projectTask,
|
projectTask,
|
||||||
createProjectTaskMutate,
|
createProjectTaskMutate,
|
||||||
|
|||||||
@@ -42,10 +42,11 @@ export function useEditProjectTask(props) {
|
|||||||
|
|
||||||
return useMutation(([id, values]) => apiRequest.post(`tasks/${id}`, values), {
|
return useMutation(([id, values]) => apiRequest.post(`tasks/${id}`, values), {
|
||||||
onSuccess: (res, [id, values]) => {
|
onSuccess: (res, [id, values]) => {
|
||||||
|
// Common invalidate queries.
|
||||||
|
commonInvalidateQueries(queryClient);
|
||||||
|
|
||||||
// Invalidate specific project task.
|
// Invalidate specific project task.
|
||||||
queryClient.invalidateQueries([t.PROJECT_TASK, id]);
|
queryClient.invalidateQueries([t.PROJECT_TASK, id]);
|
||||||
|
|
||||||
commonInvalidateQueries(queryClient);
|
|
||||||
},
|
},
|
||||||
...props,
|
...props,
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user