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>
|
<span>
|
||||||
{{ getFormattedAmount("", packagePrice) }}
|
{{ getFormattedAmount("", packagePrice) }}
|
||||||
</span>
|
</span>
|
||||||
|
<span
|
||||||
|
v-if="packagePriceWithoutDiscount > packagePrice"
|
||||||
|
class="struck-out-price">
|
||||||
|
{{ getFormattedAmount("", packagePriceWithoutDiscount) }}
|
||||||
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Packaged Cart Items -->
|
<!-- Packaged Cart Items -->
|
||||||
|
|
@ -174,6 +179,17 @@ export default {
|
||||||
|
|
||||||
return subTotal;
|
return subTotal;
|
||||||
},
|
},
|
||||||
|
getPromoDiscounts() {
|
||||||
|
const promoItems = this.promoCartItems;
|
||||||
|
|
||||||
|
let subTotal = 0;
|
||||||
|
|
||||||
|
promoItems?.forEach((item) => {
|
||||||
|
subTotal += item.subTotal;
|
||||||
|
});
|
||||||
|
|
||||||
|
return subTotal;
|
||||||
|
},
|
||||||
getVapsCartItemsForSelectedPackage(packageName) {
|
getVapsCartItemsForSelectedPackage(packageName) {
|
||||||
const packageContentTypes = getPackageContents(
|
const packageContentTypes = getPackageContents(
|
||||||
this.glassToReplace,
|
this.glassToReplace,
|
||||||
|
|
@ -354,6 +370,12 @@ export default {
|
||||||
|
|
||||||
return packagePrice;
|
return packagePrice;
|
||||||
},
|
},
|
||||||
|
packagePriceWithoutDiscount() {
|
||||||
|
let fullPrice = this.packagePrice;
|
||||||
|
let discount = this.getPromoDiscounts();
|
||||||
|
fullPrice += Math.abs(discount);
|
||||||
|
return fullPrice;
|
||||||
|
},
|
||||||
isRepair() {
|
isRepair() {
|
||||||
if (!this.damage) {
|
if (!this.damage) {
|
||||||
return;
|
return;
|
||||||
|
|
@ -887,6 +909,10 @@ export default {
|
||||||
background-color: $gray-100;
|
background-color: $gray-100;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
}
|
||||||
|
.struck-out-price {
|
||||||
|
text-decoration: line-through;
|
||||||
|
padding-left: 0.5rem;
|
||||||
|
}
|
||||||
.packaged-cart-item {
|
.packaged-cart-item {
|
||||||
background-color: $gray-100;
|
background-color: $gray-100;
|
||||||
padding-left: 2.5rem;
|
padding-left: 2.5rem;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue