From e19e3865e7ae906f24b7be8ab2ad669cd0f21555 Mon Sep 17 00:00:00 2001 From: Patrick Fic Date: Fri, 11 Aug 2023 10:30:17 -0700 Subject: [PATCH] Resolve dispatch line error. --- .../job-line-location-popup.component.jsx | 2 +- client/src/graphql/jobs.queries.js | 12 ++++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/client/src/components/job-line-location-popup/job-line-location-popup.component.jsx b/client/src/components/job-line-location-popup/job-line-location-popup.component.jsx index 312506511..00b5c7e62 100644 --- a/client/src/components/job-line-location-popup/job-line-location-popup.component.jsx +++ b/client/src/components/job-line-location-popup/job-line-location-popup.component.jsx @@ -77,7 +77,7 @@ export function JobLineLocationPopup({ bodyshop, jobline, disabled }) { > {jobline.location} - {jobline.parts_dispatch_lines.length > 0 && "-Disp"} + {jobline.parts_dispatch_lines?.length > 0 && "-Disp"} ); diff --git a/client/src/graphql/jobs.queries.js b/client/src/graphql/jobs.queries.js index bb5e5142f..3c0dd9576 100644 --- a/client/src/graphql/jobs.queries.js +++ b/client/src/graphql/jobs.queries.js @@ -913,6 +913,18 @@ export const QUERY_JOB_CARD_DETAILS = gql` ioucreated convertedtolbr critical + parts_dispatch_lines { + id + accepted_at + quantity + parts_dispatch { + id + employeeid + dispatched_at + dispatched_by + number + } + } } owner { id