Fixed unit test and Prettified
This commit is contained in:
parent
dbcb8c15c0
commit
d3d334f666
3 changed files with 14 additions and 5 deletions
|
|
@ -6,7 +6,7 @@ const partTypeStrings = {
|
||||||
RECYCLE_FEE: "RECYCLE FEE",
|
RECYCLE_FEE: "RECYCLE FEE",
|
||||||
MOBILE_FEE: "MOBILE FEE",
|
MOBILE_FEE: "MOBILE FEE",
|
||||||
REPAIR_FEE: "REPAIR FEE",
|
REPAIR_FEE: "REPAIR FEE",
|
||||||
EARLY_BIRD: "EARLY BIRD"
|
EARLY_BIRD: "EARLY BIRD",
|
||||||
};
|
};
|
||||||
|
|
||||||
export { partTypeStrings };
|
export { partTypeStrings };
|
||||||
|
|
|
||||||
|
|
@ -268,7 +268,7 @@ describe("cart.vue", () => {
|
||||||
kitPrice: 0,
|
kitPrice: 0,
|
||||||
laborAmount: 34.98,
|
laborAmount: 34.98,
|
||||||
partNumber: "MOBILE FEE",
|
partNumber: "MOBILE FEE",
|
||||||
partType: "REPLACE FEE",
|
partType: "MOBILE FEE",
|
||||||
salesTax: 2.62,
|
salesTax: 2.62,
|
||||||
sellingPrice: 0,
|
sellingPrice: 0,
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -68,7 +68,12 @@
|
||||||
linkType="text"
|
linkType="text"
|
||||||
:text="removeLinkText"
|
:text="removeLinkText"
|
||||||
href="#!"
|
href="#!"
|
||||||
@click-event="removeItem(premiumAppointmentDiscountCartItem.cartItemType, 'supportingItems')" />
|
@click-event="
|
||||||
|
removeItem(
|
||||||
|
premiumAppointmentDiscountCartItem.cartItemType,
|
||||||
|
'supportingItems'
|
||||||
|
)
|
||||||
|
" />
|
||||||
<span>{{
|
<span>{{
|
||||||
currencyFormatter.format(premiumAppointmentDiscountCartItem.subTotal)
|
currencyFormatter.format(premiumAppointmentDiscountCartItem.subTotal)
|
||||||
}}</span>
|
}}</span>
|
||||||
|
|
@ -549,8 +554,12 @@ export default {
|
||||||
otherSupportingItemsCartItem() {
|
otherSupportingItemsCartItem() {
|
||||||
let cartItem = null;
|
let cartItem = null;
|
||||||
|
|
||||||
let otherSupportingItemsLineItems = baseMixin.methods.filterOutFees(this.supportingItems);
|
let otherSupportingItemsLineItems = baseMixin.methods.filterOutFees(
|
||||||
otherSupportingItemsLineItems = otherSupportingItemsLineItems.filter(lineItem => lineItem.partType != partTypeStrings.EARLY_BIRD);
|
this.supportingItems
|
||||||
|
);
|
||||||
|
otherSupportingItemsLineItems = otherSupportingItemsLineItems.filter(
|
||||||
|
(lineItem) => lineItem.partType != partTypeStrings.EARLY_BIRD
|
||||||
|
);
|
||||||
|
|
||||||
if (otherSupportingItemsLineItems.length > 0) {
|
if (otherSupportingItemsLineItems.length > 0) {
|
||||||
cartItem = {
|
cartItem = {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue