From b1e160310d04ee22024dd18ebbcd0c6f220e626e Mon Sep 17 00:00:00 2001 From: Sravan Gopathi Date: Mon, 10 Apr 2023 08:44:39 -0400 Subject: [PATCH] Implemented Front End changes as per the card#1204 --- .../service-location-helper.js | 2 +- .../service-location/service-location.spec.js | 1 + src/store/index.js | 14 ++++++++++++++ 3 files changed, 16 insertions(+), 1 deletion(-) diff --git a/src/layouts/service-location/helpers/service-location-helper/service-location-helper.js b/src/layouts/service-location/helpers/service-location-helper/service-location-helper.js index 157c28f2b..24be20fc8 100644 --- a/src/layouts/service-location/helpers/service-location-helper/service-location-helper.js +++ b/src/layouts/service-location/helpers/service-location-helper/service-location-helper.js @@ -35,7 +35,7 @@ export async function getServiceabilityDetails(serviceZipCode, lineItems) { storeActions.GET_SERVICEABILITY_DETAILS, { serviceZipCode: serviceZipCode, - lineItems: lineItems, + lineItems: lineItems }, false ); diff --git a/src/layouts/service-location/service-location.spec.js b/src/layouts/service-location/service-location.spec.js index aad61b630..d7f5348b9 100644 --- a/src/layouts/service-location/service-location.spec.js +++ b/src/layouts/service-location/service-location.spec.js @@ -39,6 +39,7 @@ const mockGetServiceabilityDetails = (mockServiceZipCode) => { isRecalibrationServiceableInshop: true, isGlassServiceableMobile: true, isRecalibrationServiceableMobile: true, + IsServiceability:true, }; return Promise.resolve(serviceabilityDetails); diff --git a/src/store/index.js b/src/store/index.js index 6da7550a2..0549ed8c4 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -941,6 +941,20 @@ export const actions = { // const lineItems = context.getters.order.lineItems; // const lineItemsToSend = [...lineItems.supportingItems]; // const encodedLineItems = encodeURIComponent(JSON.stringify(lineItemsToSend)); + + //TODO: Restore this when CSR-1204 is 100% complete. Line# 958 to 961 should be removed Begin + // 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}`, + // }); + //TODO: Restore this when CSR-1204 is 100% complete End + // return globalMethods.callHttpClient({ // method: endpoints.GetServiceabilityDetails.method, // endpoint: `${endpoints.GetServiceabilityDetails.url}?zip=${serviceZipCode}&lineItems=${encodedLineItems}`,