Merge pull request #1592 from Safelite/rlsmerge/2023.12.07-to-develop
Rlsmerge/2023.12.07 to develop
This commit is contained in:
commit
5ec2f86893
3 changed files with 31 additions and 11 deletions
|
|
@ -7,7 +7,7 @@
|
|||
@click="toggleIsExpanded()">
|
||||
<a
|
||||
aria-label="expand cart"
|
||||
href="#!"
|
||||
href="javascript:void(0)"
|
||||
class="col d-flex justify-content-between py-0">
|
||||
<span class="label">{{ amountDueText }}</span>
|
||||
<span class="label amount-due">{{ getFormattedAmount("", amountDue) }}</span>
|
||||
|
|
@ -30,7 +30,7 @@
|
|||
ref="removeLink"
|
||||
linkType="text"
|
||||
:text="removeLinkText"
|
||||
href="#!"
|
||||
href="javascript:void(0)"
|
||||
@click-event="removeItem(cartItem.cartItemType, cartItem.category)">
|
||||
<template v-slot:after-text>
|
||||
<span class="sr-only">{{ cartItem.name }}</span>
|
||||
|
|
@ -53,13 +53,13 @@
|
|||
ref="removeLink"
|
||||
linkType="text"
|
||||
:text="removeLinkText"
|
||||
href="#!"
|
||||
href="javascript:void(0)"
|
||||
@click-event="removeItem(cartItem.cartItemType, cartItem.category)" />
|
||||
<textLink
|
||||
v-else-if="cartItem == recycleFeeCartItem && recyclingModalCmsWidgetName"
|
||||
linkType="text"
|
||||
:text="recycleFeeCartItem.name"
|
||||
href="#!"
|
||||
href="javascript:void(0)"
|
||||
@click-event="openModal(recyclingModalCmsWidgetName)" />
|
||||
<span v-else-if="cartItem == recycleFeeCartItem">
|
||||
{{ recycleFeeCartItem.name }}
|
||||
|
|
|
|||
|
|
@ -348,6 +348,7 @@ export default {
|
|||
"payment-method",
|
||||
false
|
||||
);
|
||||
|
||||
// Handle error alerts here, success alerts are handled in the watcher
|
||||
if (revalidatePromoResponse.errors.length) {
|
||||
getNewlyInactivatedPromos(
|
||||
|
|
@ -358,6 +359,25 @@ export default {
|
|||
this.$refs.funnelHeader.pushGlobalAlert(errorAlert, errorAlert.shouldAutoFade);
|
||||
});
|
||||
}
|
||||
|
||||
if (revalidatePromoResponse.promoLineItems.length > 0) {
|
||||
await baseMixin.methods.dispatchStoreActionWithLogging(
|
||||
storeActions.TAX_ORDER_ITEMS_AND_SAVE_SERVER_DATA,
|
||||
{
|
||||
billToAccountNumber: "87291",
|
||||
providerNumber:
|
||||
this.$store.getters.order.serviceLocation.provider.providerNumber,
|
||||
appointmentType: this.$store.getters.order.serviceLocation.appointmentType,
|
||||
serviceLocationCity: this.$store.getters.order.serviceLocation.city,
|
||||
serviceLocationState: this.$store.getters.order.serviceLocation.state,
|
||||
serviceLocationZipCode: this.$store.getters.order.serviceLocation.zipCode,
|
||||
pricedLineItems: revalidatePromoResponse.promoLineItems,
|
||||
},
|
||||
"payment-method",
|
||||
false
|
||||
);
|
||||
}
|
||||
|
||||
this.lineItems.promos = revalidatePromoResponse.promoLineItems;
|
||||
this.inactivePromos = revalidatePromoResponse.errors.map((x) =>
|
||||
getPromoCodeWithoutBundleIdentifier(x.promoCode)
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
id="promoLinkPromptId"
|
||||
linkType="text"
|
||||
:text="promoLinkText"
|
||||
href="#!"
|
||||
href="javascript:void(0)"
|
||||
@click-event="openModal" />
|
||||
<modal
|
||||
:ref="modalName"
|
||||
|
|
@ -24,14 +24,14 @@
|
|||
ref="alertInvalidPromo"
|
||||
v-if="displayInvalidPromoAlert"
|
||||
v-html="errorMessage"
|
||||
class="my-4 alert"
|
||||
class="mt-4 alert"
|
||||
cmsWidgetName="AlertInvalidPromoWidget"
|
||||
alertClass="alert-danger"
|
||||
v-bind:isDismissible="false" />
|
||||
<alert
|
||||
ref="AlertSimilarPromo"
|
||||
v-if="displaySimilarPromoAlert"
|
||||
class="my-4 alert"
|
||||
class="mt-4 alert"
|
||||
cmsWidgetName="AlertSimilarPromoWidget"
|
||||
alertClass="alert-danger"
|
||||
v-bind:isDismissible="false" />
|
||||
|
|
@ -39,7 +39,7 @@
|
|||
ref="alertInvalidStackingPromo"
|
||||
v-if="displayStackingPromoAlert"
|
||||
v-html="errorMessage"
|
||||
class="my-4 alert"
|
||||
class="mt-4 alert"
|
||||
cmsWidgetName="AlertStackingPromoWidget"
|
||||
alertClass="alert-danger"
|
||||
v-bind:isDismissible="false" />
|
||||
|
|
@ -47,17 +47,17 @@
|
|||
ref="AlertInShopPromo"
|
||||
v-if="displayInShopPromoAlert"
|
||||
v-html="errorMessage"
|
||||
class="my-4 alert"
|
||||
class="mt-4 alert"
|
||||
cmsWidgetName="AlertInshopPromoWidget"
|
||||
alertClass="alert-danger"
|
||||
v-bind:isDismissible="false" />
|
||||
<div v-for="(promoCode, i) in this.getPromoCodeList()" :key="i">
|
||||
<div class="mt-4" v-for="(promoCode, i) in this.getPromoCodeList()" :key="i">
|
||||
<span class="applied-promo">Promo code "{{ promoCode }}" applied </span>
|
||||
<textLink
|
||||
ref="removeLink"
|
||||
linkType="text"
|
||||
:text="removeLinkText"
|
||||
href="#!"
|
||||
href="javascript:void(0)"
|
||||
@click-event="removeItem(promoCode)" />
|
||||
</div>
|
||||
</modal>
|
||||
|
|
|
|||
Loading…
Reference in a new issue