IO-233 Add Vehicle History

This commit is contained in:
Patrick Fic
2021-08-30 12:54:43 -07:00
parent a7cf081ed5
commit 7a35dc9b38
8 changed files with 182 additions and 4 deletions

View File

@@ -101,7 +101,8 @@ export function DmsContainer({ bodyshop, setBreadcrumbs, setSelectedHeader }) {
// eslint-disable-next-line react-hooks/exhaustive-deps
}, []);
if (!jobId || !bodyshop.cdk_dealerid) return <Result status="404" />;
if (!jobId || !bodyshop.cdk_dealerid || !(data && data.jobs_by_pk))
return <Result status="404" />;
if (loading) return <LoadingSpinner />;
if (error) return <AlertComponent message={error.message} type="error" />;
@@ -110,7 +111,7 @@ export function DmsContainer({ bodyshop, setBreadcrumbs, setSelectedHeader }) {
<div>
<Row gutter={32}>
<Col span={18}>
{data && data.jobs_by_pk.ro_number}
{data && data.jobs_by_pk && data.jobs_by_pk.ro_number}
<DmsAllocationsSummary socket={socket} jobId={jobId} />
<DmsPostForm
socket={socket}