Merge pull request #1599 from Safelite/rlsmerge/2023.12.07-to-develop

Rlsmerge/2023.12.07 to develop
This commit is contained in:
CarlNation 2023-11-30 05:38:36 -05:00 committed by GitHub
commit b1bc7bb20b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 33 additions and 29 deletions

View file

@ -217,6 +217,7 @@ stages:
__VUE_APP_HERITAGE_FUNNEL__: $(__VUE_APP_HERITAGE_FUNNEL__) __VUE_APP_HERITAGE_FUNNEL__: $(__VUE_APP_HERITAGE_FUNNEL__)
__VUE_APP_SAFELITE_HOP__: $(__VUE_APP_SAFELITE_HOP__) __VUE_APP_SAFELITE_HOP__: $(__VUE_APP_SAFELITE_HOP__)
__VUE_APP_CURRENT_ENVIRONMENT__: $(__VUE_APP_CURRENT_ENVIRONMENT__) __VUE_APP_CURRENT_ENVIRONMENT__: $(__VUE_APP_CURRENT_ENVIRONMENT__)
__VUE_APP_MY_ACCOUNT__: $(__VUE_APP_MY_ACCOUNT__)
indexDeployVariables: indexDeployVariables:
__VUE_APP_GOOGLE_TAG_MANAGER_SCRIPT_BODY__: $(__VUE_APP_GOOGLE_TAG_MANAGER_SCRIPT_BODY__) __VUE_APP_GOOGLE_TAG_MANAGER_SCRIPT_BODY__: $(__VUE_APP_GOOGLE_TAG_MANAGER_SCRIPT_BODY__)
__VUE_APP_GOOGLE_TAG_MANAGER_NOSCRIPT_FRAME_SRC__: $(__VUE_APP_GOOGLE_TAG_MANAGER_NOSCRIPT_FRAME_SRC__) __VUE_APP_GOOGLE_TAG_MANAGER_NOSCRIPT_FRAME_SRC__: $(__VUE_APP_GOOGLE_TAG_MANAGER_NOSCRIPT_FRAME_SRC__)
@ -275,6 +276,7 @@ stages:
__VUE_APP_HERITAGE_FUNNEL__: $(__VUE_APP_HERITAGE_FUNNEL__) __VUE_APP_HERITAGE_FUNNEL__: $(__VUE_APP_HERITAGE_FUNNEL__)
__VUE_APP_SAFELITE_HOP__: $(__VUE_APP_SAFELITE_HOP__) __VUE_APP_SAFELITE_HOP__: $(__VUE_APP_SAFELITE_HOP__)
__VUE_APP_CURRENT_ENVIRONMENT__: $(__VUE_APP_CURRENT_ENVIRONMENT__) __VUE_APP_CURRENT_ENVIRONMENT__: $(__VUE_APP_CURRENT_ENVIRONMENT__)
__VUE_APP_MY_ACCOUNT__: $(__VUE_APP_MY_ACCOUNT__)
indexDeployVariables: indexDeployVariables:
__VUE_APP_GOOGLE_TAG_MANAGER_SCRIPT_BODY__: $(__VUE_APP_GOOGLE_TAG_MANAGER_SCRIPT_BODY__) __VUE_APP_GOOGLE_TAG_MANAGER_SCRIPT_BODY__: $(__VUE_APP_GOOGLE_TAG_MANAGER_SCRIPT_BODY__)
__VUE_APP_GOOGLE_TAG_MANAGER_NOSCRIPT_FRAME_SRC__: $(__VUE_APP_GOOGLE_TAG_MANAGER_NOSCRIPT_FRAME_SRC__) __VUE_APP_GOOGLE_TAG_MANAGER_NOSCRIPT_FRAME_SRC__: $(__VUE_APP_GOOGLE_TAG_MANAGER_NOSCRIPT_FRAME_SRC__)

View file

@ -6,6 +6,7 @@
:id="modalId" :id="modalId"
tabindex="-1" tabindex="-1"
aria-labelledby="ModalComponentLabel" aria-labelledby="ModalComponentLabel"
@keypress.enter="onEnter"
aria-hidden="true"> aria-hidden="true">
<div class="modal-dialog modal-dialog-centered"> <div class="modal-dialog modal-dialog-centered">
<div class="modal-content"> <div class="modal-content">
@ -81,6 +82,12 @@ export default {
this.resetButtonStyle(); this.resetButtonStyle();
} }
}, },
async onEnter(e) {
e.preventDefault();
document.getElementById("modalbtn")?.focus();
this.$refs.modalButtonMain.clicked();
document.getElementById(this.modalId)?.focus();
},
resetButtonStyle() { resetButtonStyle() {
this.$refs.modalButtonMain.resetButtonStyle(); this.$refs.modalButtonMain.resetButtonStyle();
}, },

View file

