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"
|
||||
},
|
||||
"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,
|
||||
"funding": [
|
||||
{
|
||||
|
|
|
|||
|
|
@ -526,13 +526,18 @@ export function doesCopyContainTextLink(copy) {
|
|||
*
|
||||
* @param context
|
||||
*/
|
||||
export function setupModalLinks(context) {
|
||||
export function setupModalLinks(context, abortSignal = null) {
|
||||
context.$nextTick(() => {
|
||||
const elements = document.getElementsByClassName('modal-text');
|
||||
for (const element of elements) {
|
||||
const target = element.getAttribute('modalTarget');
|
||||
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) {
|
||||
items.push(this.recycleFeeCartItem);
|
||||
}
|
||||
if (this.mobileFeeCartItem && !isMobileFeeHidden) {
|
||||
if (this.mobileFeeCartItem && !isMobileFeeHidden && !this.mobileFeeCartItem.isInsurable) {
|
||||
items.push(this.mobileFeeCartItem);
|
||||
}
|
||||
const vapPartTypesInOrder = Array.from(new Set(this.lineItems.vaps?.map((vap) => vap.partType) ?? []));
|
||||
|
|
@ -306,7 +306,7 @@ export default {
|
|||
},
|
||||
mobileFeeCartItem() {
|
||||
const mobileFeeLineItem = getMobileFeeLineItem(this.cartOrder);
|
||||
return mobileFeeLineItem
|
||||
const cartItem = mobileFeeLineItem
|
||||
? this.getCartItem(
|
||||
this.getCmsContent(this.widget.mobileFee, widgetFields.TEXT_BLOCK_WIDGET.TEXT),
|
||||
[mobileFeeLineItem],
|
||||
|
|
@ -314,6 +314,10 @@ export default {
|
|||
partTypeStrings.MOBILE_FEE
|
||||
)
|
||||
: null;
|
||||
if (cartItem) {
|
||||
cartItem["isInsurable"] = mobileFeeLineItem?.isInsurable;
|
||||
}
|
||||
return cartItem;
|
||||
},
|
||||
warrantyCartItem() {
|
||||
const label = this.cartOrder.damage.glassToReplace?.length > 0
|
||||
|
|
|
|||
|
|
@ -5,6 +5,11 @@ Object {
|
|||
"CANCEL_CLAIM_REF_NAME": "CancelClaimModal",
|
||||
"OEM_ENDORSEMENT_REF_NAME": "OEMModal",
|
||||
"RECAL_MODAL_REF_NAME": "RecalModal",
|
||||
"abortController": AbortController {
|
||||
Symbol(SameObject caches): Object {
|
||||
"signal": AbortSignal {},
|
||||
},
|
||||
},
|
||||
"baseServiceLineItems": Array [],
|
||||
"isPageLoading": true,
|
||||
"widget": Object {
|
||||
|
|
|
|||
|
|
@ -131,7 +131,6 @@ import recalModal from '@/iss-components/recal-modal/recal-modal.vue';
|
|||
// Import Supporting Files
|
||||
import {
|
||||
fetchCmsContentForPage,
|
||||
setupModalLink,
|
||||
setupModalLinks,
|
||||
processIfStatements
|
||||
} from '@/helpers/cms-content-helper.js';
|
||||
|
|
@ -231,7 +230,8 @@ export default {
|
|||
},
|
||||
RECAL_MODAL_REF_NAME,
|
||||
CANCEL_CLAIM_REF_NAME,
|
||||
OEM_ENDORSEMENT_REF_NAME
|
||||
OEM_ENDORSEMENT_REF_NAME,
|
||||
abortController: new AbortController()
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
|
|
@ -367,8 +367,9 @@ export default {
|
|||
watch: {
|
||||
nextStepsBody(newValue, oldValue) {
|
||||
if (newValue !== oldValue) {
|
||||
setupModalLink(this, RECAL_MODAL_REF_NAME);
|
||||
setupModalLink(this, OEM_ENDORSEMENT_REF_NAME);
|
||||
this.abortController.abort();
|
||||
this.abortController = new AbortController();
|
||||
setupModalLinks(this, this.abortController.signal);
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
@ -376,7 +377,7 @@ export default {
|
|||
if (this.isPageLoading) {
|
||||
showIssLoadingModal(true);
|
||||
}
|
||||
setupModalLinks(this);
|
||||
setupModalLinks(this, this.abortController.signal);
|
||||
},
|
||||
methods: {
|
||||
logEventsToGA() {
|
||||
|
|
|
|||
|
|
@ -441,7 +441,7 @@ describe('OrderConfirmation.vue', () => {
|
|||
const testValue = wrapper.vm.appointmentTimeText;
|
||||
|
||||
// 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([
|
||||
['Your appointment is at 9:00 AM', '09:00', '10:00'],
|
||||
|
|
|
|||
|
|
@ -341,7 +341,7 @@ export default {
|
|||
appointmentTimeText() {
|
||||
const { startTime, endTime } = this.schedule;
|
||||
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) {
|
||||
const formattedStartTime = get12HourTimeFormat(startTime);
|
||||
|
|
|
|||
|
|
@ -158,11 +158,13 @@ export default {
|
|||
scheduleWithSafelite() {
|
||||
this.mainStore.updateIsSafeliteProvider(true);
|
||||
const scenario = this.navigationScenarios.CLICKED_FORWARD_WITH_SAFELITE;
|
||||
this.pushEventToGA('prefered_provider', 'Safelite', this.mainStore.accountNameForEvents, true);
|
||||
this.navigateForward(scenario);
|
||||
},
|
||||
scheduleWithTPA() {
|
||||
this.mainStore.updateIsSafeliteProvider(false);
|
||||
const scenario = this.navigationScenarios.CLICKED_FORWARD_WITH_TPA_ENABLED;
|
||||
this.pushEventToGA('prefered_provider', 'TPA', this.mainStore.accountNameForEvents, true);
|
||||
this.navigateForward(scenario);
|
||||
},
|
||||
findAnotherShopClicked() {
|
||||
|
|
|
|||
|
|
@ -62,6 +62,7 @@ export default {
|
|||
},
|
||||
methods: {
|
||||
openModal() {
|
||||
this.pushEventToGA('prefered_provider', 'display_modal', 'right_to_choose', true);
|
||||
this.$refs[this.ModalName].openModal();
|
||||
},
|
||||
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@
|
|||
:footerButtonText="ModalCloseButtonText"
|
||||
:isButtonDisabled="isButtonDisabled"
|
||||
@footerButtonEvent="footerButtonClick"
|
||||
@isModalOpened="handleModalOpenedEvent"
|
||||
:displayCloseButton="false"
|
||||
:displayCloseLink="true">
|
||||
<div class="form-test-invalid">
|
||||
|
|
@ -137,11 +138,14 @@ export default {
|
|||
},
|
||||
methods: {
|
||||
openModal() {
|
||||
this.pushEventToGA('ADAS_self_service', 'acknowledge_recal', 'TPA_displayed_message', true);
|
||||
this.$refs[this.ModalName].openModal();
|
||||
},
|
||||
|
||||
footerButtonClick() {
|
||||
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.$emit('buttonClick', this.tpaRecalAnswer);
|
||||
} else if (!this.tpaRecalAnswer) {
|
||||
|
|
@ -151,6 +155,11 @@ export default {
|
|||
this.showAcknowledgementError = true;
|
||||
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: {
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue