Merge branch 'develop' into defect/digital/SSR-1205
# Conflicts: # src/iss-components/cart-dropdown/cart-dropdown.vue
This commit is contained in:
commit
0b3511b3aa
8 changed files with 199 additions and 178 deletions
|
|
@ -32,7 +32,8 @@
|
|||
:allowPageInteraction="true" />
|
||||
<div
|
||||
v-else
|
||||
id="availabilityIndicator">
|
||||
id="availabilityIndicator"
|
||||
class="d-flex align-items-center">
|
||||
<div
|
||||
id="availabilityBadge"
|
||||
class="availability-badge"
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@
|
|||
class="subheader-secondary d-flex align-items-center overflow-hidden"
|
||||
:class="[justifySubheader, subHeaderClasses]">
|
||||
<p
|
||||
class="fw-normal mb-0"
|
||||
class="fw-normal"
|
||||
:class="[alternateFormatting, subTextClasses]">
|
||||
<span v-html="subText"> </span>
|
||||
</p>
|
||||
|
|
@ -33,7 +33,7 @@ import {
|
|||
splitCopyOnCMSPlaceHolder,
|
||||
getRouterLinkRouteFromCopy,
|
||||
getRouterLinkDisplayTextFromCopy,
|
||||
getRouterLinkHtmlStringFromCopy,
|
||||
getRouterLinkHtmlStringFromCopy
|
||||
} from '@/helpers/cms-content-helper';
|
||||
|
||||
import { stripRteStyle } from '@/helpers/text-helper';
|
||||
|
|
@ -51,7 +51,7 @@ export default {
|
|||
stripRteStyle: Boolean,
|
||||
subContentProperty: String,
|
||||
subHeaderClasses: String,
|
||||
subTextClasses: String,
|
||||
subTextClasses: String
|
||||
},
|
||||
emits: ['click-event'],
|
||||
computed: {
|
||||
|
|
@ -103,10 +103,10 @@ export default {
|
|||
alternateFormatting() {
|
||||
// override for service-packages unique style
|
||||
if (this.issContainingPage?.toLowerCase() === 'service-packages') {
|
||||
return 'service-packages-subtext mt-4 mb-4 px-5';
|
||||
return 'service-packages-subtext my-4';
|
||||
}
|
||||
return this.darkGraySubText ? 'dark-gray' : 'light-gray';
|
||||
},
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
doesCopyContainRouterLink,
|
||||
|
|
@ -116,8 +116,8 @@ export default {
|
|||
getRouterLinkHtmlStringFromCopy,
|
||||
clickEvent() {
|
||||
this.$emit('click-event');
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
|
|
|
|||
|
|
@ -72,7 +72,10 @@ const initialStore = {
|
|||
},
|
||||
payment: {
|
||||
isInsurance: true,
|
||||
isPayInAdvance: false
|
||||
isPayInAdvance: false,
|
||||
insuranceCoverage: {
|
||||
isVerified: true
|
||||
}
|
||||
},
|
||||
contactInfo: {
|
||||
firstName: 'Test',
|
||||
|
|
@ -108,7 +111,10 @@ const sessionStorage = {
|
|||
}
|
||||
},
|
||||
payment: {
|
||||
isPayInAdvance: false
|
||||
isPayInAdvance: false,
|
||||
insuranceCoverage: {
|
||||
isVerified: true
|
||||
}
|
||||
},
|
||||
lineItems: {
|
||||
vaps: []
|
||||
|
|
@ -315,7 +321,10 @@ describe('OrderConfirmation.vue', () => {
|
|||
appointmentType: 'Mobile'
|
||||
},
|
||||
payment: {
|
||||
isPayInAdvance: false
|
||||
isPayInAdvance: false,
|
||||
insuranceCoverage: {
|
||||
isVerified: true
|
||||
}
|
||||
},
|
||||
lineItems: {
|
||||
vaps: []
|
||||
|
|
@ -354,7 +363,10 @@ describe('OrderConfirmation.vue', () => {
|
|||
}
|
||||
},
|
||||
payment: {
|
||||
isPayInAdvance: false
|
||||
isPayInAdvance: false,
|
||||
insuranceCoverage: {
|
||||
isVerified: true
|
||||
}
|
||||
},
|
||||
lineItems: {
|
||||
vaps: []
|
||||
|
|
@ -401,7 +413,10 @@ describe('OrderConfirmation.vue', () => {
|
|||
appointmentType: 'Mobile'
|
||||
},
|
||||
payment: {
|
||||
isPayInAdvance: false
|
||||
isPayInAdvance: false,
|
||||
insuranceCoverage: {
|
||||
isVerified: true
|
||||
}
|
||||
},
|
||||
lineItems: {
|
||||
vaps: []
|
||||
|
|
@ -440,7 +455,10 @@ describe('OrderConfirmation.vue', () => {
|
|||
appointmentType: 'Dropoff'
|
||||
},
|
||||
payment: {
|
||||
isPayInAdvance: false
|
||||
isPayInAdvance: false,
|
||||
insuranceCoverage: {
|
||||
isVerified: true
|
||||
}
|
||||
},
|
||||
lineItems: {
|
||||
vaps: []
|
||||
|
|
@ -479,7 +497,10 @@ describe('OrderConfirmation.vue', () => {
|
|||
appointmentType: 'Inshop'
|
||||
},
|
||||
payment: {
|
||||
isPayInAdvance: false
|
||||
isPayInAdvance: false,
|
||||
insuranceCoverage: {
|
||||
isVerified: true
|
||||
}
|
||||
},
|
||||
lineItems: {
|
||||
vaps: []
|
||||
|
|
@ -515,7 +536,10 @@ describe('OrderConfirmation.vue', () => {
|
|||
appointmentType: 'Mobile'
|
||||
},
|
||||
payment: {
|
||||
isPayInAdvance: false
|
||||
isPayInAdvance: false,
|
||||
insuranceCoverage: {
|
||||
isVerified: true
|
||||
}
|
||||
},
|
||||
lineItems: {
|
||||
vaps: []
|
||||
|
|
@ -554,7 +578,10 @@ describe('OrderConfirmation.vue', () => {
|
|||
appointmentType: 'Inshop'
|
||||
},
|
||||
payment: {
|
||||
isPayInAdvance: false
|
||||
isPayInAdvance: false,
|
||||
insuranceCoverage: {
|
||||
isVerified: true
|
||||
}
|
||||
},
|
||||
lineItems: {
|
||||
vaps: []
|
||||
|
|
@ -590,7 +617,10 @@ describe('OrderConfirmation.vue', () => {
|
|||
appointmentType: 'Mobile'
|
||||
},
|
||||
payment: {
|
||||
isPayInAdvance: false
|
||||
isPayInAdvance: false,
|
||||
insuranceCoverage: {
|
||||
isVerified: true
|
||||
}
|
||||
},
|
||||
lineItems: {
|
||||
vaps: []
|
||||
|
|
@ -629,7 +659,10 @@ describe('OrderConfirmation.vue', () => {
|
|||
appointmentType: 'Dropoff'
|
||||
},
|
||||
payment: {
|
||||
isPayInAdvance: false
|
||||
isPayInAdvance: false,
|
||||
insuranceCoverage: {
|
||||
isVerified: true
|
||||
}
|
||||
},
|
||||
lineItems: {
|
||||
vaps: []
|
||||
|
|
@ -669,7 +702,10 @@ describe('OrderConfirmation.vue', () => {
|
|||
appointmentType: 'Inshop'
|
||||
},
|
||||
payment: {
|
||||
isPayInAdvance: false
|
||||
isPayInAdvance: false,
|
||||
insuranceCoverage: {
|
||||
isVerified: true
|
||||
}
|
||||
},
|
||||
lineItems: {
|
||||
vaps: []
|
||||
|
|
|
|||
|
|
@ -90,16 +90,16 @@ import {
|
|||
AppointmentTypeStrings,
|
||||
GET_MOBILE_TIME_SLOTS,
|
||||
GET_SHOP_TIME_SLOTS,
|
||||
PREMIUM_FEE_PART_TYPE,
|
||||
PREMIUM_FEE_PART_TYPE
|
||||
} from '@/constants/schedule-constants.js';
|
||||
import {
|
||||
fetchCmsContentForPage,
|
||||
splitCopyOnCMSPlaceHolder,
|
||||
splitCopyOnCMSPlaceHolder
|
||||
} from '@/helpers/cms-content-helper';
|
||||
import {
|
||||
calcDaysBetweenDates,
|
||||
convertDateStringToDate,
|
||||
sumDateString,
|
||||
sumDateString
|
||||
} from '@/helpers/date-helper';
|
||||
import settleAllPromises from '@/helpers/layout-helper';
|
||||
import { Form, defineRule } from 'vee-validate';
|
||||
|
|
@ -156,16 +156,16 @@ const getAvailableDates = async (
|
|||
}
|
||||
|
||||
if (
|
||||
appointmentType === AppointmentTypeStrings.MOBILE ||
|
||||
appointmentType ===
|
||||
AppointmentTypeStrings.MOBILE_NOT_ITAC_AND_NOT_NOCOMP
|
||||
appointmentType === AppointmentTypeStrings.MOBILE
|
||||
|| appointmentType
|
||||
=== AppointmentTypeStrings.MOBILE_NOT_ITAC_AND_NOT_NOCOMP
|
||||
) {
|
||||
storeActionConfig = {
|
||||
storeAction: GET_MOBILE_TIME_SLOTS,
|
||||
payload: {
|
||||
startDate: apiStartDate,
|
||||
endDate: apiEndDate,
|
||||
},
|
||||
endDate: apiEndDate
|
||||
}
|
||||
};
|
||||
} else {
|
||||
storeActionConfig = {
|
||||
|
|
@ -174,16 +174,15 @@ const getAvailableDates = async (
|
|||
startDate: apiStartDate,
|
||||
endDate: apiEndDate,
|
||||
shopAppointmentType: appointmentType,
|
||||
providerNumber,
|
||||
},
|
||||
providerNumber
|
||||
}
|
||||
};
|
||||
}
|
||||
if (apiStartDate < apiEndDate)
|
||||
storeActionConfigs.push(storeActionConfig);
|
||||
if (apiStartDate < apiEndDate) storeActionConfigs.push(storeActionConfig);
|
||||
}
|
||||
|
||||
const timeSlotsResponsesData = {
|
||||
days: [],
|
||||
days: []
|
||||
};
|
||||
|
||||
function compareDayStrings(a, b) {
|
||||
|
|
@ -193,33 +192,31 @@ const getAvailableDates = async (
|
|||
}
|
||||
|
||||
const makeParallelCalls = async () => {
|
||||
await Promise.all(
|
||||
storeActionConfigs.map(async (storeAction) => {
|
||||
let timeSlotsResponse = null;
|
||||
if (storeAction.storeAction === GET_SHOP_TIME_SLOTS) {
|
||||
timeSlotsResponse = await useMainStore().getShopTimeSlots(
|
||||
storeAction.payload.startDate,
|
||||
storeAction.payload.endDate,
|
||||
storeAction.payload.shopAppointmentType,
|
||||
storeAction.payload.providerNumber
|
||||
);
|
||||
} else {
|
||||
timeSlotsResponse = await useMainStore().getMobileTimeSlots(
|
||||
storeAction.payload.startDate,
|
||||
storeAction.payload.endDate
|
||||
);
|
||||
}
|
||||
await Promise.all(storeActionConfigs.map(async (storeAction) => {
|
||||
let timeSlotsResponse = null;
|
||||
if (storeAction.storeAction === GET_SHOP_TIME_SLOTS) {
|
||||
timeSlotsResponse = await useMainStore().getShopTimeSlots(
|
||||
storeAction.payload.startDate,
|
||||
storeAction.payload.endDate,
|
||||
storeAction.payload.shopAppointmentType,
|
||||
storeAction.payload.providerNumber
|
||||
);
|
||||
} else {
|
||||
timeSlotsResponse = await useMainStore().getMobileTimeSlots(
|
||||
storeAction.payload.startDate,
|
||||
storeAction.payload.endDate
|
||||
);
|
||||
}
|
||||
|
||||
timeSlotsResponsesData.estimatedServiceMinutesMinimum =
|
||||
timeSlotsResponsesData.estimatedServiceMinutesMinimum =
|
||||
timeSlotsResponse.data.estimatedServiceMinutesMinimum;
|
||||
timeSlotsResponsesData.estimatedServiceMinutesMaximum =
|
||||
timeSlotsResponsesData.estimatedServiceMinutesMaximum =
|
||||
timeSlotsResponse.data.estimatedServiceMinutesMaximum;
|
||||
timeSlotsResponsesData.days = [
|
||||
...timeSlotsResponsesData.days,
|
||||
...timeSlotsResponse.data.days,
|
||||
];
|
||||
})
|
||||
);
|
||||
timeSlotsResponsesData.days = [
|
||||
...timeSlotsResponsesData.days,
|
||||
...timeSlotsResponse.data.days
|
||||
];
|
||||
}));
|
||||
};
|
||||
|
||||
return makeParallelCalls().then(() => {
|
||||
|
|
@ -240,7 +237,7 @@ export default {
|
|||
siteFooter,
|
||||
textBlock,
|
||||
// eslint-disable-next-line vue/no-reserved-component-names
|
||||
Form,
|
||||
Form
|
||||
},
|
||||
mixins: [BaseFormMixin],
|
||||
async beforeRouteEnter(to, from, next) {
|
||||
|
|
@ -257,7 +254,7 @@ export default {
|
|||
selectableDatesSetting: 'custom',
|
||||
initialViewRowsToShow: 5,
|
||||
customSelectableDatesCallback: getAvailableDates,
|
||||
preSelectedDate,
|
||||
preSelectedDate
|
||||
});
|
||||
|
||||
const premiumFeePromise = useMainStore().getMobilePremiumFee();
|
||||
|
|
@ -278,29 +275,27 @@ export default {
|
|||
const promiseResultMap = [
|
||||
{
|
||||
resultKey: 'cmsContent',
|
||||
promise: cmsContentPromise,
|
||||
promise: cmsContentPromise
|
||||
},
|
||||
{
|
||||
resultKey: 'alertReasons',
|
||||
promise: alertReasonsPromise,
|
||||
promise: alertReasonsPromise
|
||||
},
|
||||
{
|
||||
resultKey: 'datePickerInitialData',
|
||||
promise: datePickerInitialDataPromise,
|
||||
promise: datePickerInitialDataPromise
|
||||
},
|
||||
{
|
||||
resultKey: 'premiumFeeWithPrice',
|
||||
promise: premiumFeeWithPricePromise,
|
||||
},
|
||||
promise: premiumFeeWithPricePromise
|
||||
}
|
||||
];
|
||||
|
||||
// use resultMap to populate layout content.
|
||||
const resultMap = await settleAllPromises(promiseResultMap);
|
||||
next((vm) => {
|
||||
vm.setCmsContent(resultMap.cmsContent);
|
||||
vm.$refs.datePicker.initializeComponent(
|
||||
resultMap.datePickerInitialData
|
||||
);
|
||||
vm.$refs.datePicker.initializeComponent(resultMap.datePickerInitialData);
|
||||
vm.$refs.locationAlerts.initializeComponent(resultMap.alertReasons);
|
||||
vm.setData(
|
||||
resultMap.datePickerInitialData.initialShopTimeSlotsResponse,
|
||||
|
|
@ -318,7 +313,7 @@ export default {
|
|||
selectedDate: this.getSelectedDate(),
|
||||
selectedTimeSlotInfo: this.getSelectedTimeSlotInfo(),
|
||||
selectableDatesData: [],
|
||||
mobilePremiumAppointmentFee: null,
|
||||
mobilePremiumAppointmentFee: null
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
|
|
@ -336,13 +331,11 @@ export default {
|
|||
return null;
|
||||
}
|
||||
|
||||
return this.selectableDatesData.days?.find(
|
||||
(selectableDate) => selectableDate.date === this.selectedDate
|
||||
);
|
||||
return this.selectableDatesData.days?.find((selectableDate) => selectableDate.date === this.selectedDate);
|
||||
},
|
||||
supportingItems() {
|
||||
return useMainStore().lineItems.supportingItems;
|
||||
},
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
selectedDate(newValue, oldValue) {
|
||||
|
|
@ -355,34 +348,34 @@ export default {
|
|||
startTime: null,
|
||||
endTime: null,
|
||||
jobMaxMinutes: null,
|
||||
jobMinMinutes: null,
|
||||
jobMinMinutes: null
|
||||
},
|
||||
isPremiumAppointment: null,
|
||||
isPremiumAppointment: null
|
||||
};
|
||||
}
|
||||
},
|
||||
selectedTimeSlotInfo(newValue) {
|
||||
this.updateFooterButtonText(newValue);
|
||||
},
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
splitCopyOnCMSPlaceHolder,
|
||||
arePagePrerequisitesValid() {
|
||||
const { serviceLocation } = useMainStore().order;
|
||||
const serviceLocationPreReqs =
|
||||
serviceLocation.zipCode &&
|
||||
serviceLocation.zipCodeCtu &&
|
||||
serviceLocation.appointmentType &&
|
||||
(serviceLocation.appointmentType ===
|
||||
AppointmentTypeStrings.MOBILE ||
|
||||
serviceLocation.appointmentType ===
|
||||
AppointmentTypeStrings.MOBILE_NOT_ITAC_AND_NOT_NOCOMP ||
|
||||
serviceLocation.provider.providerNumber);
|
||||
serviceLocation.zipCode
|
||||
&& serviceLocation.zipCodeCtu
|
||||
&& serviceLocation.appointmentType
|
||||
&& (serviceLocation.appointmentType
|
||||
=== AppointmentTypeStrings.MOBILE
|
||||
|| serviceLocation.appointmentType
|
||||
=== AppointmentTypeStrings.MOBILE_NOT_ITAC_AND_NOT_NOCOMP
|
||||
|| serviceLocation.provider.providerNumber);
|
||||
const supportingItems = this.supportingItems !== null;
|
||||
const damageInfo =
|
||||
useMainStore().order.damage.isRepair ||
|
||||
(useMainStore().order.lineItems?.glassParts != null &&
|
||||
useMainStore().order.lineItems.glassParts.length > 0);
|
||||
useMainStore().order.damage.isRepair
|
||||
|| (useMainStore().order.lineItems?.glassParts != null
|
||||
&& useMainStore().order.lineItems.glassParts.length > 0);
|
||||
|
||||
return serviceLocationPreReqs && supportingItems && damageInfo;
|
||||
},
|
||||
|
|
@ -417,15 +410,13 @@ export default {
|
|||
getSelectedTimeSlotInfo() {
|
||||
const isPremiumAppointment =
|
||||
!!(
|
||||
this.supportingItems?.filter(
|
||||
(lineItem) =>
|
||||
lineItem.partType === PREMIUM_FEE_PART_TYPE
|
||||
) ?? []
|
||||
this.supportingItems?.filter((lineItem) =>
|
||||
lineItem.partType === PREMIUM_FEE_PART_TYPE) ?? []
|
||||
).length > 0;
|
||||
|
||||
const selectedTimeSlotInfo = {
|
||||
timeSlot: this.mainStore.order.schedule,
|
||||
isPremiumAppointment,
|
||||
isPremiumAppointment
|
||||
};
|
||||
|
||||
return selectedTimeSlotInfo;
|
||||
|
|
@ -441,16 +432,12 @@ export default {
|
|||
if (!timeSlotInfo || !timeSlotInfo.timeSlot.date) {
|
||||
navbarButtonText = 'Continue';
|
||||
} else {
|
||||
navbarButtonText = `Select ${this.convertSelectedDateToShortMonthAndDay(
|
||||
timeSlotInfo.timeSlot.date
|
||||
)}`;
|
||||
navbarButtonText = `Select ${this.convertSelectedDateToShortMonthAndDay(timeSlotInfo.timeSlot.date)}`;
|
||||
if (this.appointmentType === AppointmentTypeStrings.IN_SHOP) {
|
||||
navbarButtonText += ` at ${this.getDisplayTextForMilitaryTime(
|
||||
timeSlotInfo.timeSlot.startTime
|
||||
)}`;
|
||||
navbarButtonText += ` at ${this.getDisplayTextForMilitaryTime(timeSlotInfo.timeSlot.startTime)}`;
|
||||
} else if (
|
||||
this.appointmentType === AppointmentTypeStrings.MOBILE &&
|
||||
!timeSlotInfo.isPremiumAppointment
|
||||
this.appointmentType === AppointmentTypeStrings.MOBILE
|
||||
&& !timeSlotInfo.isPremiumAppointment
|
||||
) {
|
||||
navbarButtonText += ` at ${this.getDisplayTextForMilitaryTime(
|
||||
timeSlotInfo.timeSlot.startTime,
|
||||
|
|
@ -468,7 +455,7 @@ export default {
|
|||
const dateObject = convertDateStringToDate(selectedDate);
|
||||
return dateObject.toLocaleDateString('en-us', {
|
||||
month: 'short',
|
||||
day: 'numeric',
|
||||
day: 'numeric'
|
||||
});
|
||||
},
|
||||
getDisplayTextForMilitaryTime(
|
||||
|
|
@ -496,8 +483,8 @@ export default {
|
|||
this.navigationScenarios.CLICKED_FORWARD,
|
||||
this.$route
|
||||
);
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
|
|
|
|||
|
|
@ -13,6 +13,7 @@
|
|||
<div class="row justify-content-center">
|
||||
<div class="col-md-6 col-xl-4">
|
||||
<siteSubHeader
|
||||
justification="left"
|
||||
cmsWidgetName="SiteSubHeaderWidget"
|
||||
issContainingPage="service-packages" />
|
||||
<servicePackageQuestion
|
||||
|
|
@ -34,7 +35,9 @@
|
|||
@ForwardClicked="forwardButtonAction" />
|
||||
</div>
|
||||
</div>
|
||||
<loadingModal ref="loadingModal" :textSlides="loadingText" />
|
||||
<loadingModal
|
||||
ref="loadingModal"
|
||||
:textSlides="loadingText" />
|
||||
<contentGroupModal
|
||||
ref="RainDefenseModal"
|
||||
cmsWidgetName="RainDefenseModal" />
|
||||
|
|
@ -44,7 +47,9 @@
|
|||
<contentGroupModal
|
||||
ref="RearWiperModal"
|
||||
cmsWidgetName="RearWiperModal" />
|
||||
<contentGroupModal ref="RecalModal" cmsWidgetName="RecalModal" />
|
||||
<contentGroupModal
|
||||
ref="RecalModal"
|
||||
cmsWidgetName="RecalModal" />
|
||||
</div>
|
||||
</Form>
|
||||
</template>
|
||||
|
|
@ -80,7 +85,7 @@ export default {
|
|||
Form,
|
||||
servicePackageQuestion,
|
||||
loadingModal,
|
||||
contentGroupModal,
|
||||
contentGroupModal
|
||||
},
|
||||
mixins: [baseFormMixin],
|
||||
async beforeRouteEnter(to, from, next) {
|
||||
|
|
@ -93,20 +98,20 @@ export default {
|
|||
const promiseResultMap = [
|
||||
{
|
||||
resultKey: 'cmsContent',
|
||||
promise: cmsContentPromise,
|
||||
promise: cmsContentPromise
|
||||
},
|
||||
{
|
||||
resultKey: 'wipers',
|
||||
promise: wipersPromise,
|
||||
promise: wipersPromise
|
||||
},
|
||||
{
|
||||
resultKey: 'rainDefense',
|
||||
promise: rainDefensePromise,
|
||||
promise: rainDefensePromise
|
||||
},
|
||||
{
|
||||
resultKey: 'supportingItems',
|
||||
promise: supportingItemsPromise,
|
||||
},
|
||||
promise: supportingItemsPromise
|
||||
}
|
||||
];
|
||||
const resultMap = await settleAllPromises(promiseResultMap);
|
||||
|
||||
|
|
@ -117,19 +122,17 @@ export default {
|
|||
resultMap.rainDefense,
|
||||
...resultMap.supportingItems,
|
||||
...resultMap.wipers,
|
||||
...clonedGlassParts,
|
||||
...clonedGlassParts
|
||||
];
|
||||
|
||||
let hasBailedOut = false;
|
||||
const pricingResults = await store
|
||||
.getPriceOrderItems(availableLineItems)
|
||||
.catch((err) => {
|
||||
useMainStore().setBailout(
|
||||
bailoutMessage.pricingResponseError(
|
||||
availableLineItems.map((li) => li.partNumber),
|
||||
{ code: err.code, message: err.message, data: err.data }
|
||||
)
|
||||
);
|
||||
useMainStore().setBailout(bailoutMessage.pricingResponseError(
|
||||
availableLineItems.map((li) => li.partNumber),
|
||||
{ code: err.code, message: err.message, data: err.data }
|
||||
));
|
||||
hasBailedOut = true;
|
||||
next(`/?issPage=${issPageValues.BAILOUT_PAGE}`);
|
||||
});
|
||||
|
|
@ -155,17 +158,17 @@ export default {
|
|||
'Looking for dates',
|
||||
'Searching for times',
|
||||
'Nearly there',
|
||||
'Finishing up',
|
||||
'Finishing up'
|
||||
],
|
||||
rules: {
|
||||
optionRequired: globalRules.OPTION_REQUIRED,
|
||||
},
|
||||
optionRequired: globalRules.OPTION_REQUIRED
|
||||
}
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
PriceDisclaimerText() {
|
||||
return this.getCmsContent('PriceDisclaimerWidget', 'Text');
|
||||
},
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
openModalAction(modalName) {
|
||||
|
|
@ -173,11 +176,11 @@ export default {
|
|||
},
|
||||
arePagePrerequisitesValid() {
|
||||
return (
|
||||
store.order.serviceLocation.zipCode &&
|
||||
store.order.serviceLocation.zipCodeCtu &&
|
||||
(store.order.damage.isRepair ||
|
||||
(store.order.lineItems?.glassParts != null &&
|
||||
store.order.lineItems.glassParts.length > 0))
|
||||
store.order.serviceLocation.zipCode
|
||||
&& store.order.serviceLocation.zipCodeCtu
|
||||
&& (store.order.damage.isRepair
|
||||
|| (store.order.lineItems?.glassParts != null
|
||||
&& store.order.lineItems.glassParts.length > 0))
|
||||
);
|
||||
},
|
||||
vapsItemsSelectedAction(vapsItemsSelected) {
|
||||
|
|
@ -187,12 +190,10 @@ export default {
|
|||
const parts = {
|
||||
glassParts: this.pricedGlassParts,
|
||||
supportingItems: this.supportingItems,
|
||||
vaps: this.selectedVaps,
|
||||
vaps: this.selectedVaps
|
||||
};
|
||||
if (!allGlassPartsAndItemsHavePrices(parts)) {
|
||||
window.console.error(
|
||||
'One or more items have no price assigned!'
|
||||
);
|
||||
window.console.error('One or more items have no price assigned!');
|
||||
}
|
||||
if (this.pricedGlassParts.length > 0) {
|
||||
store.updateGlassParts(this.pricedGlassParts);
|
||||
|
|
@ -204,8 +205,8 @@ export default {
|
|||
this.navigationScenarios.CLICKED_FORWARD,
|
||||
this.$route
|
||||
);
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
|
|
|
|||
|
|
@ -522,12 +522,6 @@ export default {
|
|||
flex: 0 auto;
|
||||
}
|
||||
}
|
||||
.damage-location-question {
|
||||
span {
|
||||
font-size: 1.25rem;
|
||||
font-weight: 400;
|
||||
}
|
||||
}
|
||||
.button-question,
|
||||
.windshield-damage-type-question,
|
||||
.damage-location-question {
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@
|
|||
</div>
|
||||
</div>
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-md-6 col-xl-4">
|
||||
<div class="col-md-6 col-xl-4 px-5">
|
||||
<siteSubHeader
|
||||
cmsWidgetName="SiteSubHeaderWidget"
|
||||
class="mt-4" />
|
||||
|
|
@ -24,7 +24,7 @@
|
|||
disableAutoFill
|
||||
:isDisabled="isPolicyHolderDisabled"
|
||||
:validationRules="rules.policyNumber"
|
||||
class="mb-3" />
|
||||
class="mt-5" />
|
||||
<textboxQuestion
|
||||
ref="policyZip"
|
||||
v-model="welcomePageModel.policyZipCode"
|
||||
|
|
@ -34,7 +34,7 @@
|
|||
mask="#####"
|
||||
:isDisabled="isPolicyZipDisabled"
|
||||
:validationRules="rules.policyZip"
|
||||
class="mb-3" />
|
||||
class="mt-3" />
|
||||
<textboxQuestion
|
||||
ref="dateOfLoss"
|
||||
v-model="welcomePageModel.dateOfLoss"
|
||||
|
|
@ -47,11 +47,11 @@
|
|||
:max="new Date().toJSON().slice(0, 10)"
|
||||
:min="'1972-12-01'"
|
||||
:validationRules="rules.lossDate"
|
||||
class="mb-3" />
|
||||
class="mt-3" />
|
||||
<textBlock
|
||||
cmsWidgetName="DamageDateEstimateWidget"
|
||||
typeStyle="small"
|
||||
class="mb-3" />
|
||||
class="mt-2" />
|
||||
<dropdownQuestion
|
||||
id="welcomeDropdown"
|
||||
ref="damageCause"
|
||||
|
|
@ -62,7 +62,7 @@
|
|||
disableAutoFill
|
||||
:validationRules="rules.damageOption"
|
||||
placeHolderText="Select an option"
|
||||
class="mb-3" />
|
||||
class="mt-3" />
|
||||
<textboxQuestion
|
||||
ref="phoneNumber"
|
||||
v-model="welcomePageModel.phoneNumber"
|
||||
|
|
@ -72,7 +72,7 @@
|
|||
isRequired
|
||||
:mask="phoneMask"
|
||||
disableAutoFill
|
||||
class="mb-3" />
|
||||
class="mt-3" />
|
||||
<textboxQuestion
|
||||
ref="email"
|
||||
v-model="welcomePageModel.email"
|
||||
|
|
@ -81,12 +81,12 @@
|
|||
:validationRules="rules.email"
|
||||
isRequired
|
||||
disableAutoFill
|
||||
class="mb-3" />
|
||||
class="mt-3" />
|
||||
<textboxQuestion
|
||||
v-if="displayDamageCityQuestion"
|
||||
ref="damageCity"
|
||||
v-model="welcomePageModel.damageCity"
|
||||
class="mb-3"
|
||||
class="mt-3"
|
||||
inputId="damageCityField"
|
||||
cmsWidgetName="DamageCityQuestion"
|
||||
isRequired
|
||||
|
|
@ -97,7 +97,7 @@
|
|||
id="welcomeDropdown"
|
||||
ref="state"
|
||||
v-model="welcomePageModel.damageState"
|
||||
class="mb-3"
|
||||
class="mt-3"
|
||||
cmsWidgetName="DamageStateQuestion"
|
||||
inputId="8fdf9dc2e13e430eb57529499dceb3eb"
|
||||
:options="getStates"
|
||||
|
|
@ -109,7 +109,7 @@
|
|||
v-if="displayGlassOnlyQuestion"
|
||||
ref="glassOnlyDamage"
|
||||
v-model="welcomePageModel.isDamageGlassOnly"
|
||||
class="px-0 mt-4"
|
||||
class="px-0 mt-3"
|
||||
cmsWidgetName="GlassOnlyQuestion"
|
||||
inputId="isDamageGlassOnly"
|
||||
:answers="DamageGlassOnlyOptions"
|
||||
|
|
@ -120,7 +120,9 @@
|
|||
isRequired
|
||||
isSmallQuestionLabelText
|
||||
disableAutoFill />
|
||||
<div id="welcomeFooter" class="row">
|
||||
<div
|
||||
id="welcomeFooter"
|
||||
class="row">
|
||||
<alert
|
||||
v-if="displayInvalidZipAlert"
|
||||
ref="alertInvalidZip"
|
||||
|
|
@ -138,7 +140,7 @@
|
|||
</div>
|
||||
</div>
|
||||
<!-- Footer image component must have parent (usually container-fluid)
|
||||
set to display: flex and height 100dvh or height 100% -->
|
||||
set to display: flex and height 100dvh or height 100% -->
|
||||
<footerImage />
|
||||
</div>
|
||||
</Form>
|
||||
|
|
@ -161,7 +163,7 @@ import footerImage from '@/iss-components/site-footer/footer-image/footer-image.
|
|||
import {
|
||||
fetchCmsContentForPage,
|
||||
fetchGlobalCmsContent,
|
||||
updateCmsSiteHeader,
|
||||
updateCmsSiteHeader
|
||||
} from '@/helpers/cms-content-helper';
|
||||
import settleAllPromises from '@/helpers/layout-helper';
|
||||
import { required } from '@/helpers/validation-rules';
|
||||
|
|
@ -194,7 +196,7 @@ export default {
|
|||
siteFooter,
|
||||
textBlock,
|
||||
// eslint-disable-next-line vue/no-reserved-component-names
|
||||
Form,
|
||||
Form
|
||||
},
|
||||
mixins: [BaseFormMixin],
|
||||
async beforeRouteEnter(to, from, next) {
|
||||
|
|
@ -207,12 +209,12 @@ export default {
|
|||
const promiseResultMap = [
|
||||
{
|
||||
resultKey: 'cmsContent',
|
||||
promise: cmsContentPromise,
|
||||
promise: cmsContentPromise
|
||||
},
|
||||
{
|
||||
resultKey: 'globalSiteHeaderCmsContent',
|
||||
promise: cmsGlobalSiteHeaderContentPromise,
|
||||
},
|
||||
promise: cmsGlobalSiteHeaderContentPromise
|
||||
}
|
||||
];
|
||||
|
||||
// use resultMap to populate layout content.
|
||||
|
|
@ -244,8 +246,8 @@ export default {
|
|||
lossState: `${globalRules.DATE_OF_LOSS_STATE_REQUIRED}`,
|
||||
policyNumber: `${globalRules.POLICY_NUMBER_REQUIRED}|${globalRules.POLICY_NUMBER_FORMAT}`,
|
||||
policyZip: `${globalRules.POLICY_ZIP_REQUIRED}|${globalRules.POLICY_ZIP_FORMAT}`,
|
||||
phoneNumber: `${globalRules.PHONE_NUMBER_REQUIRED}|${globalRules.PHONE_NUMBER_FORMAT}`,
|
||||
},
|
||||
phoneNumber: `${globalRules.PHONE_NUMBER_REQUIRED}|${globalRules.PHONE_NUMBER_FORMAT}`
|
||||
}
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
|
|
@ -300,7 +302,7 @@ export default {
|
|||
},
|
||||
phoneMask() {
|
||||
return MaskaFormattedMasks.PHONE_NUMBER;
|
||||
},
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async forwardButtonAction() {
|
||||
|
|
@ -335,8 +337,8 @@ export default {
|
|||
)
|
||||
.finally(async () => {
|
||||
if (
|
||||
this.isCoverageEnabled &&
|
||||
!this.maxCoverageLookupAttemptsReached
|
||||
this.isCoverageEnabled
|
||||
&& !this.maxCoverageLookupAttemptsReached
|
||||
) {
|
||||
await this.mainStore
|
||||
.getCoveragePolicyInfo()
|
||||
|
|
@ -362,29 +364,24 @@ export default {
|
|||
providerNumber: providerNumber.toString(),
|
||||
billToSelectionCriteria: {
|
||||
typeOfClaim: 'GLASS ONLY',
|
||||
lineOfBusiness: 'PERSONAL',
|
||||
},
|
||||
lineOfBusiness: 'PERSONAL'
|
||||
}
|
||||
};
|
||||
|
||||
const response = await globalMethods.callHttpClient({
|
||||
method: endpoints.GetBillToInfo.method,
|
||||
endpoint: endpoints.GetBillToInfo.url,
|
||||
payload,
|
||||
payload
|
||||
});
|
||||
|
||||
return response.data;
|
||||
} catch (err) {
|
||||
console.error(
|
||||
`Error Status Code: ${err.data?.status}: ${err.data?.title}`
|
||||
);
|
||||
console.error(`Error Status Code: ${err.data?.status}: ${err.data?.title}`);
|
||||
return null;
|
||||
}
|
||||
},
|
||||
navigateForward() {
|
||||
if (
|
||||
this.mainStore.applicationUser.duplicateOrders?.length > 0 ??
|
||||
false
|
||||
) {
|
||||
if (this.mainStore.applicationUser.duplicateOrders?.length > 0 ?? false) {
|
||||
this.$router.navigate(
|
||||
this.navigationScenarios.CLICKED_FORWARD_WITH_DUPLICATES,
|
||||
this.$route,
|
||||
|
|
@ -429,15 +426,13 @@ export default {
|
|||
damageCause: this.mainStore.order.policy.damageCause,
|
||||
damageState: this.mainStore.order.policy.damageState,
|
||||
damageCity: this.mainStore.order.policy.damageCity,
|
||||
isDamageGlassOnly:
|
||||
this.mainStore.order.policy.isDamageGlassOnly,
|
||||
isDamageGlassOnly: this.mainStore.order.policy.isDamageGlassOnly,
|
||||
phoneNumber: this.mainStore.order.contactInfo.homePhone,
|
||||
email: this.mainStore.order.customer.emailAddress,
|
||||
isPolicyNumberDisabled:
|
||||
this.mainStore.order.policy.isPolicyNumberDisabled,
|
||||
isPolicyNumberDisabled: this.mainStore.order.policy.isPolicyNumberDisabled
|
||||
};
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ export default {
|
|||
display: flex;
|
||||
|
||||
//Open an overlay to prevent page interaction
|
||||
&:before:not(.date-picker-hidden) {
|
||||
&:before {
|
||||
content: "";
|
||||
position: fixed;
|
||||
top: 0;
|
||||
|
|
@ -56,6 +56,13 @@ export default {
|
|||
z-index: 9999;
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
&.date-picker-hidden {
|
||||
&:before {
|
||||
content: none;
|
||||
}
|
||||
}
|
||||
|
||||
//Spinner basics
|
||||
&:after {
|
||||
content: "";
|
||||
|
|
|
|||
Loading…
Reference in a new issue