- Fix for job line null check
Signed-off-by: Dave Richer <dave@imexsystems.ca>
This commit is contained in:
@@ -23,9 +23,9 @@ export function JobsDetailDatesComponent({ jobRO, job, bodyshop }) {
|
||||
);
|
||||
}, [job.status, bodyshop.md_ro_statuses.post_production_statuses]);
|
||||
|
||||
const calcRepairDays =
|
||||
const calcRepairDays = job?.joblines?.length ?
|
||||
job.joblines.reduce((acc, val) => acc + val.mod_lb_hrs, 0) /
|
||||
(bodyshop.target_touchtime === 0 ? 1 : bodyshop.target_touchtime);
|
||||
(bodyshop.target_touchtime === 0 ? 1 : bodyshop.target_touchtime) : [];
|
||||
|
||||
return (
|
||||
<div>
|
||||
|
||||
@@ -879,7 +879,7 @@ export function JobsDetailHeaderActions({
|
||||
},
|
||||
];
|
||||
|
||||
if (job.csiinvites.length) {
|
||||
if (job?.csiinvites?.length) {
|
||||
children.push(
|
||||
{
|
||||
type: "divider"
|
||||
|
||||
@@ -121,7 +121,7 @@ export function JobsDetailHeader({ job, bodyshop, disabled }) {
|
||||
{job.alt_transport}
|
||||
<JobAltTransportChange job={job} />
|
||||
</DataLabel>
|
||||
{job.cccontracts.length > 0 && (
|
||||
{job?.cccontracts?.length > 0 && (
|
||||
<DataLabel label={t("jobs.labels.contracts")}>
|
||||
{job.cccontracts.map((c) => (
|
||||
<Link
|
||||
|
||||
Reference in New Issue
Block a user