Fixed deleting of jobs and added more detail to error result atoms. RPS-23

This commit is contained in:
Patrick Fic
2020-10-27 10:50:53 -07:00
parent 4852e325ee
commit 08ae22eef4
6 changed files with 36 additions and 7 deletions

View File

@@ -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) {

View File

@@ -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