moved lookupVinByPlate to store

This commit is contained in:
Kroell 2023-01-12 09:59:11 -05:00
parent 546915e39c
commit be1c078d58
2 changed files with 22 additions and 20 deletions

View file

@ -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;
},

View file

@ -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;