Merge branch 'develop' into feature/CSR-1109
This commit is contained in:
commit
3dd67afea3
1 changed files with 17 additions and 6 deletions
|
|
@ -1148,9 +1148,9 @@ export const actions = {
|
|||
partNumbers = partNumbers.map((lineItem) => {
|
||||
return lineItem.partNumber;
|
||||
});
|
||||
|
||||
const glassPieces = order.damage.glassToReplace ?? [];
|
||||
|
||||
const glassPieces = order.damage.glassToReplace
|
||||
? convertGlassPieceToBackEndCompatibleFormat(order.damage.glassToReplace)
|
||||
: [];
|
||||
var payload = {
|
||||
providerNumber: providerNumber,
|
||||
startDate: startDate,
|
||||
|
|
@ -1179,7 +1179,7 @@ export const actions = {
|
|||
make: vehicle.make,
|
||||
model: vehicle.model,
|
||||
style: vehicle.style,
|
||||
vin: vehicle.vin,
|
||||
vin: vehicle.vin ?? "",
|
||||
},
|
||||
};
|
||||
|
||||
|
|
@ -1204,7 +1204,9 @@ export const actions = {
|
|||
partNumbers = partNumbers.map((lineItem) => {
|
||||
return lineItem.partNumber;
|
||||
});
|
||||
const glassPieces = order.damage.glassToReplace ?? [];
|
||||
const glassPieces = order.damage.glassToReplace
|
||||
? convertGlassPieceToBackEndCompatibleFormat(order.damage.glassToReplace)
|
||||
: [];
|
||||
var payload = {
|
||||
startDate: startDate,
|
||||
endDate: endDate,
|
||||
|
|
@ -1231,7 +1233,7 @@ export const actions = {
|
|||
make: vehicle.make,
|
||||
model: vehicle.model,
|
||||
style: vehicle.style,
|
||||
vin: vehicle.vin,
|
||||
vin: vehicle.vin ?? "",
|
||||
},
|
||||
zipCode: order.serviceLocation.zipCode,
|
||||
};
|
||||
|
|
@ -1999,3 +2001,12 @@ function buildQueryStringParameterFromArrayOfComplexObjects(arrayOfObjects, para
|
|||
// Remove trailing &
|
||||
return queryStringParameter.slice(0, -1);
|
||||
}
|
||||
|
||||
function convertGlassPieceToBackEndCompatibleFormat(glassPieces) {
|
||||
return glassPieces.map((glassPiece) => {
|
||||
return {
|
||||
location: glassPiece.glassLocation,
|
||||
name: glassPiece.glassName,
|
||||
};
|
||||
});
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue