CSR-1112 with fix for serviceability call

This commit is contained in:
Leah Schumann 2023-05-11 13:01:02 -04:00
parent 36f6040589
commit 7d6973107c
2 changed files with 23 additions and 26 deletions

View file

@ -193,25 +193,25 @@ export default {
}
},
},
// shopProviders: {
// async handler(newValue) {
// this.resetAnswers();
shopProviders: {
async handler(newValue) {
//this.resetAnswers();
// await this.$nextTick();
await this.$nextTick();
// if (this.selectedAppointmentType) {
// const selectedShopIndex = newValue.findIndex(
// (provider) => provider.providerNumber == this.modelValue?.providerNumber
// );
if (this.selectedAppointmentType) {
const selectedShopIndex = newValue.findIndex(
(provider) => provider.providerNumber == this.modelValue
);
// if (selectedShopIndex >= 3) {
// await this.getNextShopsFromList(selectedShopIndex + 1);
// } else {
// await this.getNextShopsFromList();
// }
// }
// },
// },
if (selectedShopIndex >= 3) {
await this.getNextShopsFromList(selectedShopIndex + 1);
} else {
await this.getNextShopsFromList();
}
}
},
},
},
components: {
alert,

View file

@ -970,24 +970,21 @@ export const actions = {
partNumber: lineItem.partNumber,
})
);
const lineItemsToSend = buildQueryStringParameterFromArrayOfComplexObjects(
const lineItems = buildQueryStringParameterFromArrayOfComplexObjects(
lineItemsWithOnlyPartNumbers,
"lineItems"
);
const vehicle = context.getters.vehicle;
const carId = vehicle.carId;
const damage = context.getters.damage;
const glassArray = damage.glassToReplace;
const glassArrayForPayload = convertGlassPieceNamingForApi(glassArray);
const glassArray = convertGlassPieceNamingForApi(damage.glassToReplace);
const glassPieces = buildQueryStringParameterFromArrayOfComplexObjects(glassArray, "glassPieces")
return globalMethods.callHttpClient({
method: endpoints.GetServiceabilityDetails.method,
endpoint: endpoints.GetServiceabilityDetails.url,
payload: {
zip: serviceZipCode,
lineItems: lineItemsToSend,
carId: carId,
glassPieces: glassArrayForPayload,
},
endpoint: `${endpoints.GetServiceabilityDetails.url}?zip=${serviceZipCode}&carId=${carId}&${lineItems}&${glassPieces}`,
});
},