Fixed deleting of jobs and added more detail to error result atoms. RPS-23
This commit is contained in:
@@ -25,6 +25,8 @@ export function DeleteJobAtom({ setSelectedJobId, jobId }) {
|
||||
});
|
||||
const result = await deleteJob({
|
||||
variables: { jobId: jobId },
|
||||
refetchQueries: ["QUERY_ALL_JOBS_PAGINATED"],
|
||||
awaitRefetchQueries: true,
|
||||
});
|
||||
|
||||
if (result.errors) {
|
||||
|
||||
@@ -37,7 +37,13 @@ export default function JobPartsGraphAtom({
|
||||
}, [job, price]);
|
||||
|
||||
if (loading) return <Skeleton active />;
|
||||
if (!job) return <ErrorResultAtom title="Error displaying job data." />;
|
||||
if (!job)
|
||||
return (
|
||||
<ErrorResultAtom
|
||||
title="Error displaying parts graphs."
|
||||
errorMessage="It looks like this job doesn't exist."
|
||||
/>
|
||||
);
|
||||
|
||||
return (
|
||||
<div
|
||||
|
||||
Reference in New Issue
Block a user