CASH-69
This commit is contained in:
parent
b045d6e135
commit
bba2631ec5
4 changed files with 44 additions and 2 deletions
|
|
@ -16,6 +16,8 @@ const storeMutations = {
|
|||
UPDATE_VEHICLE_IMAGE_COLOR: "updateVehicleImageColor",
|
||||
UPDATE_VEHICLE_VIN: "updateVehicleVin",
|
||||
UPDATE_VEHICLE: "updateVehicle",
|
||||
UPDATE_VEHICLE_MOBILE_STATIC_RECALIBRATION_APPLICABLE:
|
||||
"updateIsMobileStaticRecalibrationApplicable",
|
||||
|
||||
UPDATE_IS_REPAIR: "updateIsRepair",
|
||||
UPDATE_NUMBER_OF_CHIPS: "updateNumberOfChips",
|
||||
|
|
|
|||
|
|
@ -188,6 +188,8 @@ export default {
|
|||
isRecalibrationServiceableInshop: null,
|
||||
isGlassServiceableMobile: null,
|
||||
isRecalibrationServiceableMobile: null,
|
||||
isVehicleMobileStaticRecalibrationApplicable:
|
||||
this.getIsVehicleMobileStaticRecalibrationApplicableFromStore(),
|
||||
selectedAppointmentType: this.getSelectedAppointmentType(),
|
||||
selectedProvider: this.getSelectedProvider(),
|
||||
mobileFeePart: null,
|
||||
|
|
@ -306,7 +308,11 @@ export default {
|
|||
},
|
||||
isServiceableMobile() {
|
||||
if (this.isRecalibrationServiceableMobile !== null) {
|
||||
return this.isGlassServiceableMobile && this.isRecalibrationServiceableMobile;
|
||||
return (
|
||||
this.isGlassServiceableMobile &&
|
||||
this.isRecalibrationServiceableMobile &&
|
||||
this.isVehicleMobileStaticRecalibrationApplicable
|
||||
);
|
||||
} else {
|
||||
return this.isGlassServiceableMobile;
|
||||
}
|
||||
|
|
@ -485,6 +491,9 @@ export default {
|
|||
getSelectedProvider() {
|
||||
return store.getters.order.serviceLocation.provider;
|
||||
},
|
||||
getIsVehicleMobileStaticRecalibrationApplicableFromStore() {
|
||||
return store.getters.order.vehicle.isMobileStaticRecalibrationApplicable;
|
||||
},
|
||||
resetMobileLocation() {
|
||||
this.streetAddress = "";
|
||||
this.apartmentNumberOrBusinessName = "";
|
||||
|
|
|
|||
|
|
@ -117,6 +117,7 @@ export default {
|
|||
modelOptions: [],
|
||||
styleOptions: [],
|
||||
displayNoServiceAlert: false,
|
||||
isMobileStaticRecalibrationApplicable: this.getIsMobileStaticRecalibrationApplicable(),
|
||||
};
|
||||
},
|
||||
|
||||
|
|
@ -438,6 +439,8 @@ export default {
|
|||
this.imageVifNumber = result?.data.imageVifNumber;
|
||||
this.imageVifColor = result?.data.imageVifColor;
|
||||
this.displayNoServiceAlert = !result?.data.canSafeliteService;
|
||||
this.isMobileStaticRecalibrationApplicable =
|
||||
result?.data.isMobileStaticRecalibrationApplicable;
|
||||
},
|
||||
resetAlert() {
|
||||
this.displayNoServiceAlert = false;
|
||||
|
|
@ -456,6 +459,8 @@ export default {
|
|||
imageUrl: this.imageUrl,
|
||||
imageVifNumber: this.imageVifNumber,
|
||||
imageVifColor: this.imageVifColor,
|
||||
isMobileStaticRecalibrationApplicable:
|
||||
this.isMobileStaticRecalibrationApplicable,
|
||||
},
|
||||
false
|
||||
);
|
||||
|
|
@ -531,6 +536,9 @@ export default {
|
|||
getImageVifColorfromStore() {
|
||||
return store.getters.vehicle.imageVifColor;
|
||||
},
|
||||
getIsMobileStaticRecalibrationApplicable() {
|
||||
return store.getters.vehicle.isMobileStaticRecalibrationApplicable;
|
||||
},
|
||||
},
|
||||
|
||||
components: {
|
||||
|
|
|
|||
|
|
@ -68,6 +68,7 @@ const getDefaultState = () => {
|
|||
registration: {
|
||||
licensePlate: null,
|
||||
},
|
||||
isMobileStaticRecalibrationApplicable: false,
|
||||
},
|
||||
serviceLocation: {
|
||||
address: null,
|
||||
|
|
@ -225,6 +226,10 @@ export const mutations = {
|
|||
updateVehicleVin(state, vin) {
|
||||
state.order.vehicle.vin = vin;
|
||||
},
|
||||
updateIsMobileStaticRecalibrationApplicable(state, isMobileStaticRecalibrationApplicable) {
|
||||
state.order.vehicle.isMobileStaticRecalibrationApplicable =
|
||||
isMobileStaticRecalibrationApplicable;
|
||||
},
|
||||
updateIsRepair(state, isRepair) {
|
||||
state.order.damage.isRepair = isRepair;
|
||||
},
|
||||
|
|
@ -350,6 +355,8 @@ export const mutations = {
|
|||
state.order.vehicle.imageUrl = vehicleInfo.imageUrl;
|
||||
state.order.vehicle.imageVifNumber = vehicleInfo.imageVifNumber;
|
||||
state.order.vehicle.imageColor = vehicleInfo.imageVifColor;
|
||||
state.order.vehicle.isMobileStaticRecalibrationApplicable =
|
||||
vehicleInfo.isMobileStaticRecalibrationApplicable;
|
||||
},
|
||||
updateRegistration(state, registrationInfo) {
|
||||
state.order.vehicle.registration.licensePlate = registrationInfo?.licensePlate;
|
||||
|
|
@ -534,6 +541,7 @@ export const mutations = {
|
|||
state.order.vehicle.imageUrl = null;
|
||||
state.order.vehicle.imageVifNumber = null;
|
||||
state.order.vehicle.imageColor = null;
|
||||
state.order.vehicle.isMobileStaticRecalibrationApplicable = false;
|
||||
},
|
||||
resetDamageState(state) {
|
||||
state.order.damage.isRepair = null;
|
||||
|
|
@ -2221,7 +2229,18 @@ export const actions = {
|
|||
// Vehicle
|
||||
saveVehicle(
|
||||
context,
|
||||
{ year, make, model, style, carId, category, imageUrl, imageVifNumber, imageVifColor }
|
||||
{
|
||||
year,
|
||||
make,
|
||||
model,
|
||||
style,
|
||||
carId,
|
||||
category,
|
||||
imageUrl,
|
||||
imageVifNumber,
|
||||
imageVifColor,
|
||||
isMobileStaticRecalibrationApplicable,
|
||||
}
|
||||
) {
|
||||
if (
|
||||
context.state.order.vehicle.year != year ||
|
||||
|
|
@ -2242,6 +2261,10 @@ export const actions = {
|
|||
context.commit(storeMutations.UPDATE_VEHICLE_IMAGE_URL, imageUrl);
|
||||
context.commit(storeMutations.UPDATE_VEHICLE_IMAGE_VIF_NUMBER, imageVifNumber);
|
||||
context.commit(storeMutations.UPDATE_VEHICLE_IMAGE_COLOR, imageVifColor);
|
||||
context.commit(
|
||||
storeMutations.UPDATE_VEHICLE_MOBILE_STATIC_RECALIBRATION_APPLICABLE,
|
||||
isMobileStaticRecalibrationApplicable
|
||||
);
|
||||
}
|
||||
},
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue