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",
|
||||
MOBILE_FEE: "MOBILE FEE",
|
||||
REPAIR_FEE: "REPAIR FEE",
|
||||
EARLY_BIRD: "EARLY BIRD"
|
||||
EARLY_BIRD: "EARLY BIRD",
|
||||
};
|
||||
|
||||
export { partTypeStrings };
|
||||
|
|
|
|||
|
|
@ -268,7 +268,7 @@ describe("cart.vue", () => {
|
|||
kitPrice: 0,
|
||||
laborAmount: 34.98,
|
||||
partNumber: "MOBILE FEE",
|
||||
partType: "REPLACE FEE",
|
||||
partType: "MOBILE FEE",
|
||||
salesTax: 2.62,
|
||||
sellingPrice: 0,
|
||||
},
|
||||
|
|
|
|||
|
|
@ -68,7 +68,12 @@
|
|||
linkType="text"
|
||||
:text="removeLinkText"
|
||||
href="#!"
|
||||
@click-event="removeItem(premiumAppointmentDiscountCartItem.cartItemType, 'supportingItems')" />
|
||||
@click-event="
|
||||
removeItem(
|
||||
premiumAppointmentDiscountCartItem.cartItemType,
|
||||
'supportingItems'
|
||||
)
|
||||
" />
|
||||
<span>{{
|
||||
currencyFormatter.format(premiumAppointmentDiscountCartItem.subTotal)
|
||||
}}</span>
|
||||
|
|
@ -549,8 +554,12 @@ export default {
|
|||
otherSupportingItemsCartItem() {
|
||||
let cartItem = null;
|
||||
|
||||
let otherSupportingItemsLineItems = baseMixin.methods.filterOutFees(this.supportingItems);
|
||||
otherSupportingItemsLineItems = otherSupportingItemsLineItems.filter(lineItem => lineItem.partType != partTypeStrings.EARLY_BIRD);
|
||||
let otherSupportingItemsLineItems = baseMixin.methods.filterOutFees(
|
||||
this.supportingItems
|
||||
);
|
||||
otherSupportingItemsLineItems = otherSupportingItemsLineItems.filter(
|
||||
(lineItem) => lineItem.partType != partTypeStrings.EARLY_BIRD
|
||||
);
|
||||
|
||||
if (otherSupportingItemsLineItems.length > 0) {
|
||||
cartItem = {
|
||||
|
|
|
|||
Loading…
Reference in a new issue