Merge branch 'release/2022-08-26' of bitbucket.org:snaptsoft/bodyshop into release/2022-08-26

This commit is contained in:
Patrick Fic
2022-08-23 15:16:27 -07:00
2 changed files with 15 additions and 11 deletions

View File

@@ -57,10 +57,10 @@ exports.default = async (req, res) => {
TransmitDateTime: moment().format(momentFormat), // Omitted from ARMS docs TransmitDateTime: moment().format(momentFormat), // Omitted from ARMS docs
}, },
EventInfo: { EventInfo: {
// AssignmentEvent: { AssignmentEvent: {
// CreateDateTime: CreateDateTime:
// job.asgn_date && moment(job.asgn_date).format(momentFormat), job.asgn_date && moment(job.asgn_date).format(momentFormat),
// }, },
// EstimateEvent: { // EstimateEvent: {
// UploadDateTime: moment().format(momentFormat), // UploadDateTime: moment().format(momentFormat),
// }, // },
@@ -258,9 +258,9 @@ exports.default = async (req, res) => {
VINNum: job.v_vin, VINNum: job.v_vin,
}, },
}, },
// License: { License: {
// LicensePlateNum: job.plate_no, LicensePlateNum: job.plate_no,
// }, },
VehicleDesc: { VehicleDesc: {
//ProductionDate: "2009-10", //ProductionDate: "2009-10",
ModelYear: ModelYear:
@@ -845,7 +845,7 @@ exports.default = async (req, res) => {
const entegralResponse = const entegralResponse =
await entegralSoapClient.RepairOrderFolderAddRqAsync( await entegralSoapClient.RepairOrderFolderAddRqAsync(
jobsToPush, [jobsToPush[0]],
function (err, result, rawResponse, soapHeader, rawRequest) { function (err, result, rawResponse, soapHeader, rawRequest) {
fs.writeFileSync(`./logs/arms-request.xml`, rawRequest); fs.writeFileSync(`./logs/arms-request.xml`, rawRequest);
fs.writeFileSync(`./logs/arms-response.xml`, rawResponse); fs.writeFileSync(`./logs/arms-response.xml`, rawResponse);
@@ -910,10 +910,13 @@ function GetDocumentstatus(job, bodyshop) {
function GetRepairStatusCode(job) { function GetRepairStatusCode(job) {
return "25"; return "25";
} }
function GetProductionStageCode(job, bodyshop) { function GetProductionStageCode(job, bodyshop) {
if (bodyshop.md_ro_statuses.post_production_statuses.includes(job.status)) const result = (bodyshop.features?.entegral).find(
return "8D"; (k) => k.status === job.status
return "33"; );
return result?.code || "33";
} }
function isEmpty(obj) { function isEmpty(obj) {

View File

@@ -1323,6 +1323,7 @@ exports.GET_ENTEGRAL_SHOPS = `query GET_AUTOHOUSE_SHOPS {
md_responsibility_centers md_responsibility_centers
imexshopid imexshopid
timezone timezone
features
} }
} }
`; `;