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() {
|
||||
return this.showAddRainDefense || this.showAddWipers;
|
||||
},
|
||||
showAddRainDefense() {
|
||||
const rainDefenseIndex = this.cart.findIndex((vap) => {
|
||||
showAddRainDefense() { // if it's not found in the cart
|
||||
return !this.cart.some((vap) => {
|
||||
return vap.partType === "RAIN DEFENSE";
|
||||
});
|
||||
return rainDefenseIndex > -1 ? false : true;
|
||||
},
|
||||
showAddWipers() {
|
||||
const rainDefenseIndex = this.cart.findIndex((vap) => {
|
||||
showAddWipers() { // if it's not found in the cart
|
||||
return !this.cart.some((vap) => {
|
||||
return vap.partType.includes(" WIPER");
|
||||
});
|
||||
return rainDefenseIndex > -1 ? false : true;
|
||||
},
|
||||
rainDefensePrice() {
|
||||
const lineItem = this.rainDefenseItem;
|
||||
|
|
|
|||
Loading…
Reference in a new issue