From 1f2ead4579d057015b9389b8619c2300fa3e06cc Mon Sep 17 00:00:00 2001 From: Sravan Gopathi Date: Tue, 9 May 2023 09:49:34 -0400 Subject: [PATCH] 1204: Front End changes. Added CarId and Glass Pieces to endpoint --- src/store/index.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/store/index.js b/src/store/index.js index 420248024..bad820b91 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -974,9 +974,15 @@ export const actions = { lineItemsWithOnlyPartNumbers, "lineItems" ); + 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}&${lineItemsToSend}`, + endpoint: `${endpoints.GetServiceabilityDetails.url}?zip=${serviceZipCode}&lineItems=${encodedLineItems}&carId=${carId}&glassPieces=${glassArrayForPayload}`, }); },