1204: Payload changes
This commit is contained in:
parent
1f2ead4579
commit
1c2c44132e
3 changed files with 9 additions and 5 deletions
|
|
@ -35,7 +35,7 @@ export async function getServiceabilityDetails(serviceZipCode, lineItems) {
|
|||
storeActions.GET_SERVICEABILITY_DETAILS,
|
||||
{
|
||||
serviceZipCode: serviceZipCode,
|
||||
lineItems: lineItems
|
||||
lineItems: lineItems,
|
||||
},
|
||||
false
|
||||
);
|
||||
|
|
|
|||
|
|
@ -39,7 +39,6 @@ const mockGetServiceabilityDetails = (mockServiceZipCode) => {
|
|||
isRecalibrationServiceableInshop: true,
|
||||
isGlassServiceableMobile: true,
|
||||
isRecalibrationServiceableMobile: true,
|
||||
IsServiceability:true,
|
||||
};
|
||||
|
||||
return Promise.resolve(serviceabilityDetails);
|
||||
|
|
|
|||
|
|
@ -974,15 +974,20 @@ export const actions = {
|
|||
lineItemsWithOnlyPartNumbers,
|
||||
"lineItems"
|
||||
);
|
||||
const vehicle = context.getters.vehicle;
|
||||
const vehicle = context.getters.vehicle;
|
||||
const carId = vehicle.carId;
|
||||
const damage = context.getters.damage;
|
||||
const glassArray = damage.glassToReplace;
|
||||
// create a new array to avoid mutating state
|
||||
const glassArrayForPayload = convertGlassPieceNamingForApi(glassArray);
|
||||
return globalMethods.callHttpClient({
|
||||
method: endpoints.GetServiceabilityDetails.method,
|
||||
endpoint: `${endpoints.GetServiceabilityDetails.url}?zip=${serviceZipCode}&lineItems=${encodedLineItems}&carId=${carId}&glassPieces=${glassArrayForPayload}`,
|
||||
endpoint: endpoints.GetServiceabilityDetails.url,
|
||||
payload: {
|
||||
zip: serviceZipCode,
|
||||
lineItems: lineItemsToSend,
|
||||
carId: carId,
|
||||
glassPieces: glassArrayForPayload,
|
||||
},
|
||||
});
|
||||
},
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue