feature/IO-3357-Reynolds-and-Reynolds-DMS-API-Integration - Enhance logging
This commit is contained in:
@@ -62,13 +62,15 @@ const QueryJobData = async (ctx = {}, jobId) => {
|
||||
};
|
||||
|
||||
/**
|
||||
* Build RR Repair Order payload from job and customer data.
|
||||
* Build Repair Order payload for RR from job and customer data.
|
||||
* @param job
|
||||
* @param selectedCustomer
|
||||
* @param advisorNo
|
||||
* @param story
|
||||
* @param makeOverride
|
||||
* @returns {{outsdRoNo: string, repairOrderNumber: string, departmentType: string, vin: string, customerNo: string, advisorNo: string, mileageIn: *|null}}
|
||||
*/
|
||||
const buildRRRepairOrderPayload = ({ job, selectedCustomer, advisorNo }) => {
|
||||
const buildRRRepairOrderPayload = ({ job, selectedCustomer, advisorNo, story }) => {
|
||||
const customerNo = selectedCustomer?.customerNo
|
||||
? String(selectedCustomer.customerNo).trim()
|
||||
: selectedCustomer?.custNo
|
||||
@@ -97,7 +99,7 @@ const buildRRRepairOrderPayload = ({ job, selectedCustomer, advisorNo }) => {
|
||||
|
||||
const roStr = String(ro);
|
||||
|
||||
return {
|
||||
const output = {
|
||||
// ---- RO Number (all variants; library currently requires `outsdRoNo`) ----
|
||||
outsdRoNo: roStr,
|
||||
repairOrderNumber: roStr,
|
||||
@@ -112,6 +114,12 @@ const buildRRRepairOrderPayload = ({ job, selectedCustomer, advisorNo }) => {
|
||||
// ---- Mileage In (new) ----
|
||||
mileageIn
|
||||
};
|
||||
|
||||
if (story) {
|
||||
output.roComment = String(story).trim();
|
||||
}
|
||||
|
||||
return output;
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user