- Fix for job line null check

Signed-off-by: Dave Richer <dave@imexsystems.ca>
This commit is contained in:
Dave Richer
2024-02-05 11:35:24 -05:00
parent 6b0c211084
commit 498292c2ec
3 changed files with 4 additions and 4 deletions

View File

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