Merge pull request #1806 from Safelite/feature/CSR-1977-ajc
Feature/CSR-1977
This commit is contained in:
commit
7c3a76f892
2 changed files with 17 additions and 6 deletions
|
|
@ -33,9 +33,10 @@
|
|||
:key="i"
|
||||
class="packaged-cart-item">
|
||||
<span
|
||||
><span v-if="cartItem.category === 'promos'"></span>{{ cartItem.name
|
||||
}}<span v-if="cartItem.category === 'promos'"></span
|
||||
></span>
|
||||
><span :class="cartItem.category === 'promos' ? 'promo' : ''">{{
|
||||
cartItem.name
|
||||
}}</span></span
|
||||
>
|
||||
<textLink
|
||||
v-if="allowItemRemoval"
|
||||
ref="removeLink"
|
||||
|
|
@ -111,7 +112,9 @@
|
|||
class="my-2 lh-1 applied-promo"
|
||||
v-for="(promoCode, i) in this.getPromoCodeList()"
|
||||
:key="i">
|
||||
<span class="caption">Promo code {{ promoCode }} applied </span>
|
||||
<span class="caption"
|
||||
>Promo code <span class="promo-code">{{ promoCode }}</span> applied
|
||||
</span>
|
||||
</div>
|
||||
<contentGroupModal ref="RecycleModal" cmsWidgetName="RecycleModal">
|
||||
<textBlock cmsWidgetName="RecycleTextBlock" />
|
||||
|
|
@ -919,6 +922,9 @@ export default {
|
|||
&:last-child {
|
||||
justify-content: flex-end;
|
||||
}
|
||||
&.promo {
|
||||
text-transform: uppercase;
|
||||
}
|
||||
}
|
||||
a {
|
||||
font-size: 0.875rem;
|
||||
|
|
@ -1012,6 +1018,11 @@ export default {
|
|||
padding: 2px 8px;
|
||||
background-color: $green-100;
|
||||
border-radius: 12px;
|
||||
|
||||
&.promo-code {
|
||||
text-transform: uppercase;
|
||||
padding: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -201,7 +201,7 @@ export default {
|
|||
|
||||
return {
|
||||
isValid: !("errorCode" in promoValidationResponse),
|
||||
promoCode: promoValidationResponse?.orderPromos,
|
||||
promoCode: promoValidationResponse?.orderPromos, // should be an array of promos
|
||||
errorCode: promoValidationResponse?.errorCode,
|
||||
additionalInfo: promoValidationResponse?.additionalInfo,
|
||||
};
|
||||
|
|
@ -264,7 +264,7 @@ export default {
|
|||
if (promoCodeData.isValid) {
|
||||
if (this.taxPromos) {
|
||||
const pricedLineItemsToTax = [];
|
||||
pricedLineItemsToTax.push(...promoCodeData.promoCode);
|
||||
pricedLineItemsToTax.push(...promoCodeData.promoCode); // promoCodeData.promoCode should be an array
|
||||
const taxedLineItems =
|
||||
await baseMixin.methods.dispatchStoreActionWithLogging(
|
||||
storeActions.TAX_ORDER_ITEMS_AND_SAVE_SERVER_DATA,
|
||||
|
|
|
|||
Loading…
Reference in a new issue