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