@ -11,7 +11,6 @@
:headerText="modalHeaderText" :headerText="modalHeaderText"
:onModalClosedCallback="onModalClosed" :onModalClosedCallback="onModalClosed"
:onModalOpenedCallback="focusOnPromoInput" :onModalOpenedCallback="focusOnPromoInput"
@keypress.enter="onEnter"
:footerButtonText="modalFooterText" :footerButtonText="modalFooterText"
@footer-button-event="addPromoCode"> @footer-button-event="addPromoCode">
<promoQuestion <promoQuestion
@ -163,10 +162,6 @@ export default {
openModal() { openModal() {
this.modal.openModal(); this.modal.openModal();
}, },
onEnter(e) {
e.preventDefault();
this.modal.validateAndEmit();
},
closeModal() { closeModal() {
this.modal.closeModal(); this.modal.closeModal();
}, },

View file

@ -35,10 +35,6 @@
<hr class="mb-5" /> <hr class="mb-5" />
<paymentSwitch
cmsWidgetName="PaymentMethodWidget"
:paymentType="paymentType"
@switch-payment-event="switchPIAMethod" />
<navbar <navbar
cmsWidgetName="FunnelFooterWidget" cmsWidgetName="FunnelFooterWidget"
isForwardActionDisabled="true" isForwardActionDisabled="true"
@ -47,6 +43,8 @@
@back-clicked="backButtonAction" /> @back-clicked="backButtonAction" />
</div> </div>
</div> </div>
<div v-if="shouldBlockInteraction" class="ui-block" @click="supressClick"></div>
</div> </div>
</Form> </Form>
@ -178,7 +176,6 @@ import funnelHeader from "@/fmg-components/funnel-header/funnel-header";
import navbar from "@/fmg-components/nav-bar/nav-bar"; import navbar from "@/fmg-components/nav-bar/nav-bar";
import loadingModal from "@/fmg-components/loading-modal/loading-modal.vue"; import loadingModal from "@/fmg-components/loading-modal/loading-modal.vue";
import cart from "@/fmg-components/cart/cart"; import cart from "@/fmg-components/cart/cart";
import paymentSwitch from "./payment-switch/payment-switch.vue";
import { storeActions } from "@/constants/store-actions"; import { storeActions } from "@/constants/store-actions";
import store from "@/store"; import store from "@/store";
@ -231,6 +228,8 @@ export default {
piaLineItems: "", piaLineItems: "",
lineItems: [], lineItems: [],
availableVaps: [], availableVaps: [],
shouldBlockInteraction: false,
}; };
}, },
directives: { directives: {
@ -398,9 +397,6 @@ export default {
} }
return ""; return "";
}, },
switchPaymentText() {
return this.getCmsContent("PaymentMethodWidget", "QuestionText");
},
damageInfo() { damageInfo() {
return this.$store.getters.damage; return this.$store.getters.damage;
}, },
@ -561,10 +557,6 @@ export default {
window.location = applicationConfig.PIA_CANCEL_URL; window.location = applicationConfig.PIA_CANCEL_URL;
//this.$router.navigateWithoutSaving(this.navigationScenarios.CLICKED_BACK, this.$route); //this.$router.navigateWithoutSaving(this.navigationScenarios.CLICKED_BACK, this.$route);
}, },
switchPIAMethod(payMethod) {
this.paymentType = payMethod;
this.submitHopForm();
},
submitHopForm() { submitHopForm() {
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.hopForm.submit(); this.$refs.hopForm.submit();
@ -598,19 +590,29 @@ export default {
if (event.data.indexOf("afterpayClosed") > -1) { if (event.data.indexOf("afterpayClosed") > -1) {
this.backButtonAction(); this.backButtonAction();
} }
if (event.data.indexOf("creditCardSubmit") > -1) {
this.setUIBlock(true);
}
}, },
setIFrameListener() { setIFrameListener() {
window.addEventListener("message", (event) => window.addEventListener("message", (event) =>
this.handleIFrameContentWindwMessage(event) this.handleIFrameContentWindwMessage(event)
); );
}, },
setUIBlock(val) {
this.shouldBlockInteraction = val;
},
supressClick(event) {
if (this.shouldBlockInteraction) {
event.stopPropagation();
}
},
}, },
components: { components: {
funnelHeader, funnelHeader,
navbar, navbar,
loadingModal, loadingModal,
cart, cart,
paymentSwitch,
}, },
}; };
</script> </script>
@ -625,4 +627,13 @@ export default {
#pageLoadingModal { #pageLoadingModal {
background-color: red; background-color: red;
} }
.ui-block {
position: fixed;
top: 0;
bottom: 0;
left: 0;
right: 0;
z-index: 9999;
}
</style> </style>

View file

@ -19,7 +19,6 @@
:onModalOpenedCallback="onModalOpened" :onModalOpenedCallback="onModalOpened"
:onModalClosedCallback="onModalClosed" :onModalClosedCallback="onModalClosed"
:footerButtonText="modalFooterText" :footerButtonText="modalFooterText"
@keypress.enter="onEnter"
@footer-button-event="setZipCode"> @footer-button-event="setZipCode">
<serviceZipQuestion <serviceZipQuestion
ref="serviceZipQuestion" ref="serviceZipQuestion"
@ -109,10 +108,6 @@ export default {
const input = document.getElementById(this.serviceZipCodeTextInputId); const input = document.getElementById(this.serviceZipCodeTextInputId);
input?.focus(); input?.focus();
}, },
focusOnModalButton() {
const modalButton = document.getElementById("modalbtn");
modalButton?.focus();
},
copyModel(modelToCopy) { copyModel(modelToCopy) {
return { return {
state: modelToCopy.state, state: modelToCopy.state,
@ -122,12 +117,6 @@ export default {
openModal() { openModal() {
this.modal.openModal(); this.modal.openModal();
}, },
onEnter(e) {
e.preventDefault();
this.focusOnModalButton();
this.modal.validateAndEmit();
this.focusOnZipInput();
},
closeModal() { closeModal() {
this.modal.closeModal(); this.modal.closeModal();
}, },