From 5ed736cf3514535f9524c3c160d20d3e72fe3467 Mon Sep 17 00:00:00 2001 From: Kroell Date: Wed, 19 Apr 2023 12:29:25 -0400 Subject: [PATCH] serviceability details --- src/constants/endpoints.js | 6 +++++- src/helpers/service-location-helper.js | 3 +-- .../service-location/service-location.vue | 21 ++++++++++++++++--- 3 files changed, 24 insertions(+), 6 deletions(-) diff --git a/src/constants/endpoints.js b/src/constants/endpoints.js index 69da2eae..4df09c86 100644 --- a/src/constants/endpoints.js +++ b/src/constants/endpoints.js @@ -46,7 +46,11 @@ const endpoints = { GetPartFromCapabilityAnswer: { url: "/parts/api/v1/parts/part-from-capability-answer", method: "POST", -}, + }, + GetServiceabilityDetails: { + url: "/location/api/v1/location/serviceability-details", + method: "GET", + }, GetVehicle: { url: "/vehicle/api/v1/vehicle/lookup", method: "GET", diff --git a/src/helpers/service-location-helper.js b/src/helpers/service-location-helper.js index 9008a8c5..ca8841c8 100644 --- a/src/helpers/service-location-helper.js +++ b/src/helpers/service-location-helper.js @@ -2,8 +2,7 @@ import { useMainStore } from '@/store'; import baseMixin from "@/mixins/base-mixin.js"; export async function getServiceabilityDetails(serviceZipCode, lineItems) { - const serviceabilityDetails = await baseMixin.methods.dispatchStoreAction( - useMainStore.GET_SERVICEABILITY_DETAILS, + const serviceabilityDetails = await useMainStore().getServiceabilityDetails( { serviceZipCode: serviceZipCode, lineItems: lineItems, diff --git a/src/layouts/service-location/service-location.vue b/src/layouts/service-location/service-location.vue index 69aaf3de..02b0f0e4 100644 --- a/src/layouts/service-location/service-location.vue +++ b/src/layouts/service-location/service-location.vue @@ -40,15 +40,17 @@