From be1c078d58e31f57ee0a2a53d62e3a8f070b64cb Mon Sep 17 00:00:00 2001 From: Kroell Date: Thu, 12 Jan 2023 09:59:11 -0500 Subject: [PATCH] moved lookupVinByPlate to store --- .../license-plate-lookup.vue | 21 +------------------ src/store/index.js | 21 +++++++++++++++++++ 2 files changed, 22 insertions(+), 20 deletions(-) diff --git a/src/layouts/license-plate-lookup/license-plate-lookup.vue b/src/layouts/license-plate-lookup/license-plate-lookup.vue index dc0de3f8..e99fe78f 100644 --- a/src/layouts/license-plate-lookup/license-plate-lookup.vue +++ b/src/layouts/license-plate-lookup/license-plate-lookup.vue @@ -137,26 +137,7 @@ export default { // Continue }, - async lookupVinByPlate(licensePlate) { - try { - const response = await globalMethods.callHttpClient({ - method: endpoints.LookupVinByPlate.method, - endpoint: endpoints.LookupVinByPlate.url, - payload: { - licensePlate, - licenseState: "IL" // hard coded until Welcome Page is complete and license state can be pulled from store - }, - }); - - return response; - } catch (responseError) { - return { - error: { - status: responseError.status, - }, - }; - } - }, + resetActiveAlert() { this.activeVehicleLookupAlertType = null; }, diff --git a/src/store/index.js b/src/store/index.js index 25ecd268..d112db60 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -232,6 +232,27 @@ export const useMainStore = defineStore({ }); }, + async lookupVinByPlate(licensePlate) { + try { + const response = await globalMethods.callHttpClient({ + method: endpoints.LookupVinByPlate.method, + endpoint: endpoints.LookupVinByPlate.url, + payload: { + licensePlate, + licenseState: "IL" // hard coded until Welcome Page is complete and license state can be pulled from store + }, + }); + + return response; + } catch (responseError) { + return { + error: { + status: responseError.status, + }, + }; + } + }, + // PartsOrQuestions API Actions async getPartsOrQuestions() { const vehicle = this.vehicle;