feature/IO-3255-simplified-parts-management - Checkpoint

This commit is contained in:
Dave Richer
2025-06-20 14:51:30 -04:00
parent 3c71902047
commit b0283f827e
2 changed files with 9 additions and 9 deletions

View File

@@ -106,7 +106,9 @@ const partsManagementVehicleDamageEstimateAddRq = async (req, res) => {
const est_ct_fn = est_fn;
const est_ct_ln = est_ln;
// TODO: SHould be the estimator insurance company name est_co_name
const est_aff = rq.AdminInfo?.Estimator?.Affiliation || null;
const estComms = Array.isArray(estParty.ContactInfo?.Communications)
? estParty.ContactInfo.Communications
: [estParty.ContactInfo?.Communications || {}];
@@ -146,7 +148,6 @@ const partsManagementVehicleDamageEstimateAddRq = async (req, res) => {
const v_model_desc = desc.ModelName || null;
const body_style = desc.BodyStyle || null;
const engine_desc = desc.EngineDesc || null;
const production_date = desc.ProductionDate || null;
const v_options = desc.SubModelDesc || null;
const v_type = desc.FuelType || null;
const v_cond = rq.VehicleInfo?.Condition?.DrivableInd;
@@ -206,7 +207,8 @@ const partsManagementVehicleDamageEstimateAddRq = async (req, res) => {
// claim & policy
clm_no,
status,
// default job: bodyshop.md_status.default_open
status: status || "OPEN",
clm_total: cieca_ttl,
policy_no,
ded_amt,
@@ -252,9 +254,7 @@ const partsManagementVehicleDamageEstimateAddRq = async (req, res) => {
servicing_dealer_contact,
// stash any extra CIECA stuff we didnt map above
production_vars: {
documentVersions: [] // weve flattened these
},
production_vars: {},
// nested relationships
vehicle: { data: vehicleData },