feature/Reynolds-and-Reynolds-DMS-API-Integration - Add dealer id / merge fortellis

This commit is contained in:
Dave
2025-09-12 14:59:42 -04:00
parent 2fec9fd16e
commit 7c8260685e
37 changed files with 124 additions and 83 deletions

View File

@@ -55,7 +55,10 @@ export function AccountingPayablesContainer({ bodyshop, setBreadcrumbs, setSelec
const noPath =
!partnerVersion?.qbpath &&
!(bodyshop && (bodyshop.cdk_dealerid || bodyshop.pbs_serialnumber || bodyshop.accountingconfig.qbo));
!(
bodyshop &&
(bodyshop.cdk_dealerid || bodyshop.pbs_serialnumber || bodyshop.rr_dealerid || bodyshop.accountingconfig.qbo)
);
return (
<div>

View File

@@ -54,7 +54,10 @@ export function AccountingPaymentsContainer({ bodyshop, setBreadcrumbs, setSelec
if (error) return <AlertComponent message={error.message} type="error" />;
const noPath =
!partnerVersion?.qbpath &&
!(bodyshop && (bodyshop.cdk_dealerid || bodyshop.pbs_serialnumber || bodyshop.accountingconfig.qbo));
!(
bodyshop &&
(bodyshop.cdk_dealerid || bodyshop.pbs_serialnumber || bodyshop.rr_dealerid || bodyshop.accountingconfig.qbo)
);
return (
<div>
<FeatureWrapperComponent

View File

@@ -58,7 +58,10 @@ export function AccountingReceivablesContainer({ bodyshop, setBreadcrumbs, setSe
const noPath =
!partnerVersion?.qbpath &&
!(bodyshop && (bodyshop.cdk_dealerid || bodyshop.pbs_serialnumber || bodyshop.accountingconfig.qbo));
!(
bodyshop &&
(bodyshop.cdk_dealerid || bodyshop.pbs_serialnumber || bodyshop.rr_dealerid || bodyshop.accountingconfig.qbo)
);
return (
<div>

View File

@@ -146,10 +146,3 @@ export function DmsContainer({ setBreadcrumbs, setSelectedHeader }) {
</Row>
);
}
export const determineDmsType = (bodyshop) => {
if (bodyshop.cdk_dealerid) return "cdk";
else {
return "pbs";
}
};

View File

@@ -168,7 +168,7 @@ export function DmsContainer({ bodyshop, setBreadcrumbs, setSelectedHeader, inse
if (loading) return <LoadingSpinner />;
if (error) return <AlertComponent message={error.message} type="error" />;
if (!jobId || !(bodyshop.cdk_dealerid || bodyshop.pbs_serialnumber) || !(data && data.jobs_by_pk))
if (!jobId || !(bodyshop.cdk_dealerid || bodyshop.pbs_serialnumber) || bodyshop.rr_dealerid || !data?.jobs_by_pk)
return <Result status="404" title={t("general.errors.notfound")} />;
if (data.jobs_by_pk && data.jobs_by_pk.date_exported)
@@ -242,10 +242,3 @@ export function DmsContainer({ bodyshop, setBreadcrumbs, setSelectedHeader, inse
</div>
);
}
export const determineDmsType = (bodyshop) => {
if (bodyshop.cdk_dealerid) return "cdk";
else {
return "pbs";
}
};

View File

@@ -189,7 +189,7 @@ export function JobsCloseComponent({ job, bodyshop, jobRO, insertAuditTrail, set
{t("general.actions.close")}
</Button>
</Popconfirm>
{(bodyshop.pbs_serialnumber || bodyshop.cdk_dealerid) && (
{(bodyshop.pbs_serialnumber || bodyshop.cdk_dealerid || bodyshop.rr_dealerid) && (
<Link to={`/manage/dms?jobId=${job.id}`}>
<Button disabled={job.date_exported || !jobRO}>{t("jobs.actions.sendtodms")}</Button>
</Link>
@@ -309,7 +309,7 @@ export function JobsCloseComponent({ job, bodyshop, jobRO, insertAuditTrail, set
<Switch />
</Form.Item>
)}
{(bodyshop.cdk_dealerid || bodyshop.pbs_serialnumber) && (
{(bodyshop.cdk_dealerid || bodyshop.pbs_serialnumber || bodyshop.rr_dealerid) && (
<Form.Item
label={t("jobs.fields.kmin")}
name="kmin"
@@ -322,7 +322,7 @@ export function JobsCloseComponent({ job, bodyshop, jobRO, insertAuditTrail, set
<InputNumber precision={0} disabled={jobRO} />
</Form.Item>
)}
{(bodyshop.cdk_dealerid || bodyshop.pbs_serialnumber) && (
{(bodyshop.cdk_dealerid || bodyshop.pbs_serialnumber || bodyshop.rr_dealerid) && (
<Form.Item
label={t("jobs.fields.kmout")}
name="kmout"
@@ -346,7 +346,7 @@ export function JobsCloseComponent({ job, bodyshop, jobRO, insertAuditTrail, set
<InputNumber precision={0} disabled={jobRO} />
</Form.Item>
)}
{(bodyshop.cdk_dealerid || bodyshop.pbs_serialnumber) && (
{(bodyshop.cdk_dealerid || bodyshop.pbs_serialnumber || bodyshop.rr_dealerid) && (
<Form.Item
label={t("jobs.fields.dms_allocation")}
name="dms_allocation"