CSR-731 | Fixing package creation logic + styling defect
Styling defect is for CSR-986
This commit is contained in:
parent
8357e14023
commit
8b8709d1d8
6 changed files with 22 additions and 20 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() {
|
||||||
|
|
|
||||||
|
|
@ -22,6 +22,7 @@ export default {
|
||||||
screenReaderOnlyText: String,
|
screenReaderOnlyText: String,
|
||||||
isWide: Boolean,
|
isWide: Boolean,
|
||||||
additionalButtonStyling: String,
|
additionalButtonStyling: String,
|
||||||
|
suppressError: Boolean,
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
selectedValue: {
|
selectedValue: {
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,8 @@
|
||||||
'list-card w-100 rounded-3 d-flex align-items-center h-100 base-input-button',
|
'list-card w-100 rounded-3 d-flex align-items-center h-100 base-input-button',
|
||||||
{ horizontal: isWide },
|
{ horizontal: isWide },
|
||||||
]"
|
]"
|
||||||
v-model="selectedValue">
|
v-model="selectedValue"
|
||||||
|
:suppressError="suppressError">
|
||||||
<div
|
<div
|
||||||
class="d-flex w-100 align-items-center px-2 h-100 list-card-content button-content rounded-3"
|
class="d-flex w-100 align-items-center px-2 h-100 list-card-content button-content rounded-3"
|
||||||
:class="labelClasses">
|
:class="labelClasses">
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue