Merge pull request #885 from Safelite/feature/CSR-731
CSR-731 & CSR-689
This commit is contained in:
commit
e01d2c5711
4 changed files with 19 additions and 19 deletions
|
|
@ -1,6 +1,9 @@
|
||||||
<template>
|
<template>
|
||||||
<label
|
<label
|
||||||
:class="[buttonWrapperClasses, { 'has-error': errors.length > 0, selected: isChecked }]"
|
:class="[
|
||||||
|
buttonWrapperClasses,
|
||||||
|
{ 'has-error': errors.length > 0 && !suppressError, selected: isChecked },
|
||||||
|
]"
|
||||||
:for="buttonId"
|
:for="buttonId"
|
||||||
@focusin="handleFocus"
|
@focusin="handleFocus"
|
||||||
@focusout="handleBlur"
|
@focusout="handleBlur"
|
||||||
|
|
|
||||||
|
|
@ -27,4 +27,5 @@ export const inputButtonProps = {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: false,
|
default: false,
|
||||||
},
|
},
|
||||||
|
suppressError: Boolean,
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -51,6 +51,7 @@
|
||||||
:additionalButtonStyling="additionalButtonStyling"
|
:additionalButtonStyling="additionalButtonStyling"
|
||||||
:lastValuePushedToGa="lastValuePushedToGa"
|
:lastValuePushedToGa="lastValuePushedToGa"
|
||||||
:setLastValuePushedToGa="setLastValuePushedToGa"
|
:setLastValuePushedToGa="setLastValuePushedToGa"
|
||||||
|
:suppressError="suppressError"
|
||||||
v-model="selectedValues" />
|
v-model="selectedValues" />
|
||||||
<!-- For nested questions -->
|
<!-- For nested questions -->
|
||||||
<transition name="fade" mode="out-in">
|
<transition name="fade" mode="out-in">
|
||||||
|
|
|
||||||
|
|
@ -118,29 +118,24 @@ export default {
|
||||||
},
|
},
|
||||||
rearWiperApplicableForTierThree() {
|
rearWiperApplicableForTierThree() {
|
||||||
const rearWiperIsAvailable = this.lineItemsContainsPartType(partTypeStrings.REAR_WIPER);
|
const rearWiperIsAvailable = this.lineItemsContainsPartType(partTypeStrings.REAR_WIPER);
|
||||||
return (
|
|
||||||
this.glassToReplaceContainsGlassLocation(glassLocations.REAR) &&
|
|
||||||
rearWiperIsAvailable
|
|
||||||
);
|
|
||||||
},
|
|
||||||
rainDefenseApplicableForTierThree() {
|
|
||||||
const frontWipersAreAvailable = this.lineItemsContainsPartType(
|
const frontWipersAreAvailable = this.lineItemsContainsPartType(
|
||||||
partTypeStrings.FRONT_WIPER
|
partTypeStrings.FRONT_WIPER
|
||||||
);
|
);
|
||||||
const glassToReplaceContainsWindshield = this.glassToReplaceContainsGlassLocation(
|
return (
|
||||||
glassLocations.WINDSHIELD
|
rearWiperIsAvailable &&
|
||||||
|
(this.glassToReplaceContainsGlassLocation(glassLocations.REAR) ||
|
||||||
|
!frontWipersAreAvailable)
|
||||||
);
|
);
|
||||||
const glassToReplaceContainsRearGlass = this.glassToReplaceContainsGlassLocation(
|
},
|
||||||
glassLocations.REAR
|
rainDefenseApplicableForTierThree() {
|
||||||
);
|
if (
|
||||||
if (this.frontWipersApplicableForTierTwo) {
|
this.rearWiperApplicableForTierTwo &&
|
||||||
return true;
|
!this.frontWipersApplicableForTierTwo &&
|
||||||
} else if (!frontWipersAreAvailable) {
|
this.frontWipersApplicableForTierThree
|
||||||
return true;
|
) {
|
||||||
} else if (!glassToReplaceContainsWindshield && !glassToReplaceContainsRearGlass) {
|
|
||||||
return true;
|
|
||||||
} else {
|
|
||||||
return false;
|
return false;
|
||||||
|
} else {
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
shouldDisplayTierTwoPackage() {
|
shouldDisplayTierTwoPackage() {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue