Merged in test-beta (pull request #1255)

- Fix for job line null check
This commit is contained in:
Dave Richer
2024-02-05 16:37:58 +00:00
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>

View File

@@ -879,7 +879,7 @@ export function JobsDetailHeaderActions({
},
];
if (job.csiinvites.length) {
if (job?.csiinvites?.length) {
children.push(
{
type: "divider"

View File

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