Merge pull request #2302 from Safelite/feature/CASH-153
Feature/CASH-153
This commit is contained in:
commit
1d5388aec6
7 changed files with 1062 additions and 56 deletions
|
|
@ -16,8 +16,6 @@ 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_MOBILE_STATIC_RECALIBRATION_APPLICABLE:
|
|
||||||
"updateIsMobileStaticRecalibrationApplicable",
|
|
||||||
|
|
||||||
UPDATE_IS_REPAIR: "updateIsRepair",
|
UPDATE_IS_REPAIR: "updateIsRepair",
|
||||||
UPDATE_NUMBER_OF_CHIPS: "updateNumberOfChips",
|
UPDATE_NUMBER_OF_CHIPS: "updateNumberOfChips",
|
||||||
|
|
|
||||||
1049
src/digital-components/date-picker/date-picker-2.vue
Normal file
1049
src/digital-components/date-picker/date-picker-2.vue
Normal file
File diff suppressed because it is too large
Load diff
|
|
@ -18,7 +18,7 @@
|
||||||
marginTopSizeOverride="1" />
|
marginTopSizeOverride="1" />
|
||||||
</template>
|
</template>
|
||||||
<locationAlerts cmsWidgetPrefix="LocationAlert-" ref="locationAlerts" />
|
<locationAlerts cmsWidgetPrefix="LocationAlert-" ref="locationAlerts" />
|
||||||
<datePicker
|
<datePicker2
|
||||||
customComponentId="dateQuestion"
|
customComponentId="dateQuestion"
|
||||||
selectableDatesSetting="custom"
|
selectableDatesSetting="custom"
|
||||||
ref="datePicker"
|
ref="datePicker"
|
||||||
|
|
@ -69,7 +69,7 @@ import navbar from "@/fmg-components/nav-bar/nav-bar";
|
||||||
import funnelSubHeader from "@/fmg-components/funnel-sub-header/funnel-sub-header";
|
import funnelSubHeader from "@/fmg-components/funnel-sub-header/funnel-sub-header";
|
||||||
import loadingModal from "@/fmg-components/loading-modal/loading-modal.vue";
|
import loadingModal from "@/fmg-components/loading-modal/loading-modal.vue";
|
||||||
import { Form, defineRule } from "vee-validate";
|
import { Form, defineRule } from "vee-validate";
|
||||||
import datePicker from "@/digital-components/date-picker/date-picker";
|
import datePicker2 from "@/digital-components/date-picker/date-picker-2";
|
||||||
import locationAlerts from "@/layouts/schedule/location-alerts/location-alerts";
|
import locationAlerts from "@/layouts/schedule/location-alerts/location-alerts";
|
||||||
import timeSlotModalQuestion from "./time-slot-modal-question/time-slot-modal-question";
|
import timeSlotModalQuestion from "./time-slot-modal-question/time-slot-modal-question";
|
||||||
import textBlock from "@/digital-components/text-block/text-block";
|
import textBlock from "@/digital-components/text-block/text-block";
|
||||||
|
|
@ -213,7 +213,7 @@ export default {
|
||||||
preSelectedDate = null;
|
preSelectedDate = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
const datePickerInitialDataPromise = await datePicker.methods.loadInitialData({
|
const datePickerInitialDataPromise = await datePicker2.methods.loadInitialData({
|
||||||
// setup config options for date-picker
|
// setup config options for date-picker
|
||||||
selectableDatesSetting: "custom",
|
selectableDatesSetting: "custom",
|
||||||
initialViewRowsToShow: 5,
|
initialViewRowsToShow: 5,
|
||||||
|
|
@ -537,7 +537,7 @@ export default {
|
||||||
funnelSubHeader,
|
funnelSubHeader,
|
||||||
Form,
|
Form,
|
||||||
loadingModal,
|
loadingModal,
|
||||||
datePicker,
|
datePicker2,
|
||||||
locationAlerts,
|
locationAlerts,
|
||||||
timeSlotModalQuestion,
|
timeSlotModalQuestion,
|
||||||
textBlock,
|
textBlock,
|
||||||
|
|
|
||||||
|
|
@ -182,9 +182,6 @@ beforeEach(() => {
|
||||||
zipCode: "43235",
|
zipCode: "43235",
|
||||||
state: "OH",
|
state: "OH",
|
||||||
},
|
},
|
||||||
vehicle: {
|
|
||||||
isMobileStaticRecalibrationApplicable: true,
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
damage: {
|
damage: {
|
||||||
isRepair: false,
|
isRepair: false,
|
||||||
|
|
|
||||||
|
|
@ -192,8 +192,6 @@ export default {
|
||||||
isRecalibrationServiceableInshop: null,
|
isRecalibrationServiceableInshop: null,
|
||||||
isGlassServiceableMobile: null,
|
isGlassServiceableMobile: null,
|
||||||
isRecalibrationServiceableMobile: null,
|
isRecalibrationServiceableMobile: null,
|
||||||
isVehicleMobileStaticRecalibrationApplicable:
|
|
||||||
this.getIsVehicleMobileStaticRecalibrationApplicableFromStore(),
|
|
||||||
selectedAppointmentType: this.getSelectedAppointmentType(),
|
selectedAppointmentType: this.getSelectedAppointmentType(),
|
||||||
selectedProvider: this.getSelectedProvider(),
|
selectedProvider: this.getSelectedProvider(),
|
||||||
mobileFeePart: null,
|
mobileFeePart: null,
|
||||||
|
|
@ -324,9 +322,8 @@ export default {
|
||||||
isMobileStaticRecalibrationApplicable() {
|
isMobileStaticRecalibrationApplicable() {
|
||||||
return (
|
return (
|
||||||
this.displayMSR &&
|
this.displayMSR &&
|
||||||
this.isVehicleMobileStaticRecalibrationApplicable &&
|
|
||||||
this.mobileFeePart?.partNumber == partNumberStrings.MOBILE_STATIC_RECAL_FEE &&
|
this.mobileFeePart?.partNumber == partNumberStrings.MOBILE_STATIC_RECAL_FEE &&
|
||||||
(this.isInsurance ? this.mobileFeePart?.isInsurable : true)
|
(this.isInsurance && !this.isITAC ? this.mobileFeePart?.isInsurable : true)
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
displayMSR() {
|
displayMSR() {
|
||||||
|
|
@ -403,6 +400,9 @@ export default {
|
||||||
isInsurance() {
|
isInsurance() {
|
||||||
return store.getters.payment.isInsurance;
|
return store.getters.payment.isInsurance;
|
||||||
},
|
},
|
||||||
|
isITAC() {
|
||||||
|
return store.getters.order.policy.isItac;
|
||||||
|
},
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
arePagePrerequisitesValid() {
|
arePagePrerequisitesValid() {
|
||||||
|
|
@ -515,9 +515,6 @@ export default {
|
||||||
getSelectedProvider() {
|
getSelectedProvider() {
|
||||||
return store.getters.order.serviceLocation.provider;
|
return store.getters.order.serviceLocation.provider;
|
||||||
},
|
},
|
||||||
getIsVehicleMobileStaticRecalibrationApplicableFromStore() {
|
|
||||||
return store.getters.order.vehicle.isMobileStaticRecalibrationApplicable;
|
|
||||||
},
|
|
||||||
resetMobileLocation() {
|
resetMobileLocation() {
|
||||||
this.streetAddress = "";
|
this.streetAddress = "";
|
||||||
this.apartmentNumberOrBusinessName = "";
|
this.apartmentNumberOrBusinessName = "";
|
||||||
|
|
|
||||||
|
|
@ -121,7 +121,6 @@ export default {
|
||||||
modelOptions: [],
|
modelOptions: [],
|
||||||
styleOptions: [],
|
styleOptions: [],
|
||||||
displayNoServiceAlert: false,
|
displayNoServiceAlert: false,
|
||||||
isMobileStaticRecalibrationApplicable: this.getIsMobileStaticRecalibrationApplicable(),
|
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
@ -444,8 +443,6 @@ export default {
|
||||||
this.imageVifNumber = result?.data.imageVifNumber;
|
this.imageVifNumber = result?.data.imageVifNumber;
|
||||||
this.imageVifColor = result?.data.imageVifColor;
|
this.imageVifColor = result?.data.imageVifColor;
|
||||||
this.displayNoServiceAlert = !result?.data.canSafeliteService;
|
this.displayNoServiceAlert = !result?.data.canSafeliteService;
|
||||||
this.isMobileStaticRecalibrationApplicable =
|
|
||||||
result?.data.isMobileStaticRecalibrationApplicable;
|
|
||||||
},
|
},
|
||||||
resetAlert() {
|
resetAlert() {
|
||||||
this.displayNoServiceAlert = false;
|
this.displayNoServiceAlert = false;
|
||||||
|
|
@ -464,8 +461,6 @@ export default {
|
||||||
imageUrl: this.imageUrl,
|
imageUrl: this.imageUrl,
|
||||||
imageVifNumber: this.imageVifNumber,
|
imageVifNumber: this.imageVifNumber,
|
||||||
imageVifColor: this.imageVifColor,
|
imageVifColor: this.imageVifColor,
|
||||||
isMobileStaticRecalibrationApplicable:
|
|
||||||
this.isMobileStaticRecalibrationApplicable,
|
|
||||||
},
|
},
|
||||||
false
|
false
|
||||||
);
|
);
|
||||||
|
|
@ -541,9 +536,6 @@ export default {
|
||||||
getImageVifColorfromStore() {
|
getImageVifColorfromStore() {
|
||||||
return store.getters.vehicle.imageVifColor;
|
return store.getters.vehicle.imageVifColor;
|
||||||
},
|
},
|
||||||
getIsMobileStaticRecalibrationApplicable() {
|
|
||||||
return store.getters.vehicle.isMobileStaticRecalibrationApplicable;
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
|
|
||||||
components: {
|
components: {
|
||||||
|
|
|
||||||
|
|
@ -68,7 +68,6 @@ const getDefaultState = () => {
|
||||||
registration: {
|
registration: {
|
||||||
licensePlate: null,
|
licensePlate: null,
|
||||||
},
|
},
|
||||||
isMobileStaticRecalibrationApplicable: false,
|
|
||||||
},
|
},
|
||||||
serviceLocation: {
|
serviceLocation: {
|
||||||
address: null,
|
address: null,
|
||||||
|
|
@ -226,10 +225,6 @@ export const mutations = {
|
||||||
updateVehicleVin(state, vin) {
|
updateVehicleVin(state, vin) {
|
||||||
state.order.vehicle.vin = vin;
|
state.order.vehicle.vin = vin;
|
||||||
},
|
},
|
||||||
updateIsMobileStaticRecalibrationApplicable(state, isMobileStaticRecalibrationApplicable) {
|
|
||||||
state.order.vehicle.isMobileStaticRecalibrationApplicable =
|
|
||||||
isMobileStaticRecalibrationApplicable;
|
|
||||||
},
|
|
||||||
updateIsRepair(state, isRepair) {
|
updateIsRepair(state, isRepair) {
|
||||||
state.order.damage.isRepair = isRepair;
|
state.order.damage.isRepair = isRepair;
|
||||||
},
|
},
|
||||||
|
|
@ -361,8 +356,6 @@ export const mutations = {
|
||||||
state.order.vehicle.imageUrl = vehicleInfo.imageUrl;
|
state.order.vehicle.imageUrl = vehicleInfo.imageUrl;
|
||||||
state.order.vehicle.imageVifNumber = vehicleInfo.imageVifNumber;
|
state.order.vehicle.imageVifNumber = vehicleInfo.imageVifNumber;
|
||||||
state.order.vehicle.imageColor = vehicleInfo.imageVifColor;
|
state.order.vehicle.imageColor = vehicleInfo.imageVifColor;
|
||||||
state.order.vehicle.isMobileStaticRecalibrationApplicable =
|
|
||||||
vehicleInfo.isMobileStaticRecalibrationApplicable;
|
|
||||||
},
|
},
|
||||||
updateRegistration(state, registrationInfo) {
|
updateRegistration(state, registrationInfo) {
|
||||||
state.order.vehicle.registration.licensePlate = registrationInfo?.licensePlate;
|
state.order.vehicle.registration.licensePlate = registrationInfo?.licensePlate;
|
||||||
|
|
@ -555,7 +548,6 @@ export const mutations = {
|
||||||
state.order.vehicle.imageUrl = null;
|
state.order.vehicle.imageUrl = null;
|
||||||
state.order.vehicle.imageVifNumber = null;
|
state.order.vehicle.imageVifNumber = null;
|
||||||
state.order.vehicle.imageColor = null;
|
state.order.vehicle.imageColor = null;
|
||||||
state.order.vehicle.isMobileStaticRecalibrationApplicable = false;
|
|
||||||
},
|
},
|
||||||
resetDamageState(state) {
|
resetDamageState(state) {
|
||||||
state.order.damage.isRepair = null;
|
state.order.damage.isRepair = null;
|
||||||
|
|
@ -1701,8 +1693,6 @@ export const actions = {
|
||||||
const coverageStatus = coverageStatusEnum(order.payment?.insuranceCoverage?.coverageStatus);
|
const coverageStatus = coverageStatusEnum(order.payment?.insuranceCoverage?.coverageStatus);
|
||||||
const coverageType = coverageTypeEnum(order.payment?.insuranceCoverage?.coverageType);
|
const coverageType = coverageTypeEnum(order.payment?.insuranceCoverage?.coverageType);
|
||||||
const isItacOptimized = order.policy?.isItac ?? false;
|
const isItacOptimized = order.policy?.isItac ?? false;
|
||||||
const isMobileStaticRecalibrationApplicable =
|
|
||||||
order.vehicle?.isMobileStaticRecalibrationApplicable;
|
|
||||||
const zipCode =
|
const zipCode =
|
||||||
serviceZipCode ??
|
serviceZipCode ??
|
||||||
order.serviceLocation?.provider?.address?.zipCode ??
|
order.serviceLocation?.provider?.address?.zipCode ??
|
||||||
|
|
@ -1718,12 +1708,10 @@ export const actions = {
|
||||||
|
|
||||||
var endPoint = `${endpoints.GetMobileFeePart.url}/?serviceType=${serviceType}&facilityType=${facilityType}&parentAccountNumber=${parentAccountNumber}&billToAccountNumber=${billToAccountNumber}&providerNumber=${providerNumber}&isItacOptimized=${isItacOptimized}&zipCode=${zipCode}`;
|
var endPoint = `${endpoints.GetMobileFeePart.url}/?serviceType=${serviceType}&facilityType=${facilityType}&parentAccountNumber=${parentAccountNumber}&billToAccountNumber=${billToAccountNumber}&providerNumber=${providerNumber}&isItacOptimized=${isItacOptimized}&zipCode=${zipCode}`;
|
||||||
|
|
||||||
if (isMobileStaticRecalibrationApplicable) {
|
const recalPartNumber = getRecalPartNumber(order.lineItems?.glassParts[0]);
|
||||||
const recalPartNumber = getRecalPartNumber(order.lineItems?.glassParts[0]);
|
const carId = order.vehicle?.carId;
|
||||||
const carId = order.vehicle?.carId;
|
if (recalPartNumber && carId) {
|
||||||
if (recalPartNumber && carId) {
|
endPoint = `${endPoint}&partNumbers=${recalPartNumber}&carId=${carId}`;
|
||||||
endPoint = `${endPoint}&partNumbers=${recalPartNumber}&carId=${carId}`;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (coverageStatus) {
|
if (coverageStatus) {
|
||||||
|
|
@ -2326,18 +2314,7 @@ export const actions = {
|
||||||
// Vehicle
|
// Vehicle
|
||||||
saveVehicle(
|
saveVehicle(
|
||||||
context,
|
context,
|
||||||
{
|
{ year, make, model, style, carId, category, imageUrl, imageVifNumber, imageVifColor }
|
||||||
year,
|
|
||||||
make,
|
|
||||||
model,
|
|
||||||
style,
|
|
||||||
carId,
|
|
||||||
category,
|
|
||||||
imageUrl,
|
|
||||||
imageVifNumber,
|
|
||||||
imageVifColor,
|
|
||||||
isMobileStaticRecalibrationApplicable,
|
|
||||||
}
|
|
||||||
) {
|
) {
|
||||||
if (
|
if (
|
||||||
context.state.order.vehicle.year != year ||
|
context.state.order.vehicle.year != year ||
|
||||||
|
|
@ -2358,10 +2335,6 @@ export const actions = {
|
||||||
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);
|
||||||
context.commit(
|
|
||||||
storeMutations.UPDATE_VEHICLE_MOBILE_STATIC_RECALIBRATION_APPLICABLE,
|
|
||||||
isMobileStaticRecalibrationApplicable
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue