CSR-1977: instead of transforming data, only present as all uppercase
This commit is contained in:
parent
13dbad3680
commit
fc9e445843
2 changed files with 15 additions and 9 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;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -199,11 +199,6 @@ export default {
|
||||||
false
|
false
|
||||||
);
|
);
|
||||||
|
|
||||||
// ensure that all promo codes that return are in all caps format
|
|
||||||
promoValidationResponse?.orderPromos?.forEach((orderPromo) => {
|
|
||||||
orderPromo.promoCode = orderPromo.promoCode.toUpperCase();
|
|
||||||
});
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
isValid: !("errorCode" in promoValidationResponse),
|
isValid: !("errorCode" in promoValidationResponse),
|
||||||
promoCode: promoValidationResponse?.orderPromos, // should be an array of promos
|
promoCode: promoValidationResponse?.orderPromos, // should be an array of promos
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue