IO-1294 Refetch data after admin update.
This commit is contained in:
@@ -38,6 +38,8 @@ export function JobsAdminDatesChange({ insertAuditTrail, job }) {
|
|||||||
setLoading(true);
|
setLoading(true);
|
||||||
const result = await updateJob({
|
const result = await updateJob({
|
||||||
variables: { jobId: job.id, job: values },
|
variables: { jobId: job.id, job: values },
|
||||||
|
refetchQueries: ['GET_JOB_BY_PK'],
|
||||||
|
awaitRefetchQueries:true
|
||||||
});
|
});
|
||||||
|
|
||||||
const changedAuditFields = form.getFieldsValue(
|
const changedAuditFields = form.getFieldsValue(
|
||||||
@@ -66,6 +68,8 @@ export function JobsAdminDatesChange({ insertAuditTrail, job }) {
|
|||||||
}),
|
}),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
form.resetFields();
|
||||||
|
form.resetFields();
|
||||||
setLoading(false);
|
setLoading(false);
|
||||||
//Get the owner details, populate it all back into the job.
|
//Get the owner details, populate it all back into the job.
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user