CSR-715 Fix validation

This commit is contained in:
Katie 2022-07-05 08:57:21 -04:00
parent 173f1b495b
commit 75b1640f70
3 changed files with 5 additions and 5 deletions

View file

@ -361,7 +361,7 @@ export default {
isWindshieldRepair() { isWindshieldRepair() {
if (!this.isWindshieldDamageLocation) return false; if (!this.isWindshieldDamageLocation) return false;
return this.selectedWindshieldOptions.selectedWindshieldDamageType.toUpperCase() === damageLocationsSelected.REPAIR; return this.selectedWindshieldOptions.selectedWindshieldDamageType.toUpperCase() === damageLocationsSelected.REPAIR.toUpperCase();
}, },
isDriverSideReplace() { isDriverSideReplace() {
if (!this.isSideDoorDamageLocation) return false; if (!this.isSideDoorDamageLocation) return false;

View file

@ -63,6 +63,7 @@
<script> <script>
import { useField } from "vee-validate"; import { useField } from "vee-validate";
import { toRef } from "vue";
import { queryStrings } from "@/constants/query-strings"; import { queryStrings } from "@/constants/query-strings";
export default { export default {
@ -177,7 +178,7 @@ export default {
}, },
selectedValues(newVal) { selectedValues(newVal) {
if (typeof newVal === "string") { if (typeof newVal === "string") {
this.handleChange(this.value); this.handleChange(newVal);
this.checkValue = newVal == this.value; this.checkValue = newVal == this.value;
} }
else if (newVal !== undefined) { else if (newVal !== undefined) {
@ -203,8 +204,8 @@ export default {
const { const {
handleChange, handleChange,
errors, errors,
} = useField(props.groupName, props.validationRules, fieldOptions); } = useField(toRef(props, "groupName"), toRef(props, "validationRules"), fieldOptions);
return { return {
handleChange, handleChange,
errors, errors,

View file

@ -24,7 +24,6 @@
</template> </template>
<script> <script>
import { toRefs } from "vue";
import { useField } from "vee-validate"; import { useField } from "vee-validate";
export default { export default {
name: "radio", name: "radio",