CSR-762 Split windshield
This commit is contained in:
parent
ccab154426
commit
ffe95e5fba
12 changed files with 28 additions and 32 deletions
|
|
@ -22,6 +22,7 @@
|
||||||
:role="isMultiSelect ? 'group' : 'radiogroup'"
|
:role="isMultiSelect ? 'group' : 'radiogroup'"
|
||||||
:aria-labelledby="formatString(groupName)"
|
:aria-labelledby="formatString(groupName)"
|
||||||
>
|
>
|
||||||
|
BQ selectOnKeypress: {{selectOnKeypress}}
|
||||||
<legend
|
<legend
|
||||||
class="sr-only"
|
class="sr-only"
|
||||||
:data-focus-target="formatString(groupName)"
|
:data-focus-target="formatString(groupName)"
|
||||||
|
|
@ -116,6 +117,7 @@ import listButtonHorizontal from "@/ux-components/list-button-horizontal/list-bu
|
||||||
import listCard from "@/ux-components/list-card/list-card";
|
import listCard from "@/ux-components/list-card/list-card";
|
||||||
import { ErrorMessage } from "vee-validate";
|
import { ErrorMessage } from "vee-validate";
|
||||||
import radio from "@/ux-components/radio/radio";
|
import radio from "@/ux-components/radio/radio";
|
||||||
|
import { bool } from "yup";
|
||||||
// import buttonWrap
|
// import buttonWrap
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
|
@ -152,7 +154,10 @@ export default {
|
||||||
suppressError: Boolean,
|
suppressError: Boolean,
|
||||||
useTextForValue: Boolean,
|
useTextForValue: Boolean,
|
||||||
valueToLogType: String,
|
valueToLogType: String,
|
||||||
selectOnKeypress: Boolean,
|
selectOnKeypress: {
|
||||||
|
type: Boolean,
|
||||||
|
default: true
|
||||||
|
},
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
getFieldSetClasses() {
|
getFieldSetClasses() {
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,8 @@
|
||||||
:for="buttonId"
|
:for="buttonId"
|
||||||
@mousedown.left="handleEventAction('click', $event)"
|
@mousedown.left="handleEventAction('click', $event)"
|
||||||
>
|
>
|
||||||
selectOnKeypress: {{ selectOnKeypress }}
|
<!-- IBW modelValue: {{ modelValue }} <br />
|
||||||
|
IBW value: {{value}} <br/> -->
|
||||||
<!-- classes: {{classes}}<br/>
|
<!-- classes: {{classes}}<br/>
|
||||||
value: {{value}} <br/>
|
value: {{value}} <br/>
|
||||||
modelValue: {{modelValue}} <br/>
|
modelValue: {{modelValue}} <br/>
|
||||||
|
|
@ -73,7 +74,10 @@ export default {
|
||||||
buttonWrapperClasses: [String, Array, Object],
|
buttonWrapperClasses: [String, Array, Object],
|
||||||
inputClasses: [String, Array, Object],
|
inputClasses: [String, Array, Object],
|
||||||
valueToLogType: String,
|
valueToLogType: String,
|
||||||
selectOnKeypress: Boolean,
|
selectOnKeypress: {
|
||||||
|
type: Boolean,
|
||||||
|
default: true
|
||||||
|
},
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
|
@ -82,11 +86,11 @@ export default {
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
console.log({
|
// console.log({
|
||||||
isChecked: this.isChecked,
|
// isChecked: this.isChecked,
|
||||||
modelValue: this.modelValue,
|
// modelValue: this.modelValue,
|
||||||
value: this.value,
|
// value: this.value,
|
||||||
});
|
// });
|
||||||
|
|
||||||
this.handleChange(this.modelValue);
|
this.handleChange(this.modelValue);
|
||||||
},
|
},
|
||||||
|
|
@ -100,24 +104,9 @@ export default {
|
||||||
|
|
||||||
console.log({
|
console.log({
|
||||||
handleKeypress: eventType,
|
handleKeypress: eventType,
|
||||||
hasFirstEventFired: this.hasFirstEventFired,
|
// hasFirstEventFired: this.hasFirstEventFired,
|
||||||
});
|
});
|
||||||
|
|
||||||
// switch (eventType) {
|
|
||||||
// case eventTypes.CLICK:
|
|
||||||
// case eventTypes.KEYPRESS_SUBMIT:
|
|
||||||
// console.log("clicking");
|
|
||||||
// this.hasFirstEventFired = true;
|
|
||||||
// this.handleClick(e);
|
|
||||||
// break;
|
|
||||||
// case eventTypes.CHANGE:
|
|
||||||
// console.log("selectOnKeypress: ", this.selectOnKeypress);
|
|
||||||
// this.hasFirstEventFired = false;
|
|
||||||
// this.selectOnKeypress
|
|
||||||
// ? this.handleClick(e)
|
|
||||||
// : this.handleSelectionChange(e);
|
|
||||||
// break;
|
|
||||||
// }
|
|
||||||
|
|
||||||
if (this.isMultiSelect) {
|
if (this.isMultiSelect) {
|
||||||
// if (true) {
|
// if (true) {
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="damage-location-question">
|
<div class="damage-location-question">
|
||||||
DLQ selectedValue: {{selectedValue}}
|
|
||||||
<buttonQuestion
|
<buttonQuestion
|
||||||
:questionText="questionText"
|
:questionText="questionText"
|
||||||
isMultiSelect
|
isMultiSelect
|
||||||
|
|
@ -9,7 +8,6 @@
|
||||||
buttonType="listCard"
|
buttonType="listCard"
|
||||||
isRequired
|
isRequired
|
||||||
v-model="selectedValue"
|
v-model="selectedValue"
|
||||||
:selectOnKeypress="true"
|
|
||||||
validationRules="damage-location-required"
|
validationRules="damage-location-required"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,8 @@
|
||||||
<template>
|
<template>
|
||||||
<transition name="fade" mode="out-in">
|
<transition name="fade" mode="out-in">
|
||||||
<div v-if="shouldDisplayReplaceOptionsQuestion" class="replace-options-question" :class="this.answersToDisplay.length < 2 ? 'd-none' : ''" aria-live="polite">
|
<div v-if="shouldDisplayReplaceOptionsQuestion" class="replace-options-question" :class="this.answersToDisplay.length < 2 ? 'd-none' : ''" aria-live="polite">
|
||||||
|
ROQ selectedValue: {{selectedValue}}<br/>
|
||||||
|
ROQ modelValue: {{modelValue}}
|
||||||
<buttonQuestion
|
<buttonQuestion
|
||||||
isWide
|
isWide
|
||||||
:questionText="questionText"
|
:questionText="questionText"
|
||||||
|
|
@ -25,7 +27,7 @@ import buttonQuestionWrapperMixin from "@/mixins/button-question-wrapper-mixin";
|
||||||
export default ({
|
export default ({
|
||||||
name: "replaceOptionsQuestion",
|
name: "replaceOptionsQuestion",
|
||||||
mixins: [buttonQuestionWrapperMixin],
|
mixins: [buttonQuestionWrapperMixin],
|
||||||
data(){
|
data() {
|
||||||
return {
|
return {
|
||||||
replaceOptions: [],
|
replaceOptions: [],
|
||||||
}
|
}
|
||||||
|
|
@ -49,7 +51,7 @@ export default ({
|
||||||
// UPDATE SELECTEDVALUES IF ONLY ONE ANSWER
|
// UPDATE SELECTEDVALUES IF ONLY ONE ANSWER
|
||||||
// ex: BackGlass stationary
|
// ex: BackGlass stationary
|
||||||
// console.log(this.answersToDisplay)
|
// console.log(this.answersToDisplay)
|
||||||
if(Array.isArray(this.answersToDisplay) && this.answersToDisplay.length === 1) {
|
if (Array.isArray(this.answersToDisplay) && this.answersToDisplay.length === 1) {
|
||||||
this.selectedValue = [this.answersToDisplay[0].Name];
|
this.selectedValue = [this.answersToDisplay[0].Name];
|
||||||
console.log("HIIIIII2", this.selectedValue)
|
console.log("HIIIIII2", this.selectedValue)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,6 @@
|
||||||
v-model="selectedValue"
|
v-model="selectedValue"
|
||||||
:suppressError="suppressError"
|
:suppressError="suppressError"
|
||||||
:validationRules="validationRules"
|
:validationRules="validationRules"
|
||||||
:selectOnKeypress="true"
|
|
||||||
isRequired
|
isRequired
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,6 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="windshield-options">
|
<div class="windshield-options">
|
||||||
selectedDamageLocations: {{ selectedDamageLocations }}
|
selectedDamageLocations: {{ selectedDamageLocations }}
|
||||||
selectedWindshieldDamageTypeValue: {{selectedWindshieldDamageTypeValue}}
|
|
||||||
<windshieldDamageTypeQuestion cmsWidgetName="WindshieldDamageTypeQuestion"
|
<windshieldDamageTypeQuestion cmsWidgetName="WindshieldDamageTypeQuestion"
|
||||||
:isAvailable="isWindshieldDamageLocation"
|
:isAvailable="isWindshieldDamageLocation"
|
||||||
:suppressError="hasRepairReplaceConflict || showNoReplacementAvailableError"
|
:suppressError="hasRepairReplaceConflict || showNoReplacementAvailableError"
|
||||||
|
|
@ -22,7 +21,7 @@
|
||||||
v-model="selectedWindshieldChipCountValues"
|
v-model="selectedWindshieldChipCountValues"
|
||||||
validationRules="windshield-chip-count-required"
|
validationRules="windshield-chip-count-required"
|
||||||
/>
|
/>
|
||||||
|
selectedWindshieldReplaceOptionsValues: {{selectedWindshieldReplaceOptionsValues}}
|
||||||
<replaceOptionsQuestion ref="replaceOptionsQuestion" cmsWidgetName="WindshieldReplaceOptionsQuestion"
|
<replaceOptionsQuestion ref="replaceOptionsQuestion" cmsWidgetName="WindshieldReplaceOptionsQuestion"
|
||||||
:isAvailable="isReplaceOptionSelected"
|
:isAvailable="isReplaceOptionSelected"
|
||||||
isMultiSelect
|
isMultiSelect
|
||||||
|
|
|
||||||
|
|
@ -8,6 +8,7 @@
|
||||||
groupName="ChooseVehicleMake"
|
groupName="ChooseVehicleMake"
|
||||||
textPosition="text-start"
|
textPosition="text-start"
|
||||||
v-model="selectedValue"
|
v-model="selectedValue"
|
||||||
|
:selectOnKeypress="true"
|
||||||
isRequired
|
isRequired
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
||||||
|
|
@ -8,6 +8,7 @@
|
||||||
groupName="ChooseVehicleModel"
|
groupName="ChooseVehicleModel"
|
||||||
textPosition="text-start"
|
textPosition="text-start"
|
||||||
v-model="selectedValue"
|
v-model="selectedValue"
|
||||||
|
:selectOnKeypress="true"
|
||||||
isRequired
|
isRequired
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
||||||
|
|
@ -8,6 +8,7 @@
|
||||||
groupName="ChooseVehicleStyle"
|
groupName="ChooseVehicleStyle"
|
||||||
textPosition="text-start"
|
textPosition="text-start"
|
||||||
v-model="selectedValue"
|
v-model="selectedValue"
|
||||||
|
:selectOnKeypress="true"
|
||||||
isRequired
|
isRequired
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
||||||
|
|
@ -9,6 +9,7 @@
|
||||||
groupName="ChooseVehicleYear"
|
groupName="ChooseVehicleYear"
|
||||||
textPosition="text-start"
|
textPosition="text-start"
|
||||||
v-model="selectedValue"
|
v-model="selectedValue"
|
||||||
|
:selectOnKeypress="true"
|
||||||
isRequired
|
isRequired
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -43,6 +43,7 @@ export default {
|
||||||
name: "listButtonHorizontal",
|
name: "listButtonHorizontal",
|
||||||
props: {
|
props: {
|
||||||
isMultiSelect: Boolean,
|
isMultiSelect: Boolean,
|
||||||
|
selectOnKeypress: Boolean,
|
||||||
groupName: String,
|
groupName: String,
|
||||||
buttonID: String,
|
buttonID: String,
|
||||||
buttonLabel: String,
|
buttonLabel: String,
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,6 @@
|
||||||
:selectOnKeypress="selectOnKeypress"
|
:selectOnKeypress="selectOnKeypress"
|
||||||
@change="handleAnswerChange"
|
@change="handleAnswerChange"
|
||||||
>
|
>
|
||||||
|
|
||||||
<!-- <div :class="{ 'h-100': !isWide }">
|
<!-- <div :class="{ 'h-100': !isWide }">
|
||||||
<div
|
<div
|
||||||
class="list-card w-100 rounded-3 d-flex align-items-center"
|
class="list-card w-100 rounded-3 d-flex align-items-center"
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue