CSR-731 | Fixing package creation logic + styling defect

Styling defect is for CSR-986
This commit is contained in:
Scott Kiener 2022-12-19 11:49:32 -05:00
parent 8357e14023
commit 8b8709d1d8
6 changed files with 22 additions and 20 deletions

View file

@ -1,6 +1,9 @@
<template>
<label
:class="[buttonWrapperClasses, { 'has-error': errors.length > 0, selected: isChecked }]"
:class="[
buttonWrapperClasses,
{ 'has-error': errors.length > 0 && !suppressError, selected: isChecked },
]"
:for="buttonId"
@focusin="handleFocus"
@focusout="handleBlur"

View file

@ -27,4 +27,5 @@ export const inputButtonProps = {
type: Boolean,
default: false,
},
suppressError: Boolean,
};

View file

@ -51,6 +51,7 @@
:additionalButtonStyling="additionalButtonStyling"
:lastValuePushedToGa="lastValuePushedToGa"
:setLastValuePushedToGa="setLastValuePushedToGa"
:suppressError="suppressError"
v-model="selectedValues" />
<!-- For nested questions -->
<transition name="fade" mode="out-in">

View file

@ -118,29 +118,24 @@ export default {
},
rearWiperApplicableForTierThree() {
const rearWiperIsAvailable = this.lineItemsContainsPartType(partTypeStrings.REAR_WIPER);
return (
this.glassToReplaceContainsGlassLocation(glassLocations.REAR) &&
rearWiperIsAvailable
);
},
rainDefenseApplicableForTierThree() {
const frontWipersAreAvailable = this.lineItemsContainsPartType(
partTypeStrings.FRONT_WIPER
);
const glassToReplaceContainsWindshield = this.glassToReplaceContainsGlassLocation(
glassLocations.WINDSHIELD
return (
rearWiperIsAvailable &&
(this.glassToReplaceContainsGlassLocation(glassLocations.REAR) ||
!frontWipersAreAvailable)
);
const glassToReplaceContainsRearGlass = this.glassToReplaceContainsGlassLocation(
glassLocations.REAR
);
if (this.frontWipersApplicableForTierTwo) {
return true;
} else if (!frontWipersAreAvailable) {
return true;
} else if (!glassToReplaceContainsWindshield && !glassToReplaceContainsRearGlass) {
return true;
} else {
},
rainDefenseApplicableForTierThree() {
if (
this.rearWiperApplicableForTierTwo &&
!this.frontWipersApplicableForTierTwo &&
this.frontWipersApplicableForTierThree
) {
return false;
} else {
return true;
}
},
shouldDisplayTierTwoPackage() {

View file

@ -22,6 +22,7 @@ export default {
screenReaderOnlyText: String,
isWide: Boolean,
additionalButtonStyling: String,
suppressError: Boolean,
},
computed: {
selectedValue: {

View file

@ -5,7 +5,8 @@
'list-card w-100 rounded-3 d-flex align-items-center h-100 base-input-button',
{ horizontal: isWide },
]"
v-model="selectedValue">
v-model="selectedValue"
:suppressError="suppressError">
<div
class="d-flex w-100 align-items-center px-2 h-100 list-card-content button-content rounded-3"
:class="labelClasses">