removed license-plate-question and zip-question components
This commit is contained in:
parent
cc9311de21
commit
8370fc0b46
4 changed files with 26 additions and 97 deletions
|
|
@ -13,11 +13,23 @@
|
||||||
<licensePlateLookupAlerts
|
<licensePlateLookupAlerts
|
||||||
:activeAlertType="activeVehicleLookupAlertType"
|
:activeAlertType="activeVehicleLookupAlertType"
|
||||||
/>
|
/>
|
||||||
<licensePlateQuestion
|
<textboxQuestion
|
||||||
v-model="licensePlate"/>
|
cmsWidgetName="LicensePlateNumberQuestionWidget"
|
||||||
<zipQuestion
|
v-model="licensePlate"
|
||||||
|
isRequired
|
||||||
|
disableAutoFill
|
||||||
|
inputId="license-plate-question"
|
||||||
|
validationRules="license-plate-required"
|
||||||
|
/>
|
||||||
|
<textboxQuestion
|
||||||
|
cmsWidgetName="RegistrationZipQuestionWidget"
|
||||||
v-model="registrationZipCode"
|
v-model="registrationZipCode"
|
||||||
class="mt-4" />
|
isRequired
|
||||||
|
disableAutoFill
|
||||||
|
inputId="zip"
|
||||||
|
validationRules="zip-required|zip-format"
|
||||||
|
class="mt-4"
|
||||||
|
/>
|
||||||
<siteFooter
|
<siteFooter
|
||||||
:isForwardActionDisabled="!meta.valid"
|
:isForwardActionDisabled="!meta.valid"
|
||||||
cms-widget-name="SiteFooterWidget"
|
cms-widget-name="SiteFooterWidget"
|
||||||
|
|
@ -31,11 +43,13 @@
|
||||||
<script>
|
<script>
|
||||||
// Import Supporting Files
|
// Import Supporting Files
|
||||||
import { computed } from 'vue';
|
import { computed } from 'vue';
|
||||||
import { endpoints } from '@/constants/endpoints';
|
|
||||||
import vehicleLookupAlertTypes from '@/constants/vehicle-lookup-alert-types';
|
import vehicleLookupAlertTypes from '@/constants/vehicle-lookup-alert-types';
|
||||||
import { fetchCmsContentForPage } from '@/helpers/cms-content-helper';
|
import { fetchCmsContentForPage } from '@/helpers/cms-content-helper';
|
||||||
import { settleAllPromises } from '@/helpers/layout-helper';
|
import { settleAllPromises } from '@/helpers/layout-helper';
|
||||||
import { useMainStore } from '@/store';
|
import { useMainStore } from '@/store';
|
||||||
|
import { defineRule } from 'vee-validate';
|
||||||
|
import { regex, required } from '@/helpers/validation-rules';
|
||||||
|
import { errorMessages } from '@/constants/error-messages';
|
||||||
|
|
||||||
// Import Component
|
// Import Component
|
||||||
import baseFormMixin from '@/mixins/base-form-mixin';
|
import baseFormMixin from '@/mixins/base-form-mixin';
|
||||||
|
|
@ -45,10 +59,14 @@ import siteHeader from '@/common-components/site-header/site-header.vue';
|
||||||
import siteSubHeader from '@/common-components/site-sub-header/site-sub-header.vue';
|
import siteSubHeader from '@/common-components/site-sub-header/site-sub-header.vue';
|
||||||
import vehicleBanner from '@/common-components/vehicle-banner/vehicle-banner.vue';
|
import vehicleBanner from '@/common-components/vehicle-banner/vehicle-banner.vue';
|
||||||
import textboxQuestion from '@/common-components/textbox-question/textbox-question.vue';
|
import textboxQuestion from '@/common-components/textbox-question/textbox-question.vue';
|
||||||
import licensePlateQuestion from '@/layouts/license-plate-lookup/license-plate-question/license-plate-question.vue';
|
|
||||||
import zipQuestion from '@/layouts/license-plate-lookup/zip-question/zip-question.vue';
|
|
||||||
import licensePlateLookupAlerts from '@/layouts/license-plate-lookup/license-plate-lookup-alerts/license-plate-lookup-alerts.vue';
|
import licensePlateLookupAlerts from '@/layouts/license-plate-lookup/license-plate-lookup-alerts/license-plate-lookup-alerts.vue';
|
||||||
|
|
||||||
|
// Define Validation Rules
|
||||||
|
defineRule("license-plate-required", required(errorMessages.LICENSE_PLATE_REQUIRED));
|
||||||
|
defineRule("zip-required", required(errorMessages.REGISTRATION_ZIP_REQUIRED));
|
||||||
|
defineRule("zip-format", regex(/(^\d{5}$)|(^\d{5}-\d{4}$)/, errorMessages.ZIP_FORMAT));
|
||||||
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'license-plate-lookup',
|
name: 'license-plate-lookup',
|
||||||
mixins: [baseFormMixin],
|
mixins: [baseFormMixin],
|
||||||
|
|
@ -59,8 +77,6 @@ export default {
|
||||||
siteSubHeader,
|
siteSubHeader,
|
||||||
vehicleBanner,
|
vehicleBanner,
|
||||||
textboxQuestion,
|
textboxQuestion,
|
||||||
licensePlateQuestion,
|
|
||||||
zipQuestion,
|
|
||||||
licensePlateLookupAlerts
|
licensePlateLookupAlerts
|
||||||
},
|
},
|
||||||
setup() {
|
setup() {
|
||||||
|
|
|
||||||
|
|
@ -1,43 +0,0 @@
|
||||||
<template>
|
|
||||||
<textboxQuestion
|
|
||||||
inputId="license-plate-question"
|
|
||||||
cmsWidgetName="LicensePlateNumberQuestionWidget"
|
|
||||||
v-model="licensePlate"
|
|
||||||
isRequired
|
|
||||||
disableAutoFill
|
|
||||||
validationRules="license-plate-required"
|
|
||||||
/>
|
|
||||||
</template>
|
|
||||||
<script>
|
|
||||||
// Import Other Supporting File(s)
|
|
||||||
import { defineRule } from 'vee-validate';
|
|
||||||
import { required } from '@/helpers/validation-rules';
|
|
||||||
import { errorMessages } from '@/constants/error-messages';
|
|
||||||
|
|
||||||
// Import Component(s)
|
|
||||||
import textboxQuestion from '@/common-components/textbox-question/textbox-question.vue';
|
|
||||||
|
|
||||||
defineRule("license-plate-required", required(errorMessages.LICENSE_PLATE_REQUIRED));
|
|
||||||
|
|
||||||
export default {
|
|
||||||
name: 'license-plate-question',
|
|
||||||
props: {
|
|
||||||
modelValue: String,
|
|
||||||
},
|
|
||||||
emits: ['update:modelValue'],
|
|
||||||
components: {
|
|
||||||
textboxQuestion,
|
|
||||||
},
|
|
||||||
computed: {
|
|
||||||
licensePlate: {
|
|
||||||
get() {
|
|
||||||
return this.modelValue;
|
|
||||||
},
|
|
||||||
set(newValue) {
|
|
||||||
this.$emit('update:modelValue', newValue);
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
};
|
|
||||||
</script>
|
|
||||||
|
|
||||||
|
|
@ -1,44 +0,0 @@
|
||||||
<template>
|
|
||||||
<textboxQuestion
|
|
||||||
inputId="zip"
|
|
||||||
cmsWidgetName="RegistrationZipQuestionWidget"
|
|
||||||
v-model="registrationZipCode"
|
|
||||||
isRequired
|
|
||||||
disableAutoFill
|
|
||||||
validationRules="zip-required|zip-format"
|
|
||||||
/>
|
|
||||||
</template>
|
|
||||||
<script>
|
|
||||||
// Import Other Supporting File(s)
|
|
||||||
import { defineRule } from 'vee-validate';
|
|
||||||
import { regex, required } from '@/helpers/validation-rules';
|
|
||||||
import { errorMessages } from '@/constants/error-messages';
|
|
||||||
|
|
||||||
// Import Component(s)
|
|
||||||
import textboxQuestion from '@/common-components/textbox-question/textbox-question.vue';
|
|
||||||
|
|
||||||
defineRule("zip-required", required(errorMessages.REGISTRATION_ZIP_REQUIRED));
|
|
||||||
defineRule("zip-format", regex(/(^\d{5}$)|(^\d{5}-\d{4}$)/, errorMessages.ZIP_FORMAT));
|
|
||||||
|
|
||||||
export default {
|
|
||||||
name: 'zip-question',
|
|
||||||
props: {
|
|
||||||
modelValue: String,
|
|
||||||
},
|
|
||||||
emits: ['update:modelValue'],
|
|
||||||
components: {
|
|
||||||
textboxQuestion,
|
|
||||||
},
|
|
||||||
computed: {
|
|
||||||
registrationZipCode: {
|
|
||||||
get() {
|
|
||||||
return this.modelValue;
|
|
||||||
},
|
|
||||||
set(newValue) {
|
|
||||||
this.$emit('update:modelValue', newValue);
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
};
|
|
||||||
</script>
|
|
||||||
|
|
||||||
|
|
@ -239,7 +239,7 @@ export const useMainStore = defineStore({
|
||||||
endpoint: endpoints.LookupVinByPlate.url,
|
endpoint: endpoints.LookupVinByPlate.url,
|
||||||
payload: {
|
payload: {
|
||||||
licensePlate: licensePlate,
|
licensePlate: licensePlate,
|
||||||
licenseState: "IL" // hard coded until Welcome Page is complete and license state can be pulled from store
|
licenseState: "IL", // hard coded until Welcome Page is complete and license state can be pulled from store
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue