CSR-254: refactoring, restored commented out test code

This commit is contained in:
Adam Caouette 2022-02-11 17:12:28 -05:00
parent 18a3641a54
commit 3838316699
4 changed files with 6 additions and 10 deletions

View file

@ -68,15 +68,13 @@ export default ({
} }
}, },
answersToDisplay(){ answersToDisplay(){
const data = Array.isArray(this.answersFromCms) return Array.isArray(this.answersFromCms)
? this.answersFromCms.filter(ans => ? this.answersFromCms.filter(ans =>
{ {
const name = ans.Name.split('-'); const name = ans.Name.split('-');
return name[0].toUpperCase() === store.getters.vehicle.category && this.damageOptionsMap[name[1]]; return name[0].toUpperCase() === store.getters.vehicle.category && this.damageOptionsMap[name[1]];
}) })
: []; : [];
console.log('data: ', data);
return data;
}, },
}, },
components: { components: {

View file

@ -74,9 +74,9 @@ const routes = [
.filter((x) => x.name === routeData[0].name)[0] .filter((x) => x.name === routeData[0].name)[0]
.components.default(); .components.default();
// if (!arePagePrerequisitesValid(nextComponent)) { if (!arePagePrerequisitesValid(nextComponent)) {
// await GoToFunnelStartOn404(next); await GoToFunnelStartOn404(next);
// } }
// Assign current query string parameters, as well as our fmgPage one. // Assign current query string parameters, as well as our fmgPage one.
next({ next({

View file

@ -48,7 +48,6 @@
</template> </template>
<script> <script>
import { toRefs } from "vue";
import { useField } from "vee-validate"; import { useField } from "vee-validate";
export default { export default {
@ -107,17 +106,16 @@ export default {
} }
}, },
setup(props) { setup(props) {
const { groupName, value } = toRefs(props);
const inputType = props.isMultiSelect ? "checkbox" : "radio"; const inputType = props.isMultiSelect ? "checkbox" : "radio";
const { const {
value: inputValue, value: inputValue,
handleChange, handleChange,
errors, errors,
} = useField(groupName, props.validationRules, } = useField(props.groupName, props.validationRules,
{ {
type: inputType, type: inputType,
checkedValue: value, checkedValue: props.value,
}); });
return { return {
handleChange, handleChange,