Minor adjustments and fixes
This commit is contained in:
@@ -36,8 +36,7 @@ function JobsDetailPageContainer({ match, form }) {
|
||||
refetch();
|
||||
})
|
||||
.catch(error => {
|
||||
//TODO Error handling.
|
||||
console.log("error", error);
|
||||
notification[error]({ message: t("jobs.errors.saving") });
|
||||
});
|
||||
};
|
||||
|
||||
@@ -70,7 +69,6 @@ function JobsDetailPageContainer({ match, form }) {
|
||||
notification["success"]({
|
||||
message: t("jobs.successes.savetitle")
|
||||
});
|
||||
//TODO: Better way to reset the field decorators?
|
||||
refetch().then(r => form.resetFields());
|
||||
});
|
||||
}
|
||||
@@ -78,7 +76,7 @@ function JobsDetailPageContainer({ match, form }) {
|
||||
};
|
||||
|
||||
if (loading) return <SpinComponent />;
|
||||
if (error) return <AlertComponent message={error.message} type="error" />;
|
||||
if (error) return <AlertComponent message={error.message} type='error' />;
|
||||
|
||||
return data.jobs_by_pk ? (
|
||||
<JobDetailFormContext.Provider value={form}>
|
||||
@@ -94,7 +92,7 @@ function JobsDetailPageContainer({ match, form }) {
|
||||
/>
|
||||
</JobDetailFormContext.Provider>
|
||||
) : (
|
||||
<AlertComponent message={t("jobs.errors.noaccess")} type="error" />
|
||||
<AlertComponent message={t("jobs.errors.noaccess")} type='error' />
|
||||
);
|
||||
}
|
||||
export default Form.create({ name: "JobsDetailPageContainer" })(
|
||||
|
||||
Reference in New Issue
Block a user