Merge branch 'develop' into SSR-1201-style-updates

This commit is contained in:
bmauger 2024-04-25 16:55:50 -04:00 committed by GitHub
commit 087c746735
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
13 changed files with 199 additions and 126 deletions

View file

@ -4,7 +4,7 @@ const experimentUniverses = Object.freeze({
const experimentSettings = Object.freeze({ const experimentSettings = Object.freeze({
GOOGLE_CUSTOM_DIMENSION_INDEX: 'Google Custom Dimension Index', GOOGLE_CUSTOM_DIMENSION_INDEX: 'Google Custom Dimension Index',
ISS_DISPLAY_PAY_IN_ADVANCE: 'ISSDisplayPIAInsurance_ISS' ISS_DISPLAY_PAY_IN_ADVANCE: 'DisplayPIAInsurance'
}); });
const experimentTriggers = Object.freeze({ const experimentTriggers = Object.freeze({

View file

@ -123,9 +123,7 @@ describe('cart-dropdown component', () => {
const storeData = { const storeData = {
order: { order: {
payment: { payment: {
insuranceCoverage: { insuranceCoverage: { isVerified: true }
coverageStatus: coverageStatuses.PENDING
}
}, },
policy: { policy: {
isITAC: false isITAC: false
@ -147,14 +145,18 @@ describe('cart-dropdown component', () => {
const initialData = { isExpanded }; const initialData = { isExpanded };
const storeData = { const storeData = {
order: { order: {
currentDeductible: 0,
lineItems: { },
payment: { payment: {
insuranceCoverage: { insuranceCoverage: { isVerified: true }
coverageStatus: coverageStatuses.PENDING
}
}, },
policy: { policy: {
isITAC: true isITAC: true,
policyLookupSuccessful: true
} }
},
issConfig: {
isClaimRegistrationRequired: true
} }
}; };
const { wrapper } = getMountedComponent(storeData, {}, initialData); const { wrapper } = getMountedComponent(storeData, {}, initialData);
@ -296,14 +298,18 @@ describe('cart-dropdown component', () => {
const initialData = { isExpanded }; const initialData = { isExpanded };
const storeData = { const storeData = {
order: { order: {
currentDeductible: 0,
lineItems: { },
payment: { payment: {
insuranceCoverage: { insuranceCoverage: { isVerified: true }
coverageStatus: coverageStatuses.PENDING
}
}, },
policy: { policy: {
isITAC: true isITAC: true,
policyLookupSuccessful: true
} }
},
issConfig: {
isClaimRegistrationRequired: true
} }
}; };
const { wrapper } = getMountedComponent(storeData, {}, initialData); const { wrapper } = getMountedComponent(storeData, {}, initialData);
@ -322,9 +328,7 @@ describe('cart-dropdown component', () => {
const storeData = { const storeData = {
order: { order: {
payment: { payment: {
insuranceCoverage: { insuranceCoverage: { isVerified: true }
coverageStatus: coverageStatuses.PENDING
}
}, },
policy: { policy: {
isITAC: false isITAC: false
@ -636,7 +640,9 @@ describe('cart-dropdown component', () => {
const storeData = { const storeData = {
order: { order: {
policy: { policy: {
policyLookupSuccessful: true policyLookupSuccessful: true,
noCoverage: false,
isITAC: false
}, },
currentDeductible: 250, currentDeductible: 250,
lineItems: { lineItems: {
@ -652,13 +658,7 @@ describe('cart-dropdown component', () => {
vaps: null vaps: null
}, },
payment: { payment: {
insuranceCoverage: { insuranceCoverage: { isVerified: true }
coverageStatus: coverageStatuses.VERIFIED
}
},
policy: {
noCoverage: false,
isITAC: false
} }
}, },
issConfig: { issConfig: {
@ -696,9 +696,7 @@ describe('cart-dropdown component', () => {
] ]
}, },
payment: { payment: {
insuranceCoverage: { insuranceCoverage: { isVerified: true }
coverageStatus: coverageStatuses.VERIFIED
}
} }
}, },
issConfig: { issConfig: {
@ -1761,12 +1759,12 @@ describe('cart-dropdown component', () => {
const storeData = { const storeData = {
order: { order: {
payment: { payment: {
insuranceCoverage: { insuranceCoverage: { isVerified: true }
coverageStatus: coverageStatuses.PENDING
}
}, },
policy: { policy: {
isITAC: true isITAC: true,
noCoverage: false,
policyLookupSuccessful: true
}, },
currentDeductible: 321 currentDeductible: 321
} }
@ -1782,15 +1780,22 @@ describe('cart-dropdown component', () => {
// Assert // Assert
expect(result).toBe(dollarAmount); expect(result).toBe(dollarAmount);
}); });
test('returns dollar amount when no comp', () => { test('returns dollar amount when no comp and enableNoCompQuotes true', () => {
// Arrange // Arrange
const storeData = { const storeData = {
order: { order: {
payment: {
insuranceCoverage: { isVerified: true }
},
policy: { policy: {
isITAC: false, isITAC: false,
noCoverage: true noCoverage: true,
policyLookupSuccessful: true
}, },
currentDeductible: 321 currentDeductible: 321
},
issConfig: {
enableNoCompQuote: true
} }
}; };
const { wrapper } = getMountedComponent(storeData); const { wrapper } = getMountedComponent(storeData);
@ -1804,21 +1809,46 @@ describe('cart-dropdown component', () => {
// Assert // Assert
expect(result).toBe(dollarAmount); expect(result).toBe(dollarAmount);
}); });
test('returns "Verifying Coverage" when no comp and enableNoCompQuotes false', () => {
// Arrange
const storeData = {
order: {
payment: {
insuranceCoverage: { isVerified: true }
},
policy: {
isITAC: false,
noCoverage: true,
policyLookupSuccessful: true
},
currentDeductible: 321
},
issConfig: {
enableNoCompQuote: false
}
};
const { wrapper } = getMountedComponent(storeData);
const amount = 123;
// Act
const result = wrapper.vm.getDisplayed(amount);
// Assert
expect(result).toBe(VERIFYING_COVERAGE);
});
test('returns dollar amount when deductible set, not itac, not no comp, and verified', () => { test('returns dollar amount when deductible set, not itac, not no comp, and verified', () => {
// Arrange // Arrange
const storeData = { const storeData = {
order: { order: {
policy: { policy: {
isITAC: false, isITAC: false,
isNoComp: false, noCoverage: false,
policyLookupSuccessful: true policyLookupSuccessful: true
}, },
currentDeductible: 321, currentDeductible: 321,
policyLookupSuccessful: true, policyLookupSuccessful: true,
payment: { payment: {
insuranceCoverage: { insuranceCoverage: { isVerified: true }
coverageStatus: coverageStatuses.VERIFIED
}
} }
} }
}; };

View file

@ -211,7 +211,8 @@ export default {
return this.submittedOrder ? this.submittedOrder.currentDeductible : useMainStore().order.currentDeductible; return this.submittedOrder ? this.submittedOrder.currentDeductible : useMainStore().order.currentDeductible;
}, },
showDeductibleCartItem() { showDeductibleCartItem() {
return !this.isNoComp && !this.isITAC; const { isUnverified } = useMainStore();
return isUnverified || (!this.isNoComp && !this.isITAC);
}, },
lineItems() { lineItems() {
return this.submittedOrder ? this.submittedOrder.lineItems : useMainStore().lineItems; return this.submittedOrder ? this.submittedOrder.lineItems : useMainStore().lineItems;
@ -232,19 +233,13 @@ export default {
baseServicePrice() { baseServicePrice() {
return getPriceOfLineItems(this.baseServiceLineItems) ?? 0; return getPriceOfLineItems(this.baseServiceLineItems) ?? 0;
}, },
isVerifiedCoverageStatus() {
return this.submittedOrder ? this.submittedOrder.payment.insuranceCoverage.isVerified : useMainStore().isVerifiedCoverageStatus;
},
isUnverified() {
return !this.isNoComp && !this.isITAC
&& (this.deductible == null || !this.isVerifiedCoverageStatus);
},
isITAC() { isITAC() {
return this.submittedOrder ? this.submittedOrder.policy.isITAC : useMainStore().isITAC; return this.submittedOrder ? this.submittedOrder.policy.isITAC : useMainStore().isITAC;
}, },
isNoComp() { isNoComp() {
return this.submittedOrder ? this.submittedOrder.policy.noCoverage : useMainStore().isNoComp; return this.submittedOrder ? this.submittedOrder.policy.noCoverage : useMainStore().isNoComp;
}, },
// TODO fix rounding
subTotal() { subTotal() {
const { supportingItems, glassParts, otherParts, vaps, mobileFee } = this.lineItems; const { supportingItems, glassParts, otherParts, vaps, mobileFee } = this.lineItems;
const allLineItems = [ const allLineItems = [
@ -270,13 +265,14 @@ export default {
return result; return result;
}, },
salesTax() { salesTax() {
const { isUnverified } = useMainStore();
function sumTax(lineItems) { function sumTax(lineItems) {
return lineItems?.reduce((accumulator, lineItem) => accumulator + (lineItem.salesTax ?? 0), 0) ?? 0; return lineItems?.reduce((accumulator, lineItem) => accumulator + (lineItem.salesTax ?? 0), 0) ?? 0;
} }
let result = 0; let result = 0;
if (!this.isUnverified) { if (!isUnverified) {
if (this.isITAC || this.isNoComp) { if (this.isITAC || this.isNoComp) {
result += sumTax(this.baseServiceLineItems); result += sumTax(this.baseServiceLineItems);
} else { } else {
@ -451,9 +447,8 @@ export default {
this.isExpanded = !this.isExpanded; this.isExpanded = !this.isExpanded;
}, },
getDisplayed(amount) { getDisplayed(amount) {
return this.isUnverified const { isUnverified } = useMainStore();
&& !this.isNoComp return isUnverified
&& !this.isITAC
? VERIFYING_COVERAGE ? VERIFYING_COVERAGE
: formatAmountInDollars(amount); : formatAmountInDollars(amount);
}, },

View file

@ -81,16 +81,14 @@ export default {
// load client customization overrides // load client customization overrides
const clientOverrideClass = this.mainStore.issConfig.styleSheet.trim(); const clientOverrideClass = this.mainStore.issConfig.styleSheet.trim();
if ( if (
clientOverrideClass && clientOverrideClass
clientOverrideClass !== '' && && clientOverrideClass !== ''
!document && !document
.getElementsByTagName('body')[0] .getElementsByTagName('body')[0]
.className.split(' ') .className.split(' ')
.includes(clientOverrideClass) .includes(clientOverrideClass)
) { ) {
document.getElementsByTagName( document.getElementsByTagName('body')[0].className += ` ${clientOverrideClass}`;
'body'
)[0].className += ` ${clientOverrideClass}`;
} }
}, },
methods: { methods: {
@ -100,18 +98,14 @@ export default {
'Answers' 'Answers'
); );
if ( if (
overrideCmsHeaderAnswers && overrideCmsHeaderAnswers
Array.isArray(overrideCmsHeaderAnswers) && Array.isArray(overrideCmsHeaderAnswers)
) { ) {
const { parentAccountNumber } = useMainStore().issConfig; const { parentAccountNumber } = useMainStore().issConfig;
let headerOverrideToUse = overrideCmsHeaderAnswers.find( let headerOverrideToUse = overrideCmsHeaderAnswers.find((answer) =>
(answer) => answer.AccountNumber === parentAccountNumber.toString());
answer.AccountNumber === parentAccountNumber.toString()
);
if (headerOverrideToUse == null) { if (headerOverrideToUse == null) {
headerOverrideToUse = overrideCmsHeaderAnswers.find( headerOverrideToUse = overrideCmsHeaderAnswers.find((answer) => answer.AccountNumber === '0');
(answer) => answer.AccountNumber === '0'
);
} }
if (headerOverrideToUse) { if (headerOverrideToUse) {

View file

@ -70,20 +70,22 @@
:cmsWidgetName="widget.notesQuestion" :cmsWidgetName="widget.notesQuestion"
maxLength="250" maxLength="250"
:inputRows="4" /> :inputRows="4" />
<p ref="disclaimerText" class="caption dark-gray mt-6"> <p
ref="disclaimerText"
class="caption dark-gray mt-6">
{{ textUpdateDisclaimerText }} I also agree to {{ textUpdateDisclaimerText }} I also agree to
Safelite's Safelite's
<textLink <textLink
ref="privacyPolicyLink" ref="privacyPolicyLink"
class="normal-line-height" class="normal-line-height"
linkType="text" linkType="newWindowLink"
text="Privacy Policy" text="Privacy Policy"
href="//www.safelite.com/privacy-center" /> href="//www.safelite.com/privacy-center" />
and and
<textLink <textLink
ref="termsOfUseLink" ref="termsOfUseLink"
class="normal-line-height" class="normal-line-height"
linkType="text" linkType="newWindowLink"
text="Terms of Use" text="Terms of Use"
href="//www.safelite.com/terms-of-use" />. href="//www.safelite.com/terms-of-use" />.
</p> </p>
@ -128,7 +130,7 @@ export default {
siteFooter, siteFooter,
// eslint-disable-next-line vue/no-reserved-component-names // eslint-disable-next-line vue/no-reserved-component-names
Form, Form,
textLink, textLink
}, },
mixins: [BaseFormMixin], mixins: [BaseFormMixin],
async beforeRouteEnter(to, from, next) { async beforeRouteEnter(to, from, next) {
@ -145,7 +147,7 @@ export default {
emailAddress, emailAddress,
servicePhone, servicePhone,
requestTextUpdates, requestTextUpdates,
notesForTechnician, notesForTechnician
} = useMainStore().contactInfo; } = useMainStore().contactInfo;
return { return {
firstName, firstName,
@ -164,14 +166,14 @@ export default {
requestTextUpdates: 'TextContentWidget', requestTextUpdates: 'TextContentWidget',
notesQuestion: 'NotesQuestionWidget', notesQuestion: 'NotesQuestionWidget',
disclaimer: 'TextUpdateDisclaimerWidget', disclaimer: 'TextUpdateDisclaimerWidget',
siteFooter: 'SiteFooterWidget', siteFooter: 'SiteFooterWidget'
}, },
rules: { rules: {
firstName: globalRules.FIRST_NAME_REQUIRED, firstName: globalRules.FIRST_NAME_REQUIRED,
lastName: globalRules.LAST_NAME_REQUIRED, lastName: globalRules.LAST_NAME_REQUIRED,
emailAddress: `${globalRules.EMAIL_ADDRESS_REQUIRED}|${globalRules.EMAIL_ADDRESS_FORMAT}`, emailAddress: `${globalRules.EMAIL_ADDRESS_REQUIRED}|${globalRules.EMAIL_ADDRESS_FORMAT}`,
phoneNumber: `${globalRules.PHONE_NUMBER_REQUIRED}|${globalRules.PHONE_NUMBER_FORMAT}`, phoneNumber: `${globalRules.PHONE_NUMBER_REQUIRED}|${globalRules.PHONE_NUMBER_FORMAT}`
}, }
}; };
}, },
computed: { computed: {
@ -192,7 +194,7 @@ export default {
}, },
phoneMask() { phoneMask() {
return MaskaFormattedMasks.PHONE_NUMBER; return MaskaFormattedMasks.PHONE_NUMBER;
}, }
}, },
methods: { methods: {
/** /**
@ -204,32 +206,32 @@ export default {
lastName: this.lastName, lastName: this.lastName,
emailAddress: this.emailAddress, emailAddress: this.emailAddress,
requestTextUpdates: this.requestTextUpdates, requestTextUpdates: this.requestTextUpdates,
notesForTechnician: this.notesForTechnician, notesForTechnician: this.notesForTechnician
}; };
useMainStore().updateContactInfo(contactInfo); useMainStore().updateContactInfo(contactInfo);
if (this.requestTextUpdates) { if (this.requestTextUpdates) {
useMainStore().updatePhoneNumbers({ useMainStore().updatePhoneNumbers({
service: this.phoneNumber, service: this.phoneNumber,
alternative: this.phoneNumber, alternative: this.phoneNumber
}); });
} else { } else {
useMainStore().updatePhoneNumbers({ useMainStore().updatePhoneNumbers({
home: this.phoneNumber, home: this.phoneNumber,
service: this.phoneNumber, service: this.phoneNumber
}); });
} }
const scenario = const scenario =
useMainStore().order.serviceLocation.IsSafeliteProvider === useMainStore().order.serviceLocation.IsSafeliteProvider
false === false
? this.navigationScenarios ? this.navigationScenarios
.CLICKED_FORWARD_WITH_NON_SAFELITE_SHOP .CLICKED_FORWARD_WITH_NON_SAFELITE_SHOP
: this.navigationScenarios : this.navigationScenarios
.CLICKED_FORWARD_WITH_SAFELITE_SHOP; .CLICKED_FORWARD_WITH_SAFELITE_SHOP;
this.$router.navigate(scenario, this.$route); this.$router.navigate(scenario, this.$route);
}, }
}, }
}; };
</script> </script>

View file

@ -774,8 +774,7 @@ describe('coverageStatement.vue-working', () => {
order: { order: {
payment: { payment: {
insuranceCoverage: { insuranceCoverage: {
claimNumber: null, claimNumber: null
isVerified: true // Added
} }
}, },
policy: { policy: {
@ -854,19 +853,6 @@ describe('coverageStatement.vue-working', () => {
// Assert // Assert
expect(result).toBeFalsy(); expect(result).toBeFalsy();
}); });
test('returns false when no comp', () => {
// Arrange
const mainInitialState = shouldRegisterClaimStoreStateItac;
mainInitialState.order.policy.noCoverage = true;
const { wrapper } = getMountedComponent(mainInitialState);
// Act
const result = wrapper.vm.shouldRegisterClaim;
// Assert
expect(result).toBeFalsy();
});
test('returns false when insuranceCoverage not verified', () => {});
describe('returns true when policy lookup success, vehicleId set to %p, claim reg req, claim not yet reg', () => { describe('returns true when policy lookup success, vehicleId set to %p, claim reg req, claim not yet reg', () => {
test('and itac', () => { test('and itac', () => {
// Arrange // Arrange

View file

@ -381,7 +381,6 @@ export default {
&& policyVehicleId >= 0 && policyVehicleId >= 0
&& isClaimRegistrationRequired && isClaimRegistrationRequired
&& !isClaimAlreadyRegistered && !isClaimAlreadyRegistered
&& !this.isNoCompQuoteVisible
); );
} }
}, },

View file

@ -10,6 +10,12 @@ import issPageValues from '@/router/router-constants/issPage-values';
import { paymentMethods } from '@/constants/payment-method-constants'; import { paymentMethods } from '@/constants/payment-method-constants';
import queryStrings from '@/constants/query-strings'; import queryStrings from '@/constants/query-strings';
import { experimentSettings } from '@/constants/experiments'; import { experimentSettings } from '@/constants/experiments';
import { submitWorkOrder } from '@/helpers/order-helper.js';
// Mock so it can be used as an assertion
jest.mock('@/helpers/order-helper.js', () => ({
submitWorkOrder: jest.fn()
}));
function setupMocks({ customMountOptions = {}, queryString }, mainInitialState = {}, customMixin = null) { function setupMocks({ customMountOptions = {}, queryString }, mainInitialState = {}, customMixin = null) {
const mountOptions = getMountOptions({ const mountOptions = getMountOptions({
@ -251,4 +257,25 @@ describe('payment-method.vue', () => {
expect(result).toBeTruthy(); expect(result).toBeTruthy();
}); });
}); });
describe('forwardButtonAction', () => {
test('Pay at the time of service is selected, should call saveWorkOrder', async () => {
// Arrange
const store = {
order: {
payment: {
isPayInAdvance: false,
payInAdvanceType: null
}
}
};
const wrapper = setupMocks({}, store);
// Act
await wrapper.vm.forwardButtonAction();
// Assert
expect(submitWorkOrder).toHaveBeenCalledTimes(1);
});
});
}); });

View file

@ -88,6 +88,8 @@ import issPageValues from '@/router/router-constants/issPage-values';
import bailoutMessage from '@/constants/bailoutMessage'; import bailoutMessage from '@/constants/bailoutMessage';
import { AppointmentTypeStrings } from '@/constants/schedule-constants'; import { AppointmentTypeStrings } from '@/constants/schedule-constants';
import VehicleBanner from '@/iss-components/vehicle-banner/vehicle-banner.vue'; import VehicleBanner from '@/iss-components/vehicle-banner/vehicle-banner.vue';
import { submitWorkOrder } from '@/helpers/order-helper.js';
import { experimentSettings } from '@/constants/experiments';
export default { export default {
name: 'payment-method', name: 'payment-method',
@ -182,7 +184,10 @@ export default {
return this.$route.query[queryStrings.DISPLAY_PAY_IN_ADVANCE_ALERT]; return this.$route.query[queryStrings.DISPLAY_PAY_IN_ADVANCE_ALERT];
}, },
isPayInAdvanceDisabled() { isPayInAdvanceDisabled() {
return useMainStore().isUnverified; const piaExperience = this.getSettingValue(experimentSettings.ISS_DISPLAY_PAY_IN_ADVANCE);
const isEnabled = piaExperience === 'true';
return !isEnabled || useMainStore().isUnverified;
}, },
paymentMethod() { paymentMethod() {
return this.paymentMethodInternalModel; return this.paymentMethodInternalModel;
@ -296,10 +301,21 @@ export default {
await useMainStore().savePaymentMethodChoice(this.paymentMethod); await useMainStore().savePaymentMethodChoice(this.paymentMethod);
if (this.paymentMethod === paymentMethods.PAY_AT_TIME_OF_SERVICE) { if (this.paymentMethod === paymentMethods.PAY_AT_TIME_OF_SERVICE) {
this.$router.navigate( try {
this.navigationScenarios.CLICKED_FORWARD, await submitWorkOrder({
this.$route pageNameToLog: 'payment-method',
); submitAfterSave: true
});
useMainStore().resetSubmittedOrder();
this.$router.navigate(
this.navigationScenarios.CLICKED_FORWARD,
this.$route
);
} catch (error) {
console.error(`error: response from submit work order:${error.message}`);
}
} else { } else {
this.$router.navigate( this.$router.navigate(
this.navigationScenarios.CLICKED_PAY_NOW, this.navigationScenarios.CLICKED_PAY_NOW,

View file

@ -29,7 +29,8 @@ export default {
]; ];
}, },
addressInfo() { addressInfo() {
if (this.serviceLocation?.appointmentType === AppointmentTypeStrings.MOBILE) { if (this.serviceLocation?.appointmentType === AppointmentTypeStrings.MOBILE
|| this.serviceLocation?.appointmentType === AppointmentTypeStrings.MOBILE_NOT_ITAC_AND_NOT_NOCOMP) {
return { return {
address: this.serviceLocation?.address, address: this.serviceLocation?.address,
address2: this.serviceLocation?.address2 ?? '', address2: this.serviceLocation?.address2 ?? '',

View file

@ -20,6 +20,7 @@ function setupMocks({ experimentSettings }) {
const mockExperimentData = [ const mockExperimentData = [
{ {
settings: experimentSettings ?? testExperimentSettings, settings: experimentSettings ?? testExperimentSettings,
isActive: true,
variationName: 'test', variationName: 'test',
universeName: 'testUniverse' universeName: 'testUniverse'
} }

View file

@ -375,29 +375,31 @@ export const useMainStore = defineStore({
}; };
}, },
experimentOrder: (state) => ({ experimentOrder: (state) => ({
issVehicleYear: state.order.vehicle.year, funnelVehicleYear: state.order.vehicle.year,
issVehicleMake: state.order.vehicle.make, funnelVehicleMake: state.order.vehicle.make,
issVehicleModel: state.order.vehicle.model, funnelVehicleModel: state.order.vehicle.model,
issVehicleStyle: state.order.vehicle.style, funnelVehicleStyle: state.order.vehicle.style,
issIsRepair: state.order.damage.isRepair, funnelIsRepair: state.order.damage.isRepair,
issNumberOfChips: state.order.damage.numberOfChips, funnelNumberOfChips: state.order.damage.numberOfChips,
issCarId: state.order.vehicle.carId, funnelCarId: state.order.vehicle.carId,
issServiceCity: state.order.serviceLocation.city, funnelServiceCity: state.order.serviceLocation.city,
issServiceState: state.order.serviceLocation.state, funnelServiceState: state.order.serviceLocation.state,
issServiceZipCode: state.order.serviceLocation.zipCode, funnelServiceZipCode: state.order.serviceLocation.zipCode,
issParentAccountNumber: state.order.accountNumber, funnelServiceZipCodeCtu: state.order.serviceLocation.zipCodeCtu,
issIsCoverageVerified: state.order.payment.insuranceCoverage.isVerified, funnelParentAccountNumber: state.order.accountNumber,
issHasRecalibrationPart: getHasRecalibrationPart(state), funnelProviderNumber: state.order.serviceLocation.provider.providerNumber,
issSelectedMultiGlass: state.order.damage.glassToReplace?.length > 1, funnelIsCoverageVerified: state.order.payment.insuranceCoverage.isVerified,
issSelectedWindshieldGlass: getNonFalseValuesOfPropertyInArrayOfObjects(state.order.damage.glassToReplace, 'glassLocation') funnelHasRecalibrationPart: getHasRecalibrationPart(state),
funnelSelectedMultiGlass: state.order.damage.glassToReplace?.length > 1,
funnelSelectedWindshieldGlass: getNonFalseValuesOfPropertyInArrayOfObjects(state.order.damage.glassToReplace, 'glassLocation')
.includes(damageLocationsSelected.WINDSHIELD), .includes(damageLocationsSelected.WINDSHIELD),
issSelectedBackGlass: getNonFalseValuesOfPropertyInArrayOfObjects(state.order.damage.glassToReplace, 'glassLocation') funnelSelectedBackGlass: getNonFalseValuesOfPropertyInArrayOfObjects(state.order.damage.glassToReplace, 'glassLocation')
.includes(damageLocationsSelected.REAR), .includes(damageLocationsSelected.REAR),
issSelectedDriverSideGlass: getNonFalseValuesOfPropertyInArrayOfObjects(state.order.damage.glassToReplace, 'glassLocation') funnelSelectedDriverSideGlass: getNonFalseValuesOfPropertyInArrayOfObjects(state.order.damage.glassToReplace, 'glassLocation')
.includes(damageLocationsSelected.DRIVER), .includes(damageLocationsSelected.DRIVER),
issSelectedPassengerSideGlass: getNonFalseValuesOfPropertyInArrayOfObjects(state.order.damage.glassToReplace, 'glassLocation') funnelSelectedPassengerSideGlass: getNonFalseValuesOfPropertyInArrayOfObjects(state.order.damage.glassToReplace, 'glassLocation')
.includes(damageLocationsSelected.PASSENGER), .includes(damageLocationsSelected.PASSENGER),
issOrderPartNumbers: [ funnelOrderPartNumbers: [
...getNonFalseValuesOfPropertyInArrayOfObjects( ...getNonFalseValuesOfPropertyInArrayOfObjects(
state.order.lineItems.glassParts, state.order.lineItems.glassParts,
'partNumber' 'partNumber'
@ -407,7 +409,7 @@ export const useMainStore = defineStore({
'partNumber' 'partNumber'
) )
], ],
issOrderPartTypes: [ funnelOrderPartTypes: [
...getNonFalseValuesOfPropertyInArrayOfObjects( ...getNonFalseValuesOfPropertyInArrayOfObjects(
state.order.lineItems.glassParts, state.order.lineItems.glassParts,
'recalibrationType' 'recalibrationType'
@ -419,9 +421,10 @@ export const useMainStore = defineStore({
] ]
}), }),
experimentSettings: (state) => state.applicationUser.experiments experimentSettings: (state) => state.applicationUser.experiments
.filter((x) => !!x.isActive)
.map((x) => x.settings) .map((x) => x.settings)
.reduce((r, c) => Object.assign(r, c), {}) ?? {}, .reduce((r, c) => Object.assign(r, c), {}) ?? {},
submittedOrder: () => JSON.parse(window.sessionStorage.getItem('submittedOrder')) submittedOrder: () => JSON.parse(window.sessionStorage.getItem(webStorageConstants.SUBMITTED_ORDER))
}, },
actions: actions:
{ {

View file

@ -1,12 +1,15 @@
// Common/Global Styles // Common/Global Styles
// Use this file for global styles that don't or won't have their own stylesheet // Use this file for global styles that don't or won't have their own stylesheet
html, body { html,
body {
height: 100%; height: 100%;
} }
body { body {
font-size: 16px; font-size: 16px;
background-color: #fff; background-color: #fff;
color: #4d5151; color: #4d5151;
.container-fluid { .container-fluid {
.prevent-squish { .prevent-squish {
overflow-x: unset; overflow-x: unset;
@ -16,39 +19,50 @@ body {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
} }
// Set max-width on columns to prevent overly-wide // Set max-width on columns to prevent overly-wide
// components on extra wide screens. // components on extra wide screens.
.col-md-6 { .col-md-6 {
max-width: 472px; max-width: 472px;
@include media-breakpoint-up(xl) { @include media-breakpoint-up(xl) {
max-width: 708px; max-width: 708px;
} }
.col { .col {
max-width: 236px; max-width: 236px;
&.one-list-card-width { &.one-list-card-width {
max-width: 472px; max-width: 472px;
@include media-breakpoint-up(xl) { @include media-breakpoint-up(xl) {
max-width: 66.6666666%; max-width: 66.6666666%;
} }
} }
} }
.shop-question { .shop-question {
.col { .col {
max-width: 472px; max-width: 472px;
} }
} }
} }
.col-xl-4 { .col-xl-4 {
max-width: 472px; max-width: 472px;
.col { .col {
max-width: 100%; max-width: 100%;
} }
} }
//END set max-width on columns //END set max-width on columns
} }
.pointer { .pointer {
cursor: pointer; cursor: pointer;
} }
.container, .container,
.container-fluid { .container-fluid {
overflow-x: hidden; overflow-x: hidden;
@ -71,7 +85,12 @@ body {
height: 1px; height: 1px;
overflow: hidden; overflow: hidden;
} }
.pac-container {
z-index: 10000 !important;
}
} }
.modal-open { .modal-open {
.container-fluid { .container-fluid {
&.fade-on-route-transition { &.fade-on-route-transition {
@ -79,4 +98,4 @@ body {
height: auto; height: auto;
} }
} }
} }