updated vinlookupmethod constant
updated vin lookup method constant file
This commit is contained in:
parent
1ed1561598
commit
ed405fd19b
4 changed files with 13 additions and 13 deletions
|
|
@ -1,7 +1,7 @@
|
||||||
const VIN_LOOKUP_METHODS = Object.freeze({
|
const vinLookupMethodSelections = Object.freeze({
|
||||||
manualVin: 'ManualVin',
|
MANUALVIN: 'ManualVin',
|
||||||
licensePlate: 'LicensePlate',
|
LICENSEPLATE: 'LicensePlate',
|
||||||
homeAddress: 'HomeAddress',
|
HOMEADDRESS: 'HomeAddress',
|
||||||
});
|
});
|
||||||
|
|
||||||
export default VIN_LOOKUP_METHODS;
|
export {vinLookupMethodSelections};
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@ import { issPageValues } from '@/router/router-constants/issPage-values';
|
||||||
import { queryStrings } from '@/constants/query-strings';
|
import { queryStrings } from '@/constants/query-strings';
|
||||||
import { GaActions } from "@/constants/analytics";
|
import { GaActions } from "@/constants/analytics";
|
||||||
import VehicleLookup from './vehicle-lookup.vue';
|
import VehicleLookup from './vehicle-lookup.vue';
|
||||||
import vinLookupMethods from '@/constants/vin-lookup-methods';
|
import {vinLookupMethodSelections} from '@/constants/vin-lookup-methods';
|
||||||
|
|
||||||
const vinLookupMethodsMockData = {
|
const vinLookupMethodsMockData = {
|
||||||
QuestionText: 'To find the right part, let’s get your VIN. Or we can look it up for you!',
|
QuestionText: 'To find the right part, let’s get your VIN. Or we can look it up for you!',
|
||||||
|
|
@ -121,7 +121,7 @@ describe('vehicle-lookup.vue', () => {
|
||||||
// Not using initializeComponent() because it doesn't trigger reactivity in test.
|
// Not using initializeComponent() because it doesn't trigger reactivity in test.
|
||||||
const Answers = JSON.parse(JSON.stringify(vinLookupMethodsMockData.Answers));
|
const Answers = JSON.parse(JSON.stringify(vinLookupMethodsMockData.Answers));
|
||||||
if(!mockIsVinbyAddressPermissibleToBeFalse.IsVinbyAddressPermissible){
|
if(!mockIsVinbyAddressPermissibleToBeFalse.IsVinbyAddressPermissible){
|
||||||
Answers.splice(Answers.indexOf(vinLookupMethods.homeAddress),1);
|
Answers.splice(Answers.indexOf(vinLookupMethodSelections.HOMEADDRESS),1);
|
||||||
}
|
}
|
||||||
vinLookupMethodsWrapper.setData({
|
vinLookupMethodsWrapper.setData({
|
||||||
questionTextFromCms: vinLookupMethodsMockData.QuestionText,
|
questionTextFromCms: vinLookupMethodsMockData.QuestionText,
|
||||||
|
|
|
||||||
|
|
@ -38,7 +38,7 @@ import { fetchCmsContentForPage } from '@/helpers/cms-content-helper';
|
||||||
import { settleAllPromises } from '@/helpers/layout-helper';
|
import { settleAllPromises } from '@/helpers/layout-helper';
|
||||||
import { Form } from 'vee-validate';
|
import { Form } from 'vee-validate';
|
||||||
import BaseFormMixin from '@/mixins/base-form-mixin';
|
import BaseFormMixin from '@/mixins/base-form-mixin';
|
||||||
import constVinLookupMethods from '@/constants/vin-lookup-methods';
|
import {vinLookupMethodSelections} from '@/constants/vin-lookup-methods';
|
||||||
|
|
||||||
// Import Component
|
// Import Component
|
||||||
import SiteFooter from '@/iss-components/site-footer/site-footer.vue';
|
import SiteFooter from '@/iss-components/site-footer/site-footer.vue';
|
||||||
|
|
@ -98,13 +98,13 @@ export default {
|
||||||
},
|
},
|
||||||
forwardButtonAction() {
|
forwardButtonAction() {
|
||||||
switch (this.selectedVinLookupMethod) {
|
switch (this.selectedVinLookupMethod) {
|
||||||
case constVinLookupMethods.manualVin:
|
case vinLookupMethodSelections.MANUALVIN:
|
||||||
this.$router.navigate(this.navigationScenarios.SELECTED_MANUAL_VIN, this.$route);
|
this.$router.navigate(this.navigationScenarios.SELECTED_MANUAL_VIN, this.$route);
|
||||||
break;
|
break;
|
||||||
case constVinLookupMethods.licensePlate:
|
case vinLookupMethodSelections.LICENSEPLATE:
|
||||||
this.$router.navigate(this.navigationScenarios.SELECTED_LICENSE_PLATE, this.$route);
|
this.$router.navigate(this.navigationScenarios.SELECTED_LICENSE_PLATE, this.$route);
|
||||||
break;
|
break;
|
||||||
case constVinLookupMethods.homeAddress:
|
case vinLookupMethodSelections.HOMEADDRESS:
|
||||||
this.$router.navigate(this.navigationScenarios.SELECTED_HOME_ADDRESS, this.$route);
|
this.$router.navigate(this.navigationScenarios.SELECTED_HOME_ADDRESS, this.$route);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,7 @@ import { defineRule } from 'vee-validate';
|
||||||
import { required } from '@/helpers/validation-rules';
|
import { required } from '@/helpers/validation-rules';
|
||||||
import { errorMessages } from '@/constants/error-messages';
|
import { errorMessages } from '@/constants/error-messages';
|
||||||
import { useMainStore } from "@/store";
|
import { useMainStore } from "@/store";
|
||||||
import vinLookupMethods from '@/constants/vin-lookup-methods';
|
import {vinLookupMethodSelections} from '@/constants/vin-lookup-methods';
|
||||||
import { settleAllPromises } from "@/helpers/layout-helper";
|
import { settleAllPromises } from "@/helpers/layout-helper";
|
||||||
|
|
||||||
// Import Component
|
// Import Component
|
||||||
|
|
@ -64,7 +64,7 @@ export default {
|
||||||
const answers = this.getCmsContent(this.cmsWidgetName, 'Answers');
|
const answers = this.getCmsContent(this.cmsWidgetName, 'Answers');
|
||||||
if (Array.isArray(answers)) {
|
if (Array.isArray(answers)) {
|
||||||
if(!isVinbyAddressPermissible){
|
if(!isVinbyAddressPermissible){
|
||||||
answers.splice(answers.indexOf(vinLookupMethods.homeAddress),1);
|
answers.splice(answers.indexOf(vinLookupMethodSelections.HOMEADDRESS),1);
|
||||||
}
|
}
|
||||||
this.answersFromCms = answers;
|
this.answersFromCms = answers;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue