Merge pull request #1751 from Safelite/feature/CSR-1952-ajc-try2
[DO NOT MERGE] - CSR-1952: add missing strike-through price vs discount promo price feature
This commit is contained in:
commit
bbbc66f124
1 changed files with 26 additions and 0 deletions
|
|
@ -20,6 +20,11 @@
|
|||
<span>
|
||||
{{ getFormattedAmount("", packagePrice) }}
|
||||
</span>
|
||||
<span
|
||||
v-if="packagePriceWithoutDiscount > packagePrice"
|
||||
class="struck-out-price">
|
||||
{{ getFormattedAmount("", packagePriceWithoutDiscount) }}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<!-- Packaged Cart Items -->
|
||||
|
|
@ -174,6 +179,17 @@ export default {
|
|||
|
||||
return subTotal;
|
||||
},
|
||||
getPromoDiscounts() {
|
||||
const promoItems = this.promoCartItems;
|
||||
|
||||
let subTotal = 0;
|
||||
|
||||
promoItems?.forEach((item) => {
|
||||
subTotal += item.subTotal;
|
||||
});
|
||||
|
||||
return subTotal;
|
||||
},
|
||||
getVapsCartItemsForSelectedPackage(packageName) {
|
||||
const packageContentTypes = getPackageContents(
|
||||
this.glassToReplace,
|
||||
|
|
@ -354,6 +370,12 @@ export default {
|
|||
|
||||
return packagePrice;
|
||||
},
|
||||
packagePriceWithoutDiscount() {
|
||||
let fullPrice = this.packagePrice;
|
||||
let discount = this.getPromoDiscounts();
|
||||
fullPrice += Math.abs(discount);
|
||||
return fullPrice;
|
||||
},
|
||||
isRepair() {
|
||||
if (!this.damage) {
|
||||
return;
|
||||
|
|
@ -887,6 +909,10 @@ export default {
|
|||
background-color: $gray-100;
|
||||
align-items: center;
|
||||
}
|
||||
.struck-out-price {
|
||||
text-decoration: line-through;
|
||||
padding-left: 0.5rem;
|
||||
}
|
||||
.packaged-cart-item {
|
||||
background-color: $gray-100;
|
||||
padding-left: 2.5rem;
|
||||
|
|
|
|||
Loading…
Reference in a new issue