feature/IO-3357-Reynolds-and-Reynolds-DMS-API-Integration - Checkpoint
This commit is contained in:
@@ -40,7 +40,7 @@ const makeVehicleSearchPayloadFromJob = (job) => {
|
||||
};
|
||||
|
||||
const makeCustomerSearchPayloadFromJob = (job) => {
|
||||
const phone = job?.ownr_ph1 || job?.customer?.mobile || job?.customer?.home_phone || job?.customer?.phone;
|
||||
const phone = job?.ownr_ph1 || job?.ownr_ph2;
|
||||
const d = digitsOnly(phone);
|
||||
if (d.length >= 7) return { kind: "phone", phone: d, maxResults: 50 };
|
||||
|
||||
@@ -58,7 +58,7 @@ const makeCustomerSearchPayloadFromJob = (job) => {
|
||||
return { kind: "name", name: { name: String(company).trim() }, maxResults: 50 };
|
||||
}
|
||||
|
||||
const vin = job?.v_vin || job?.vehicle?.vin || job?.vin;
|
||||
const vin = job?.v_vin;
|
||||
if (vin) return { kind: "vin", vin: String(vin).trim(), maxResults: 50 };
|
||||
|
||||
return null;
|
||||
@@ -125,9 +125,7 @@ async function getBodyshopForSocket({ bodyshopId, socket }) {
|
||||
function readAdvisorNo(payload, cached) {
|
||||
const v =
|
||||
(payload?.txEnvelope?.advisorNo != null && String(payload.txEnvelope.advisorNo)) ||
|
||||
(payload?.txEnvelope?.advNo != null && String(payload.txEnvelope.advNo)) ||
|
||||
(payload?.advisorNo != null && String(payload.advisorNo)) ||
|
||||
(payload?.advNo != null && String(payload.advNo)) ||
|
||||
(cached != null && String(cached)) ||
|
||||
null;
|
||||
return v && v.trim() !== "" ? v : null;
|
||||
|
||||
Reference in New Issue
Block a user