Merge pull request #616 from Safelite/defect/CSR-734
CSR-734 Fix validation rule
This commit is contained in:
commit
892bb6bf40
3 changed files with 6 additions and 7 deletions
|
|
@ -17,7 +17,6 @@
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import buttonQuestion from "@/common-components/button-question/button-question";
|
import buttonQuestion from "@/common-components/button-question/button-question";
|
||||||
import store from "@/store";
|
|
||||||
|
|
||||||
export default ({
|
export default ({
|
||||||
name: "windshieldDamageTypeQuestion",
|
name: "windshieldDamageTypeQuestion",
|
||||||
|
|
|
||||||
|
|
@ -55,7 +55,7 @@ defineRule("windshield-damage-type-required", required(errorMessages.WINDSHIELD_
|
||||||
defineRule("windshield-chip-count-required", required(errorMessages.WINDSHIELD_CHIP_COUNT_REQUIRED));
|
defineRule("windshield-chip-count-required", required(errorMessages.WINDSHIELD_CHIP_COUNT_REQUIRED));
|
||||||
defineRule("windshield-replace-options-required", required(errorMessages.WINSHIELD_REPLACE_OPTIONS_REQUIRED));
|
defineRule("windshield-replace-options-required", required(errorMessages.WINSHIELD_REPLACE_OPTIONS_REQUIRED));
|
||||||
|
|
||||||
defineRule("check-for-repair-and-replace", (selectedWindshieldDamageType, [selectedDamageLocations]) => {
|
defineRule("check-for-repair-and-replace", (selectedWindshieldDamageType, selectedDamageLocations) => {
|
||||||
return selectedWindshieldDamageType.toString() != damageLocationsSelected.REPAIR ||
|
return selectedWindshieldDamageType.toString() != damageLocationsSelected.REPAIR ||
|
||||||
!selectedDamageLocations.includes(damageLocationsSelected.WINDSHIELD) ||
|
!selectedDamageLocations.includes(damageLocationsSelected.WINDSHIELD) ||
|
||||||
selectedDamageLocations.length === 1;
|
selectedDamageLocations.length === 1;
|
||||||
|
|
|
||||||
|
|
@ -7,11 +7,11 @@
|
||||||
isWide ? 'horizontal' : '',
|
isWide ? 'horizontal' : '',
|
||||||
(errors.length > 0 || hasError) ? 'has-error' : '',
|
(errors.length > 0 || hasError) ? 'has-error' : '',
|
||||||
]"
|
]"
|
||||||
@keyup.space="triggerButton()"
|
@keyup.space="triggerButton"
|
||||||
@keyup.up="handleKeyupArrow()"
|
@keyup.up="handleKeyupArrow"
|
||||||
@keyup.down="handleKeyupArrow()"
|
@keyup.down="handleKeyupArrow"
|
||||||
@keyup.left="handleKeyupArrow()"
|
@keyup.left="handleKeyupArrow"
|
||||||
@keyup.right="handleKeyupArrow()"
|
@keyup.right="handleKeyupArrow"
|
||||||
>
|
>
|
||||||
<input
|
<input
|
||||||
:type="isMultiSelect ? 'checkbox' : 'radio'"
|
:type="isMultiSelect ? 'checkbox' : 'radio'"
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue