IO-2599 Tech Station Linking
This commit is contained in:
@@ -15,6 +15,7 @@ import { setModalContext } from "../../redux/modals/modals.actions";
|
||||
import { selectBodyshop } from "../../redux/user/user.selectors";
|
||||
import CurrencyFormatter from "../../utils/CurrencyFormatter";
|
||||
import { DateTimeFormatter } from "../../utils/DateFormatter";
|
||||
import PhoneNumberFormatter from "../../utils/PhoneFormatter";
|
||||
import ChatOpenButton from "../chat-open-button/chat-open-button.component";
|
||||
import DataLabel from "../data-label/data-label.component";
|
||||
import JobAltTransportChange from "../job-at-change/job-at-change.component";
|
||||
@@ -160,19 +161,35 @@ export function JobsDetailHeader({ job, bodyshop, disabled }) {
|
||||
<Card
|
||||
style={{ height: "100%" }}
|
||||
title={
|
||||
<Link to={disabled ? "#" : `/manage/owners/${job.owner.id}`}>
|
||||
{ownerTitle.length > 0
|
||||
? ownerTitle
|
||||
: t("owner.labels.noownerinfo")}
|
||||
</Link>
|
||||
disabled ? (
|
||||
<>
|
||||
{ownerTitle.length > 0
|
||||
? ownerTitle
|
||||
: t("owner.labels.noownerinfo")}
|
||||
</>
|
||||
) : (
|
||||
<Link to={`/manage/owners/${job.owner.id}`}>
|
||||
{ownerTitle.length > 0
|
||||
? ownerTitle
|
||||
: t("owner.labels.noownerinfo")}
|
||||
</Link>
|
||||
)
|
||||
}
|
||||
>
|
||||
<div>
|
||||
<DataLabel key="2" label={t("jobs.fields.ownr_ph1")}>
|
||||
<ChatOpenButton phone={job.ownr_ph1} jobid={job.id} />
|
||||
{disabled ? (
|
||||
<PhoneNumberFormatter>{job.ownr_ph1}</PhoneNumberFormatter>
|
||||
) : (
|
||||
<ChatOpenButton phone={job.ownr_ph1} jobid={job.id} />
|
||||
)}
|
||||
</DataLabel>
|
||||
<DataLabel key="22" label={t("jobs.fields.ownr_ph2")}>
|
||||
<ChatOpenButton phone={job.ownr_ph2} jobid={job.id} />
|
||||
{disabled ? (
|
||||
<PhoneNumberFormatter>{job.ownr_ph2}</PhoneNumberFormatter>
|
||||
) : (
|
||||
<ChatOpenButton phone={job.ownr_ph2} jobid={job.id} />
|
||||
)}
|
||||
</DataLabel>
|
||||
<DataLabel key="3" label={t("owners.fields.address")}>
|
||||
{`${job.ownr_addr1 || ""} ${job.ownr_addr2 || ""} ${
|
||||
@@ -180,7 +197,11 @@ export function JobsDetailHeader({ job, bodyshop, disabled }) {
|
||||
} ${job.ownr_st || ""} ${job.ownr_zip || ""}`}
|
||||
</DataLabel>
|
||||
<DataLabel key="4" label={t("owners.fields.ownr_ea")}>
|
||||
{job.ownr_ea || ""}
|
||||
{disabled ? (
|
||||
<>{job.ownr_ea || ""}</>
|
||||
) : job.ownr_ea ? (
|
||||
<a href={`mailto:${job.ownr_ea}`}>{job.ownr_ea}</a>
|
||||
) : null}
|
||||
</DataLabel>
|
||||
{job.owner?.tax_number && (
|
||||
<DataLabel key="5" label={t("owners.fields.tax_number")}>
|
||||
@@ -195,17 +216,19 @@ export function JobsDetailHeader({ job, bodyshop, disabled }) {
|
||||
style={{ height: "100%" }}
|
||||
title={
|
||||
job.vehicle ? (
|
||||
<Link
|
||||
to={
|
||||
disabled
|
||||
? "#"
|
||||
: job.vehicle && `/manage/vehicles/${job.vehicle.id}`
|
||||
}
|
||||
>
|
||||
{vehicleTitle.length > 0
|
||||
? vehicleTitle
|
||||
: t("vehicles.labels.novehinfo")}
|
||||
</Link>
|
||||
disabled ? (
|
||||
<>
|
||||
{vehicleTitle.length > 0
|
||||
? vehicleTitle
|
||||
: t("vehicles.labels.novehinfo")}{" "}
|
||||
</>
|
||||
) : (
|
||||
<Link to={job.vehicle && `/manage/vehicles/${job.vehicle.id}`}>
|
||||
{vehicleTitle.length > 0
|
||||
? vehicleTitle
|
||||
: t("vehicles.labels.novehinfo")}
|
||||
</Link>
|
||||
)
|
||||
) : (
|
||||
<span></span>
|
||||
)
|
||||
@@ -223,7 +246,9 @@ export function JobsDetailHeader({ job, bodyshop, disabled }) {
|
||||
</VehicleVinDisplay>
|
||||
{bodyshop.pbs_serialnumber || bodyshop.cdk_dealerid ? (
|
||||
job.v_vin?.length !== 17 ? (
|
||||
<WarningFilled style={{ color: "tomato", marginLeft: ".3rem" }} />
|
||||
<WarningFilled
|
||||
style={{ color: "tomato", marginLeft: ".3rem" }}
|
||||
/>
|
||||
) : null
|
||||
) : null}
|
||||
</DataLabel>
|
||||
@@ -231,7 +256,7 @@ export function JobsDetailHeader({ job, bodyshop, disabled }) {
|
||||
{job.regie_number || t("general.labels.na")}
|
||||
</DataLabel>
|
||||
<DataLabel label={t("jobs.labels.relatedros")}>
|
||||
<JobsRelatedRos jobid={job.id} job={job} />
|
||||
<JobsRelatedRos jobid={job.id} job={job} disabled={disabled} />
|
||||
</DataLabel>
|
||||
{job.vehicle && job.vehicle.notes && (
|
||||
<DataLabel
|
||||
|
||||
Reference in New Issue
Block a user