CASH-276
CASH-276 persist canSafeliteService field
This commit is contained in:
parent
1274ee201a
commit
b9f14fdb2d
3 changed files with 16 additions and 1 deletions
|
|
@ -17,6 +17,7 @@ const storeMutations = {
|
||||||
UPDATE_VEHICLE_IMAGE_COLOR: "updateVehicleImageColor",
|
UPDATE_VEHICLE_IMAGE_COLOR: "updateVehicleImageColor",
|
||||||
UPDATE_VEHICLE_VIN: "updateVehicleVin",
|
UPDATE_VEHICLE_VIN: "updateVehicleVin",
|
||||||
UPDATE_VEHICLE: "updateVehicle",
|
UPDATE_VEHICLE: "updateVehicle",
|
||||||
|
UPDATE_VEHICLE_CAN_SAFELITE_SERVICE: "updateVehicleCanSafeliteService",
|
||||||
|
|
||||||
UPDATE_IS_REPAIR: "updateIsRepair",
|
UPDATE_IS_REPAIR: "updateIsRepair",
|
||||||
UPDATE_NUMBER_OF_CHIPS: "updateNumberOfChips",
|
UPDATE_NUMBER_OF_CHIPS: "updateNumberOfChips",
|
||||||
|
|
|
||||||
|
|
@ -140,7 +140,7 @@ export default {
|
||||||
modelOptions: [],
|
modelOptions: [],
|
||||||
styleOptions: [],
|
styleOptions: [],
|
||||||
displayNoServiceAlert: false,
|
displayNoServiceAlert: false,
|
||||||
canSafeliteService: false,
|
canSafeliteService: this.canSafeliteServiceFromStore(),
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
@ -316,6 +316,9 @@ export default {
|
||||||
},
|
},
|
||||||
|
|
||||||
watch: {
|
watch: {
|
||||||
|
serviceZipCode(newValue, oldValue) {
|
||||||
|
this.resetAlert();
|
||||||
|
},
|
||||||
async selectedYear(year) {
|
async selectedYear(year) {
|
||||||
this.resetAlert();
|
this.resetAlert();
|
||||||
this.makeOptions = [];
|
this.makeOptions = [];
|
||||||
|
|
@ -323,6 +326,7 @@ export default {
|
||||||
this.selectedModel = null;
|
this.selectedModel = null;
|
||||||
this.selectedStyle = null;
|
this.selectedStyle = null;
|
||||||
this.vehicleSubType = null;
|
this.vehicleSubType = null;
|
||||||
|
this.canSafeliteService = false;
|
||||||
this.carId = null;
|
this.carId = null;
|
||||||
if (year) {
|
if (year) {
|
||||||
const result = await this.getMakeOptions(year);
|
const result = await this.getMakeOptions(year);
|
||||||
|
|
@ -496,6 +500,7 @@ export default {
|
||||||
vehicleSubType: this.vehicleSubType,
|
vehicleSubType: this.vehicleSubType,
|
||||||
carId: this.carId,
|
carId: this.carId,
|
||||||
category: this.category,
|
category: this.category,
|
||||||
|
canSafeliteService: this.canSafeliteService,
|
||||||
imageUrl: this.imageUrl,
|
imageUrl: this.imageUrl,
|
||||||
imageVifNumber: this.imageVifNumber,
|
imageVifNumber: this.imageVifNumber,
|
||||||
imageVifColor: this.imageVifColor,
|
imageVifColor: this.imageVifColor,
|
||||||
|
|
@ -553,6 +558,9 @@ export default {
|
||||||
selectedStylefromStore() {
|
selectedStylefromStore() {
|
||||||
return store.getters.externalParameterVehicle.style ?? store.getters.vehicle.style;
|
return store.getters.externalParameterVehicle.style ?? store.getters.vehicle.style;
|
||||||
},
|
},
|
||||||
|
canSafeliteServiceFromStore() {
|
||||||
|
return store.getters.vehicle.canSafeliteService ?? false;
|
||||||
|
},
|
||||||
async getMakeOptions(year) {
|
async getMakeOptions(year) {
|
||||||
return await baseMixin.methods.dispatchStoreActionWithLogging(
|
return await baseMixin.methods.dispatchStoreActionWithLogging(
|
||||||
storeActions.GET_VEHICLE_MAKES,
|
storeActions.GET_VEHICLE_MAKES,
|
||||||
|
|
|
||||||
|
|
@ -65,6 +65,7 @@ const getDefaultState = () => {
|
||||||
carId: null,
|
carId: null,
|
||||||
category: null,
|
category: null,
|
||||||
vin: null,
|
vin: null,
|
||||||
|
canSafeliteService: null,
|
||||||
imageUrl: null,
|
imageUrl: null,
|
||||||
imageVifNumber: null,
|
imageVifNumber: null,
|
||||||
imageColor: null,
|
imageColor: null,
|
||||||
|
|
@ -221,6 +222,9 @@ export const mutations = {
|
||||||
updateVehicleCategory(state, category) {
|
updateVehicleCategory(state, category) {
|
||||||
state.order.vehicle.category = category;
|
state.order.vehicle.category = category;
|
||||||
},
|
},
|
||||||
|
updateVehicleCanSafeliteService(state, canSafeliteService) {
|
||||||
|
state.order.vehicle.canSafeliteService = canSafeliteService;
|
||||||
|
},
|
||||||
updateVehicleImageUrl(state, imageUrl) {
|
updateVehicleImageUrl(state, imageUrl) {
|
||||||
state.order.vehicle.imageUrl = imageUrl;
|
state.order.vehicle.imageUrl = imageUrl;
|
||||||
},
|
},
|
||||||
|
|
@ -2357,6 +2361,7 @@ export const actions = {
|
||||||
vehicleSubType,
|
vehicleSubType,
|
||||||
carId,
|
carId,
|
||||||
category,
|
category,
|
||||||
|
canSafeliteService,
|
||||||
imageUrl,
|
imageUrl,
|
||||||
imageVifNumber,
|
imageVifNumber,
|
||||||
imageVifColor,
|
imageVifColor,
|
||||||
|
|
@ -2379,6 +2384,7 @@ export const actions = {
|
||||||
context.commit(storeMutations.UPDATE_VEHICLE_SUBTYPE, vehicleSubType);
|
context.commit(storeMutations.UPDATE_VEHICLE_SUBTYPE, vehicleSubType);
|
||||||
context.commit(storeMutations.UPDATE_CAR_ID, carId);
|
context.commit(storeMutations.UPDATE_CAR_ID, carId);
|
||||||
context.commit(storeMutations.UPDATE_VEHICLE_CATEGORY, category);
|
context.commit(storeMutations.UPDATE_VEHICLE_CATEGORY, category);
|
||||||
|
context.commit(storeMutations.UPDATE_VEHICLE_CAN_SAFELITE_SERVICE, canSafeliteService);
|
||||||
context.commit(storeMutations.UPDATE_VEHICLE_IMAGE_URL, imageUrl);
|
context.commit(storeMutations.UPDATE_VEHICLE_IMAGE_URL, imageUrl);
|
||||||
context.commit(storeMutations.UPDATE_VEHICLE_IMAGE_VIF_NUMBER, imageVifNumber);
|
context.commit(storeMutations.UPDATE_VEHICLE_IMAGE_VIF_NUMBER, imageVifNumber);
|
||||||
context.commit(storeMutations.UPDATE_VEHICLE_IMAGE_COLOR, imageVifColor);
|
context.commit(storeMutations.UPDATE_VEHICLE_IMAGE_COLOR, imageVifColor);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue