Some suggested edits
This commit is contained in:
parent
7408912c2e
commit
9b92943db0
7 changed files with 11 additions and 120 deletions
|
|
@ -1,5 +1,6 @@
|
|||
const applicationConfig = {
|
||||
CURRENT_ENVIRONMENT: process.env.VUE_APP_CURRENT_ENVIRONMENT, // "Localhost", "Dev", "QA", and "Prod"
|
||||
CONSUMER_CF_DISTRO: process.env.VUE_APP_CONSUMER_CF_DISTRO,
|
||||
APPLICATION_NAME: "SelfService",
|
||||
SITE_ENTRY_TRIGGER_VALUE: "SelfService"
|
||||
};
|
||||
|
|
|
|||
|
|
@ -7,70 +7,10 @@ const endpoints = {
|
|||
url: "/content/api/v1/content/HomepageInfo",
|
||||
method: "GET",
|
||||
},
|
||||
GetVehicleYears: {
|
||||
url: "/vehicle/api/v1/vehicle/years",
|
||||
method: "GET",
|
||||
},
|
||||
GetVehicleMakes: {
|
||||
url: "/vehicle/api/v1/vehicle/Makes",
|
||||
method: "GET",
|
||||
},
|
||||
GetVehicleModels: {
|
||||
url: "/vehicle/api/v1/vehicle/Models",
|
||||
method: "GET",
|
||||
},
|
||||
GetVehicleStyles: {
|
||||
url: "/vehicle/api/v1/vehicle/Styles",
|
||||
method: "GET",
|
||||
},
|
||||
GetVehicle: {
|
||||
url: "/vehicle/api/v1/vehicle/lookup",
|
||||
method: "GET",
|
||||
},
|
||||
GetDamageOptions: {
|
||||
url: "/parts/api/v1/parts/damage-options",
|
||||
method: "GET",
|
||||
},
|
||||
GetPageData: {
|
||||
url: "/content/api/v1/content",
|
||||
method: "GET",
|
||||
},
|
||||
LookupVehicleByYmms: {
|
||||
url: "/vehicle/api/v1/vehicle/Lookup",
|
||||
method: "GET",
|
||||
},
|
||||
LookupVehicleByVin: {
|
||||
url: "/vehicle/api/v1/vehicle/Lookup",
|
||||
method: "POST",
|
||||
},
|
||||
LookupVinByPlate: {
|
||||
url: "/vehicle/api/v1/vehicle/lookup-vin-by-plate",
|
||||
method: "POST",
|
||||
},
|
||||
LookupVinByAddress: {
|
||||
url: "/vehicle/api/v1/vehicle/lookup-vin-by-address",
|
||||
method: "POST",
|
||||
},
|
||||
GetPartsOrQuestions: {
|
||||
url: "/parts/api/v1/parts/parts-or-questions",
|
||||
method: "POST",
|
||||
},
|
||||
GetParts: {
|
||||
url: "/parts/api/v1/parts/parts",
|
||||
method: "POST",
|
||||
},
|
||||
GetCapabilityQuestions: {
|
||||
url: "/parts/api/v1/parts/capability-questions",
|
||||
method: "GET"
|
||||
},
|
||||
GetPartFromCapabilityAnswer: {
|
||||
url: "/parts/api/v1/parts/part-from-capability-answer",
|
||||
method: "POST"
|
||||
},
|
||||
ValidateZip: {
|
||||
url: "/location/api/v1/location/zip",
|
||||
method: "GET",
|
||||
}
|
||||
};
|
||||
|
||||
export { endpoints };
|
||||
|
|
|
|||
|
|
@ -3,43 +3,6 @@ const storeActions = {
|
|||
GET_ROUTE_INFO_ACTION: "getRouteInfo",
|
||||
GET_HOMEPAGE_NAME: "getHomepageName",
|
||||
GET_PAGE_DATA: "getPageData",
|
||||
|
||||
// Vehicle Actions
|
||||
GET_VEHICLE_YEARS: "getVehicleYears",
|
||||
GET_VEHICLE_MAKES: "getVehicleMakes",
|
||||
GET_VEHICLE_MODELS: "getVehicleModels",
|
||||
GET_VEHICLE_STYLES: "getVehicleStyles",
|
||||
SET_VEHICLE: "setVehicle",
|
||||
GET_DAMAGE_OPTIONS: "getDamageOptions",
|
||||
GET_EVOX_IMAGE: "getEvoxImage",
|
||||
|
||||
// Lookup Actions
|
||||
LOOKUP_VEHICLE_BY_YMMS: "lookupVehicleByYmms",
|
||||
LOOKUP_VEHICLE_BY_VIN: "lookupVehicleByVin",
|
||||
LOOKUP_VIN_BY_PLATE: "lookupVinByPlate",
|
||||
LOOKUP_VIN_BY_ADDRESS: "lookupVinByAddress",
|
||||
|
||||
GET_PARTS_OR_QUESTIONS: "getPartsOrQuestions",
|
||||
GET_PARTS: "getParts",
|
||||
GET_CAPABILITY_QUESTIONS: "getCapabilityQuestions",
|
||||
GET_PART_FROM_CAPABILITY_QUESTION_ANSWER: "getPartFromCapabilityQuestionAnswer",
|
||||
GET_MOLDING_QUESTIONS: "getMoldingQuestions",
|
||||
VALIDATE_ZIP: "validateZip",
|
||||
CLEAR_VIN: "clearVin",
|
||||
|
||||
// VEHICLE Actions
|
||||
UPDATE_YEAR: "updateYear",
|
||||
UPDATE_MAKE: "updateMake",
|
||||
UPDATE_MODEL: "updateModel",
|
||||
UPDATE_STYLE: "updateStyle",
|
||||
UPDATE_CAR_ID: "updateCarId",
|
||||
UPDATE_VEHICLE_CATEGORY: "updateVehicleCategory",
|
||||
UPDATE_VEHICLE_IMAGE_URL: "updateVehicleImageUrl",
|
||||
UPDATE_VEHICLE_IMAGE_VIF_NUMBER: "updateVehicleImageVifNumber",
|
||||
UPDATE_VEHICLE_IMAGE_COLOR: "updateVehicleImageColor",
|
||||
UPDATE_VEHICLE_VIN: "updateVehicleVin",
|
||||
UPDATE_VEHICLE: "updateVehicle",
|
||||
|
||||
};
|
||||
|
||||
export { storeActions };
|
||||
|
|
|
|||
|
|
@ -8,7 +8,6 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import { storeActions } from "@/constants/store-actions";
|
||||
export default {
|
||||
name: 'vehicle-make',
|
||||
methods:
|
||||
|
|
|
|||
|
|
@ -8,13 +8,18 @@ import { useMainStore } from './store';
|
|||
import baseMixin from "@/mixins/base-mixin.js";
|
||||
|
||||
const vueApp = createApp(App);
|
||||
|
||||
// Pinia
|
||||
const pinia = createPinia();
|
||||
pinia.use(piniaPluginPersistedstate);
|
||||
vueApp.use(pinia);
|
||||
vueApp.config.globalProperties.$store = useMainStore();
|
||||
vueApp.mixin(baseMixin);
|
||||
useMainStore().populateInitialState();
|
||||
|
||||
// Additional Vue items to setup
|
||||
vueApp.mixin(baseMixin);
|
||||
vueApp.use(router);
|
||||
|
||||
vueApp.mount("#app");
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
import { defineStore } from "pinia";
|
||||
import { endpoints } from "@/constants/endpoints.js";
|
||||
import globalMethods from "@/global-methods";
|
||||
import { storeActions } from "@/constants/store-actions";
|
||||
|
||||
const storeId = 'main';
|
||||
|
||||
const getDefaultState = () => {
|
||||
return {
|
||||
|
|
@ -32,10 +31,6 @@ const getDefaultState = () => {
|
|||
accountNumber: 0,
|
||||
},
|
||||
applicationUser: {
|
||||
eventBus: [],
|
||||
pageData: {},
|
||||
saveOrderPromise: null,
|
||||
savedSessionId: null,
|
||||
crmCustomerId: null,
|
||||
lastPageVisited: null,
|
||||
experiments: [],
|
||||
|
|
@ -47,20 +42,11 @@ const getDefaultState = () => {
|
|||
export const state = getDefaultState();
|
||||
|
||||
export const useMainStore = defineStore({
|
||||
id: 'main',
|
||||
id: storeId,
|
||||
state: () => state,
|
||||
getters: {},
|
||||
actions:
|
||||
{
|
||||
updateYear(year) {
|
||||
this.order.vehicle.year = year;
|
||||
},
|
||||
updateMake(make) {
|
||||
this.order.vehicle.make = make;
|
||||
},
|
||||
updateModel(model) {
|
||||
this.order.vehicle.model = model;
|
||||
},
|
||||
// Vehicle
|
||||
saveVehicleYear(year)
|
||||
{
|
||||
|
|
@ -70,11 +56,9 @@ export const useMainStore = defineStore({
|
|||
},
|
||||
populateInitialState()
|
||||
{
|
||||
const storeId = 'main';
|
||||
if(!localStorage.getItem(storeId)) {
|
||||
this.$state = state;
|
||||
}
|
||||
|
||||
}
|
||||
},
|
||||
persist: true
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
process.env.VUE_APP_CONSUMER_CF_DISTRO =
|
||||
"https://consumerapidev.safelite.com";
|
||||
process.env.VUE_APP_CONSUMER_CF_DISTRO ="https://digitalapi.dev.sagaws.net";
|
||||
process.env.VUE_APP_CURRENT_ENVIRONMENT = "Localhost";
|
||||
|
||||
module.exports = {
|
||||
|
|
|
|||
Loading…
Reference in a new issue