IO-233 CDK Updates.

This commit is contained in:
Patrick Fic
2021-11-19 10:50:38 -08:00
parent e98f9763fd
commit ef18cf0718
2 changed files with 18 additions and 7 deletions

View File

@@ -172,7 +172,7 @@ async function CdkSelectedCustomer(socket, selectedCustomerId) {
`{6} Successfully posted sransaction to DMS.` `{6} Successfully posted sransaction to DMS.`
); );
//await MarkJobExported(socket, socket.JobData.id); await MarkJobExported(socket, socket.JobData.id);
CdkBase.createLogEvent( CdkBase.createLogEvent(
socket, socket,
@@ -180,7 +180,7 @@ async function CdkSelectedCustomer(socket, selectedCustomerId) {
`{5} Updating Service Vehicle History.` `{5} Updating Service Vehicle History.`
); );
socket.DMSVehHistory = await InsertServiceVehicleHistory(socket); socket.DMSVehHistory = await InsertServiceVehicleHistory(socket);
socket.emit("export-success", socket.JobData.id); // socket.emit("export-success", socket.JobData.id);
} else { } else {
//Get the error code //Get the error code
CdkBase.createLogEvent( CdkBase.createLogEvent(
@@ -612,18 +612,28 @@ async function InsertDmsCustomer(socket, newCustomerNumber) {
}, },
demographics: null, demographics: null,
name1: { name1: {
companyname: companyName:
socket.JobData.ownr_co_nm && socket.JobData.ownr_co_nm &&
socket.JobData.ownr_co_nm.replace(replaceSpecialRegex, ""), socket.JobData.ownr_co_nm
.replace(replaceSpecialRegex, "")
.toUpperCase(),
firstName: firstName:
socket.JobData.ownr_fn && socket.JobData.ownr_fn &&
socket.JobData.ownr_fn.replace(replaceSpecialRegex, ""), socket.JobData.ownr_fn
.replace(replaceSpecialRegex, "")
.toUpperCase(),
fullname: null, fullname: null,
lastName: lastName:
socket.JobData.ownr_ln && socket.JobData.ownr_ln &&
socket.JobData.ownr_ln.replace(replaceSpecialRegex, ""), socket.JobData.ownr_ln
.replace(replaceSpecialRegex, "")
.toUpperCase(),
middleName: null, middleName: null,
nameType: "Person", nameType:
socket.JobData.ownr_co_nm && socket.JobData.ownr_co_nm
? "Business"
: "Person",
suffix: null, suffix: null,
title: null, title: null,
}, },

View File

@@ -169,6 +169,7 @@ query QUERY_JOBS_FOR_CDK_EXPORT($id: uuid!) {
ownerid ownerid
ownr_ln ownr_ln
ownr_fn ownr_fn
ownr_co_nm
ownr_addr1 ownr_addr1
ownr_addr2 ownr_addr2
ownr_ph1 ownr_ph1