Merge branch 'develop' into feature/kroell/INSR-8910
This commit is contained in:
commit
696cbaaaf5
11 changed files with 52 additions and 12 deletions
4
package-lock.json
generated
4
package-lock.json
generated
|
|
@ -10492,7 +10492,9 @@
|
||||||
"license": "ISC"
|
"license": "ISC"
|
||||||
},
|
},
|
||||||
"node_modules/follow-redirects": {
|
"node_modules/follow-redirects": {
|
||||||
"version": "1.15.11",
|
"version": "1.16.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.16.0.tgz",
|
||||||
|
"integrity": "sha512-y5rN/uOsadFT/JfYwhxRS5R7Qce+g3zG97+JrtFZlC9klX/W5hD7iiLzScI4nZqUS7DNUdhPgw4xI8W2LuXlUw==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"funding": [
|
"funding": [
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -526,13 +526,18 @@ export function doesCopyContainTextLink(copy) {
|
||||||
*
|
*
|
||||||
* @param context
|
* @param context
|
||||||
*/
|
*/
|
||||||
export function setupModalLinks(context) {
|
export function setupModalLinks(context, abortSignal = null) {
|
||||||
context.$nextTick(() => {
|
context.$nextTick(() => {
|
||||||
const elements = document.getElementsByClassName('modal-text');
|
const elements = document.getElementsByClassName('modal-text');
|
||||||
for (const element of elements) {
|
for (const element of elements) {
|
||||||
const target = element.getAttribute('modalTarget');
|
const target = element.getAttribute('modalTarget');
|
||||||
if (target) {
|
if (target) {
|
||||||
element.addEventListener('click', () => context.$refs[target].openModal());
|
if (abortSignal) {
|
||||||
|
element.addEventListener('click', () => context.$refs[target].openModal(), { signal: abortSignal });
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
element.addEventListener('click', () => context.$refs[target].openModal());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -237,7 +237,7 @@ export default {
|
||||||
if (this.recycleFeeCartItem && !isRecycleFeeHidden) {
|
if (this.recycleFeeCartItem && !isRecycleFeeHidden) {
|
||||||
items.push(this.recycleFeeCartItem);
|
items.push(this.recycleFeeCartItem);
|
||||||
}
|
}
|
||||||
if (this.mobileFeeCartItem && !isMobileFeeHidden) {
|
if (this.mobileFeeCartItem && !isMobileFeeHidden && !this.mobileFeeCartItem.isInsurable) {
|
||||||
items.push(this.mobileFeeCartItem);
|
items.push(this.mobileFeeCartItem);
|
||||||
}
|
}
|
||||||
const vapPartTypesInOrder = Array.from(new Set(this.lineItems.vaps?.map((vap) => vap.partType) ?? []));
|
const vapPartTypesInOrder = Array.from(new Set(this.lineItems.vaps?.map((vap) => vap.partType) ?? []));
|
||||||
|
|
@ -306,7 +306,7 @@ export default {
|
||||||
},
|
},
|
||||||
mobileFeeCartItem() {
|
mobileFeeCartItem() {
|
||||||
const mobileFeeLineItem = getMobileFeeLineItem(this.cartOrder);
|
const mobileFeeLineItem = getMobileFeeLineItem(this.cartOrder);
|
||||||
return mobileFeeLineItem
|
const cartItem = mobileFeeLineItem
|
||||||
? this.getCartItem(
|
? this.getCartItem(
|
||||||
this.getCmsContent(this.widget.mobileFee, widgetFields.TEXT_BLOCK_WIDGET.TEXT),
|
this.getCmsContent(this.widget.mobileFee, widgetFields.TEXT_BLOCK_WIDGET.TEXT),
|
||||||
[mobileFeeLineItem],
|
[mobileFeeLineItem],
|
||||||
|
|
@ -314,6 +314,10 @@ export default {
|
||||||
partTypeStrings.MOBILE_FEE
|
partTypeStrings.MOBILE_FEE
|
||||||
)
|
)
|
||||||
: null;
|
: null;
|
||||||
|
if (cartItem) {
|
||||||
|
cartItem["isInsurable"] = mobileFeeLineItem?.isInsurable;
|
||||||
|
}
|
||||||
|
return cartItem;
|
||||||
},
|
},
|
||||||
warrantyCartItem() {
|
warrantyCartItem() {
|
||||||
const label = this.cartOrder.damage.glassToReplace?.length > 0
|
const label = this.cartOrder.damage.glassToReplace?.length > 0
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,11 @@ Object {
|
||||||
"CANCEL_CLAIM_REF_NAME": "CancelClaimModal",
|
"CANCEL_CLAIM_REF_NAME": "CancelClaimModal",
|
||||||
"OEM_ENDORSEMENT_REF_NAME": "OEMModal",
|
"OEM_ENDORSEMENT_REF_NAME": "OEMModal",
|
||||||
"RECAL_MODAL_REF_NAME": "RecalModal",
|
"RECAL_MODAL_REF_NAME": "RecalModal",
|
||||||
|
"abortController": AbortController {
|
||||||
|
Symbol(SameObject caches): Object {
|
||||||
|
"signal": AbortSignal {},
|
||||||
|
},
|
||||||
|
},
|
||||||
"baseServiceLineItems": Array [],
|
"baseServiceLineItems": Array [],
|
||||||
"isPageLoading": true,
|
"isPageLoading": true,
|
||||||
"widget": Object {
|
"widget": Object {
|
||||||
|
|
|
||||||
|
|
@ -131,7 +131,6 @@ import recalModal from '@/iss-components/recal-modal/recal-modal.vue';
|
||||||
// Import Supporting Files
|
// Import Supporting Files
|
||||||
import {
|
import {
|
||||||
fetchCmsContentForPage,
|
fetchCmsContentForPage,
|
||||||
setupModalLink,
|
|
||||||
setupModalLinks,
|
setupModalLinks,
|
||||||
processIfStatements
|
processIfStatements
|
||||||
} from '@/helpers/cms-content-helper.js';
|
} from '@/helpers/cms-content-helper.js';
|
||||||
|
|
@ -231,7 +230,8 @@ export default {
|
||||||
},
|
},
|
||||||
RECAL_MODAL_REF_NAME,
|
RECAL_MODAL_REF_NAME,
|
||||||
CANCEL_CLAIM_REF_NAME,
|
CANCEL_CLAIM_REF_NAME,
|
||||||
OEM_ENDORSEMENT_REF_NAME
|
OEM_ENDORSEMENT_REF_NAME,
|
||||||
|
abortController: new AbortController()
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
|
@ -367,8 +367,9 @@ export default {
|
||||||
watch: {
|
watch: {
|
||||||
nextStepsBody(newValue, oldValue) {
|
nextStepsBody(newValue, oldValue) {
|
||||||
if (newValue !== oldValue) {
|
if (newValue !== oldValue) {
|
||||||
setupModalLink(this, RECAL_MODAL_REF_NAME);
|
this.abortController.abort();
|
||||||
setupModalLink(this, OEM_ENDORSEMENT_REF_NAME);
|
this.abortController = new AbortController();
|
||||||
|
setupModalLinks(this, this.abortController.signal);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
@ -376,7 +377,7 @@ export default {
|
||||||
if (this.isPageLoading) {
|
if (this.isPageLoading) {
|
||||||
showIssLoadingModal(true);
|
showIssLoadingModal(true);
|
||||||
}
|
}
|
||||||
setupModalLinks(this);
|
setupModalLinks(this, this.abortController.signal);
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
logEventsToGA() {
|
logEventsToGA() {
|
||||||
|
|
|
||||||
|
|
@ -441,7 +441,7 @@ describe('OrderConfirmation.vue', () => {
|
||||||
const testValue = wrapper.vm.appointmentTimeText;
|
const testValue = wrapper.vm.appointmentTimeText;
|
||||||
|
|
||||||
// Assert
|
// Assert
|
||||||
expect(testValue).toEqual('Drop off before 9:30 AM');
|
expect(testValue).toEqual('Drop off by 9:30 AM. Pick-up time dependent on shop schedule');
|
||||||
});
|
});
|
||||||
test.each([
|
test.each([
|
||||||
['Your appointment is at 9:00 AM', '09:00', '10:00'],
|
['Your appointment is at 9:00 AM', '09:00', '10:00'],
|
||||||
|
|
|
||||||
|
|
@ -341,7 +341,7 @@ export default {
|
||||||
appointmentTimeText() {
|
appointmentTimeText() {
|
||||||
const { startTime, endTime } = this.schedule;
|
const { startTime, endTime } = this.schedule;
|
||||||
if (this.isDropOffAppointment) {
|
if (this.isDropOffAppointment) {
|
||||||
return 'Drop off before 9:30 AM';
|
return 'Drop off by 9:30 AM. Pick-up time dependent on shop schedule';
|
||||||
}
|
}
|
||||||
if (this.isInShopAppointment) {
|
if (this.isInShopAppointment) {
|
||||||
const formattedStartTime = get12HourTimeFormat(startTime);
|
const formattedStartTime = get12HourTimeFormat(startTime);
|
||||||
|
|
|
||||||
|
|
@ -158,11 +158,13 @@ export default {
|
||||||
scheduleWithSafelite() {
|
scheduleWithSafelite() {
|
||||||
this.mainStore.updateIsSafeliteProvider(true);
|
this.mainStore.updateIsSafeliteProvider(true);
|
||||||
const scenario = this.navigationScenarios.CLICKED_FORWARD_WITH_SAFELITE;
|
const scenario = this.navigationScenarios.CLICKED_FORWARD_WITH_SAFELITE;
|
||||||
|
this.pushEventToGA('prefered_provider', 'Safelite', this.mainStore.accountNameForEvents, true);
|
||||||
this.navigateForward(scenario);
|
this.navigateForward(scenario);
|
||||||
},
|
},
|
||||||
scheduleWithTPA() {
|
scheduleWithTPA() {
|
||||||
this.mainStore.updateIsSafeliteProvider(false);
|
this.mainStore.updateIsSafeliteProvider(false);
|
||||||
const scenario = this.navigationScenarios.CLICKED_FORWARD_WITH_TPA_ENABLED;
|
const scenario = this.navigationScenarios.CLICKED_FORWARD_WITH_TPA_ENABLED;
|
||||||
|
this.pushEventToGA('prefered_provider', 'TPA', this.mainStore.accountNameForEvents, true);
|
||||||
this.navigateForward(scenario);
|
this.navigateForward(scenario);
|
||||||
},
|
},
|
||||||
findAnotherShopClicked() {
|
findAnotherShopClicked() {
|
||||||
|
|
|
||||||
|
|
@ -62,6 +62,7 @@ export default {
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
openModal() {
|
openModal() {
|
||||||
|
this.pushEventToGA('prefered_provider', 'display_modal', 'right_to_choose', true);
|
||||||
this.$refs[this.ModalName].openModal();
|
this.$refs[this.ModalName].openModal();
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,7 @@
|
||||||
:footerButtonText="ModalCloseButtonText"
|
:footerButtonText="ModalCloseButtonText"
|
||||||
:isButtonDisabled="isButtonDisabled"
|
:isButtonDisabled="isButtonDisabled"
|
||||||
@footerButtonEvent="footerButtonClick"
|
@footerButtonEvent="footerButtonClick"
|
||||||
|
@isModalOpened="handleModalOpenedEvent"
|
||||||
:displayCloseButton="false"
|
:displayCloseButton="false"
|
||||||
:displayCloseLink="true">
|
:displayCloseLink="true">
|
||||||
<div class="form-test-invalid">
|
<div class="form-test-invalid">
|
||||||
|
|
@ -137,11 +138,14 @@ export default {
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
openModal() {
|
openModal() {
|
||||||
|
this.pushEventToGA('ADAS_self_service', 'acknowledge_recal', 'TPA_displayed_message', true);
|
||||||
this.$refs[this.ModalName].openModal();
|
this.$refs[this.ModalName].openModal();
|
||||||
},
|
},
|
||||||
|
|
||||||
footerButtonClick() {
|
footerButtonClick() {
|
||||||
if (this.tpaRecalAnswer && (!this.showAcknowledgementCheckbox || this.acknowledged)) {
|
if (this.tpaRecalAnswer && (!this.showAcknowledgementCheckbox || this.acknowledged)) {
|
||||||
|
const eventLabel = this.tpaRecalAnswer === PROVIDER_PREFERENCE_OPTIONS.SAFELITE ? 'TPA_schedule_with_safelite' : 'TPA_accept';
|
||||||
|
this.pushEventToGA('ADAS_self_service', 'acknowledge_recal', eventLabel, true);
|
||||||
this.$refs[this.ModalName]?.closeModal();
|
this.$refs[this.ModalName]?.closeModal();
|
||||||
this.$emit('buttonClick', this.tpaRecalAnswer);
|
this.$emit('buttonClick', this.tpaRecalAnswer);
|
||||||
} else if (!this.tpaRecalAnswer) {
|
} else if (!this.tpaRecalAnswer) {
|
||||||
|
|
@ -151,6 +155,11 @@ export default {
|
||||||
this.showAcknowledgementError = true;
|
this.showAcknowledgementError = true;
|
||||||
this.showNoSelectionError = false;
|
this.showNoSelectionError = false;
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
handleModalOpenedEvent(isOpened) {
|
||||||
|
if (!isOpened && !(!this.showAcknowledgementCheckbox || this.acknowledged)) {
|
||||||
|
this.pushEventToGA('ADAS_self_service', 'acknowledge_recal', 'TPA_decline', true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -51,6 +51,17 @@ export default {
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
handleClickToggle() {
|
handleClickToggle() {
|
||||||
|
let coverageType = '';
|
||||||
|
if (this.mainStore.isItac) {
|
||||||
|
coverageType = 'ITAC';
|
||||||
|
} else if (this.mainStore.isNoComp) {
|
||||||
|
coverageType = 'no_comp';
|
||||||
|
} else if (this.mainStore.isVerified) {
|
||||||
|
coverageType = 'verified';
|
||||||
|
} else {
|
||||||
|
coverageType = 'unverified';
|
||||||
|
}
|
||||||
|
this.pushEventToGA('ADAS_self_service', 'WSN_learn_more_clicked', coverageType, true);
|
||||||
this.isDetailVisible = !this.isDetailVisible;
|
this.isDetailVisible = !this.isDetailVisible;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue