CSR-1383: refactor improvement
This commit is contained in:
parent
eb4d71f68d
commit
8d35070585
1 changed files with 4 additions and 6 deletions
|
|
@ -42,17 +42,15 @@ export default {
|
||||||
isDisplayed() {
|
isDisplayed() {
|
||||||
return this.showAddRainDefense || this.showAddWipers;
|
return this.showAddRainDefense || this.showAddWipers;
|
||||||
},
|
},
|
||||||
showAddRainDefense() {
|
showAddRainDefense() { // if it's not found in the cart
|
||||||
const rainDefenseIndex = this.cart.findIndex((vap) => {
|
return !this.cart.some((vap) => {
|
||||||
return vap.partType === "RAIN DEFENSE";
|
return vap.partType === "RAIN DEFENSE";
|
||||||
});
|
});
|
||||||
return rainDefenseIndex > -1 ? false : true;
|
|
||||||
},
|
},
|
||||||
showAddWipers() {
|
showAddWipers() { // if it's not found in the cart
|
||||||
const rainDefenseIndex = this.cart.findIndex((vap) => {
|
return !this.cart.some((vap) => {
|
||||||
return vap.partType.includes(" WIPER");
|
return vap.partType.includes(" WIPER");
|
||||||
});
|
});
|
||||||
return rainDefenseIndex > -1 ? false : true;
|
|
||||||
},
|
},
|
||||||
rainDefensePrice() {
|
rainDefensePrice() {
|
||||||
const lineItem = this.rainDefenseItem;
|
const lineItem = this.rainDefenseItem;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue