Merge branch 'develop' into feature/humphries/INSR-7768
This commit is contained in:
commit
6ab72ca634
5 changed files with 212 additions and 68 deletions
145
package-lock.json
generated
145
package-lock.json
generated
|
|
@ -67,7 +67,7 @@
|
|||
"typescript-eslint": "^8.11.0",
|
||||
"vite": "^6.4.1",
|
||||
"vitest": "^3.2.4",
|
||||
"volar-service-vetur": "latest",
|
||||
"volar-service-vetur": "*",
|
||||
"wait-on": "^8.0.2"
|
||||
}
|
||||
},
|
||||
|
|
@ -7288,6 +7288,23 @@
|
|||
"node": ">= 0.4"
|
||||
}
|
||||
},
|
||||
"node_modules/call-bound": {
|
||||
"version": "1.0.4",
|
||||
"resolved": "https://registry.npmjs.org/call-bound/-/call-bound-1.0.4.tgz",
|
||||
"integrity": "sha512-+ys997U96po4Kx/ABpBCqhA9EuxJaQWDQg7295H4hBphv3IZg0boBKuwYpt4YXp6MZ5AmZQnU/tyMTlRpaSejg==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"call-bind-apply-helpers": "^1.0.2",
|
||||
"get-intrinsic": "^1.3.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
},
|
||||
"node_modules/callsites": {
|
||||
"version": "3.1.0",
|
||||
"resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz",
|
||||
|
|
@ -10376,39 +10393,40 @@
|
|||
}
|
||||
},
|
||||
"node_modules/express": {
|
||||
"version": "4.21.2",
|
||||
"resolved": "https://registry.npmjs.org/express/-/express-4.21.2.tgz",
|
||||
"integrity": "sha512-28HqgMZAmih1Czt9ny7qr6ek2qddF4FclbMzwhCREB6OFfH+rXAnuNCwo1/wFvrtbgsQDb4kSbX9de9lFbrXnA==",
|
||||
"version": "4.22.1",
|
||||
"resolved": "https://registry.npmjs.org/express/-/express-4.22.1.tgz",
|
||||
"integrity": "sha512-F2X8g9P1X7uCPZMA3MVf9wcTqlyNp7IhH5qPCI0izhaOIYXaW9L535tGA3qmjRzpH+bZczqq7hVKxTR4NWnu+g==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"accepts": "~1.3.8",
|
||||
"array-flatten": "1.1.1",
|
||||
"body-parser": "1.20.3",
|
||||
"content-disposition": "0.5.4",
|
||||
"body-parser": "~1.20.3",
|
||||
"content-disposition": "~0.5.4",
|
||||
"content-type": "~1.0.4",
|
||||
"cookie": "0.7.1",
|
||||
"cookie-signature": "1.0.6",
|
||||
"cookie": "~0.7.1",
|
||||
"cookie-signature": "~1.0.6",
|
||||
"debug": "2.6.9",
|
||||
"depd": "2.0.0",
|
||||
"encodeurl": "~2.0.0",
|
||||
"escape-html": "~1.0.3",
|
||||
"etag": "~1.8.1",
|
||||
"finalhandler": "1.3.1",
|
||||
"fresh": "0.5.2",
|
||||
"http-errors": "2.0.0",
|
||||
"finalhandler": "~1.3.1",
|
||||
"fresh": "~0.5.2",
|
||||
"http-errors": "~2.0.0",
|
||||
"merge-descriptors": "1.0.3",
|
||||
"methods": "~1.1.2",
|
||||
"on-finished": "2.4.1",
|
||||
"on-finished": "~2.4.1",
|
||||
"parseurl": "~1.3.3",
|
||||
"path-to-regexp": "0.1.12",
|
||||
"path-to-regexp": "~0.1.12",
|
||||
"proxy-addr": "~2.0.7",
|
||||
"qs": "6.13.0",
|
||||
"qs": "~6.14.0",
|
||||
"range-parser": "~1.2.1",
|
||||
"safe-buffer": "5.2.1",
|
||||
"send": "0.19.0",
|
||||
"serve-static": "1.16.2",
|
||||
"send": "~0.19.0",
|
||||
"serve-static": "~1.16.2",
|
||||
"setprototypeof": "1.2.0",
|
||||
"statuses": "2.0.1",
|
||||
"statuses": "~2.0.1",
|
||||
"type-is": "~1.6.18",
|
||||
"utils-merge": "1.0.1",
|
||||
"vary": "~1.1.2"
|
||||
|
|
@ -10442,6 +10460,22 @@
|
|||
"integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/express/node_modules/qs": {
|
||||
"version": "6.14.1",
|
||||
"resolved": "https://registry.npmjs.org/qs/-/qs-6.14.1.tgz",
|
||||
"integrity": "sha512-4EK3+xJl8Ts67nLYNwqw/dsFVnCf+qR7RgXSK9jEEm9unao3njwMDdmsdvoKBKHzxd7tCYz5e5M+SnMjdtXGQQ==",
|
||||
"dev": true,
|
||||
"license": "BSD-3-Clause",
|
||||
"dependencies": {
|
||||
"side-channel": "^1.1.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=0.6"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
},
|
||||
"node_modules/express/node_modules/safe-buffer": {
|
||||
"version": "5.2.1",
|
||||
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz",
|
||||
|
|
@ -16728,10 +16762,11 @@
|
|||
}
|
||||
},
|
||||
"node_modules/object-inspect": {
|
||||
"version": "1.13.2",
|
||||
"resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.2.tgz",
|
||||
"integrity": "sha512-IRZSRuzJiynemAXPYtPe5BoI/RESNYR7TYm50MC5Mqbd3Jmw5y790sErYw3V6SryFJD64b74qQQs9wn5Bg/k3g==",
|
||||
"version": "1.13.4",
|
||||
"resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.4.tgz",
|
||||
"integrity": "sha512-W67iLl4J2EXEGTbfeHCffrjDfitvLANg0UlX3wFUUSTx92KXRFegMHUVgSqE+wvhAbi4WqjGg9czysTV2Epbew==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
},
|
||||
|
|
@ -19110,15 +19145,73 @@
|
|||
}
|
||||
},
|
||||
"node_modules/side-channel": {
|
||||
"version": "1.0.6",
|
||||
"resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.6.tgz",
|
||||
"integrity": "sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA==",
|
||||
"version": "1.1.0",
|
||||
"resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.1.0.tgz",
|
||||
"integrity": "sha512-ZX99e6tRweoUXqR+VBrslhda51Nh5MTQwou5tnUDgbtyM0dBgmhEDtWGP/xbKn6hqfPRHujUNwz5fy/wbbhnpw==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"call-bind": "^1.0.7",
|
||||
"es-errors": "^1.3.0",
|
||||
"get-intrinsic": "^1.2.4",
|
||||
"object-inspect": "^1.13.1"
|
||||
"object-inspect": "^1.13.3",
|
||||
"side-channel-list": "^1.0.0",
|
||||
"side-channel-map": "^1.0.1",
|
||||
"side-channel-weakmap": "^1.0.2"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
},
|
||||
"node_modules/side-channel-list": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/side-channel-list/-/side-channel-list-1.0.0.tgz",
|
||||
"integrity": "sha512-FCLHtRD/gnpCiCHEiJLOwdmFP+wzCmDEkc9y7NsYxeF4u7Btsn1ZuwgwJGxImImHicJArLP4R0yX4c2KCrMrTA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"es-errors": "^1.3.0",
|
||||
"object-inspect": "^1.13.3"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
},
|
||||
"node_modules/side-channel-map": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/side-channel-map/-/side-channel-map-1.0.1.tgz",
|
||||
"integrity": "sha512-VCjCNfgMsby3tTdo02nbjtM/ewra6jPHmpThenkTYh8pG9ucZ/1P8So4u4FGBek/BjpOVsDCMoLA/iuBKIFXRA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"call-bound": "^1.0.2",
|
||||
"es-errors": "^1.3.0",
|
||||
"get-intrinsic": "^1.2.5",
|
||||
"object-inspect": "^1.13.3"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
},
|
||||
"node_modules/side-channel-weakmap": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/side-channel-weakmap/-/side-channel-weakmap-1.0.2.tgz",
|
||||
"integrity": "sha512-WPS/HvHQTYnHisLo9McqBHOJk2FkHO/tlpvldyrnem4aeQp4hai3gythswg6p01oSoTl58rcpiFAjF2br2Ak2A==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"call-bound": "^1.0.2",
|
||||
"es-errors": "^1.3.0",
|
||||
"get-intrinsic": "^1.2.5",
|
||||
"object-inspect": "^1.13.3",
|
||||
"side-channel-map": "^1.0.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
|
|
|
|||
|
|
@ -12,17 +12,17 @@ const errorMessages = Object.freeze({
|
|||
WINDSHIELD_CHIP_COUNT_REQUIRED: 'Please select chip(s)',
|
||||
WINDSHIELD_REPLACE_OPTIONS_REQUIRED: 'Please select windshield part',
|
||||
REPLACE_OPTIONS_REQUIRED: 'Please select rear window type',
|
||||
STREET_ADDRESS_REQUIRED: 'Please enter your street address',
|
||||
CITY_REQUIRED: 'Please enter your city',
|
||||
STATE_REQUIRED: 'Please enter your state',
|
||||
ZIP_REQUIRED: 'Please enter your ZIP',
|
||||
ZIP_FORMAT: 'Please enter a valid ZIP',
|
||||
STREET_ADDRESS_REQUIRED: 'Street Address is required.',
|
||||
CITY_REQUIRED: 'City is required.',
|
||||
STATE_REQUIRED: 'State is required.',
|
||||
ZIP_REQUIRED: 'ZIP is required.',
|
||||
ZIP_FORMAT: 'Zip must be 5 digits.',
|
||||
LICENSE_PLATE_REQUIRED: 'Please enter your license plate number',
|
||||
REGISTRATION_ZIP_REQUIRED: 'Please enter your registration ZIP code',
|
||||
FIRST_NAME_REQUIRED: 'Please enter your first name',
|
||||
LAST_NAME_REQUIRED: 'Please enter your last name',
|
||||
EMAIL_ADDRESS_REQUIRED: 'Please enter your email address',
|
||||
EMAIL_ADDRESS_FORMAT: 'Please enter a valid email address',
|
||||
EMAIL_ADDRESS_REQUIRED: 'Email is required.',
|
||||
EMAIL_ADDRESS_FORMAT: 'Please enter a valid email address.',
|
||||
SERVICE_ZIP_REQUIRED: 'Please enter your service ZIP',
|
||||
SERVICE_ZIP_FORMAT: 'Please enter a valid service ZIP',
|
||||
VIN_REQUIRED: 'Please enter your VIN',
|
||||
|
|
@ -49,8 +49,8 @@ const errorMessages = Object.freeze({
|
|||
'Damage date may not be in the future',
|
||||
DAMAGE_OPTION_REQUIRED: 'How damage occurred is required.',
|
||||
|
||||
POLICYHOLDER_FIRST_NAME_REQUIRED: 'Please enter the policyholder first name',
|
||||
POLICYHOLDER_LAST_NAME_REQUIRED: 'Please enter the policyholder last name',
|
||||
POLICYHOLDER_FIRST_NAME_REQUIRED: 'First name is required.',
|
||||
POLICYHOLDER_LAST_NAME_REQUIRED: 'Last name is required.',
|
||||
ACKNOWLEDGEMENT_REQUIRED: 'You must agree to the terms to continue',
|
||||
|
||||
YEAR_REQUIRED: 'Vehicle year is required.',
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ function defineGlobalNameRules() {
|
|||
* @summary Define global rules related to email addresses
|
||||
*/
|
||||
function defineGlobalEmailRules() {
|
||||
defineRule(globalRules.EMAIL_ADDRESS_REQUIRED, required(errorMessages.EMAIL_ADDRESS_FORMAT));
|
||||
defineRule(globalRules.EMAIL_ADDRESS_REQUIRED, required(errorMessages.EMAIL_ADDRESS_REQUIRED));
|
||||
defineRule(
|
||||
globalRules.EMAIL_ADDRESS_FORMAT,
|
||||
regex(
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<template>
|
||||
<div role="application">
|
||||
<div class="row mt-2 mb-4">
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<textboxQuestion
|
||||
id="streetAddressField"
|
||||
|
|
@ -12,7 +12,8 @@
|
|||
hasIcon
|
||||
disableAutoFill
|
||||
validationRules="street-address-required"
|
||||
@keydown.enter.prevent />
|
||||
@keydown.enter.prevent
|
||||
class="mb-4" />
|
||||
</div>
|
||||
</div>
|
||||
<transition
|
||||
|
|
@ -21,18 +22,19 @@
|
|||
<div v-show="showAllFields">
|
||||
<div
|
||||
v-if="includeStreetAddress2"
|
||||
class="row mt-2 mb-4">
|
||||
class="row">
|
||||
<div class="col">
|
||||
<textboxQuestion
|
||||
ref="streetAddress2"
|
||||
v-model="addressModel.streetAddress2"
|
||||
cmsWidgetName="StreetAddress2QuestionWidget"
|
||||
aria-haspopup=""
|
||||
inputId="streetAddress2Field" />
|
||||
inputId="streetAddress2Field"
|
||||
class="mb-4" />
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
class="row mb-4"
|
||||
class="row"
|
||||
aria-live="polite">
|
||||
<div class="col">
|
||||
<textboxQuestion
|
||||
|
|
@ -41,22 +43,25 @@
|
|||
cmsWidgetName="CityQuestionWidget"
|
||||
inputId="cbf28188fdf2436688fd735915f7ee56"
|
||||
disableAutoFill
|
||||
validationRules="city-required" />
|
||||
validationRules="city-required"
|
||||
class="mb-4" />
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
class="row mb-4"
|
||||
aria-live="polite">
|
||||
<div class="col">
|
||||
<dropdownQuestion
|
||||
ref="state"
|
||||
v-model="addressModel.state"
|
||||
cmsWidgetName="StateQuestionWidget"
|
||||
:placeHolderText="statePlaceHolderText"
|
||||
inputId="8fdf9dc2e13e430eb57529499dceb3eb"
|
||||
:options="stateOptions"
|
||||
disableAutoFill
|
||||
validationRules="state-required" />
|
||||
validationRules="state-required"
|
||||
class="mb-4" />
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
class="row"
|
||||
aria-live="polite">
|
||||
<div class="col">
|
||||
<textboxQuestion
|
||||
ref="zipCode"
|
||||
|
|
@ -65,7 +70,8 @@
|
|||
inputId="01a9a1c2de0b4c9da8e023c9ae3be498"
|
||||
mask="#####"
|
||||
disableAutoFill
|
||||
validationRules="zip-code-required|zip-code-format" />
|
||||
validationRules="zip-code-required|zip-code-format"
|
||||
class="mb-4" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -102,7 +108,7 @@ defineRule('street-address-required', required(errorMessages.STREET_ADDRESS_REQU
|
|||
defineRule('city-required', required(errorMessages.CITY_REQUIRED));
|
||||
defineRule('state-required', required(errorMessages.STATE_REQUIRED));
|
||||
defineRule('zip-code-required', required(errorMessages.ZIP_REQUIRED));
|
||||
defineRule('zip-code-format', regex(/(^\d{5}$)|(^\d{5}-\d{4}$)/, errorMessages.ZIP_FORMAT));
|
||||
defineRule('zip-code-format', regex(/^\d{5}$/, errorMessages.ZIP_FORMAT));
|
||||
|
||||
export default {
|
||||
name: 'address-questions',
|
||||
|
|
@ -162,6 +168,9 @@ export default {
|
|||
get() {
|
||||
return states;
|
||||
}
|
||||
},
|
||||
statePlaceHolderText() {
|
||||
return this.getCmsContent('StateQuestionWidget', 'ButtonText');
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
|
|
|
|||
|
|
@ -14,28 +14,64 @@
|
|||
id="sub-header"
|
||||
cmsWidgetName="SiteSubHeaderWidget"
|
||||
class="mt-4" />
|
||||
<div class="row mb-4">
|
||||
<div class="col">
|
||||
<textboxQuestion
|
||||
ref="policyHolderFirstName"
|
||||
v-model="customerQuestions.firstName"
|
||||
inputId="firstNameField"
|
||||
cmsWidgetName="PolicyholderFirstNameQuestion"
|
||||
isRequired
|
||||
disableAutoFill
|
||||
:validationRules="rules.firstName" />
|
||||
</div>
|
||||
<div class="col">
|
||||
<textboxQuestion
|
||||
ref="policyHolderLastName"
|
||||
v-model="customerQuestions.lastName"
|
||||
inputId="lastNameField"
|
||||
cmsWidgetName="PolicyholderLastNameQuestion"
|
||||
isRequired
|
||||
disableAutoFill
|
||||
:validationRules="rules.lastName" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-4">
|
||||
<div class="col-md-8">
|
||||
<textboxQuestion
|
||||
ref="phoneNumber"
|
||||
v-model="customerQuestions.phoneNumber"
|
||||
inputId="phoneNumberField"
|
||||
cmsWidgetName="PhoneNumberQuestion"
|
||||
:validationRules="rules.phoneNumber"
|
||||
isRequired
|
||||
:mask="phoneMask"
|
||||
disableAutoFill />
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<textboxQuestion
|
||||
ref="extension"
|
||||
v-model="customerQuestions.extension"
|
||||
inputId="extensionField"
|
||||
cmsWidgetName="ExtensionQuestion"
|
||||
:validationRules="rules.extension"
|
||||
disableAutoFill />
|
||||
</div>
|
||||
</div>
|
||||
<textboxQuestion
|
||||
ref="email"
|
||||
v-model="customerQuestions.email"
|
||||
inputId="emailField"
|
||||
cmsWidgetName="EmailAddressQuestion"
|
||||
:validationRules="rules.email"
|
||||
isRequired
|
||||
disableAutoFill
|
||||
class="mb-4" />
|
||||
<addressQuestions
|
||||
id="address-questions-wrapper"
|
||||
ref="addressQuestions"
|
||||
v-model="customerQuestions.addressQuestions"
|
||||
:includeStreetAddress2="true" />
|
||||
<textboxQuestion
|
||||
ref="policyHolderFirstName"
|
||||
v-model="customerQuestions.firstName"
|
||||
inputId="firstNameField"
|
||||
cmsWidgetName="PolicyholderFirstNameQuestion"
|
||||
isRequired
|
||||
disableAutoFill
|
||||
:validationRules="rules.firstName" />
|
||||
<textboxQuestion
|
||||
ref="policyHolderLastName"
|
||||
v-model="customerQuestions.lastName"
|
||||
class="mt-4"
|
||||
inputId="lastNameField"
|
||||
cmsWidgetName="PolicyholderLastNameQuestion"
|
||||
isRequired
|
||||
disableAutoFill
|
||||
:validationRules="rules.lastName" />
|
||||
<siteFooter
|
||||
ref="siteFooter"
|
||||
class="mt-5"
|
||||
|
|
@ -105,7 +141,10 @@ export default {
|
|||
vehiclesFound: [],
|
||||
rules: {
|
||||
firstName: globalRules.POLICYHOLDER_FIRST_NAME_REQUIRED,
|
||||
lastName: globalRules.POLICYHOLDER_LAST_NAME_REQUIRED
|
||||
lastName: globalRules.POLICYHOLDER_LAST_NAME_REQUIRED,
|
||||
phoneNumber: `${globalRules.PHONE_NUMBER_REQUIRED}|${globalRules.PHONE_NUMBER_FORMAT}`,
|
||||
email: `${globalRules.EMAIL_ADDRESS_REQUIRED}|${globalRules.EMAIL_ADDRESS_FORMAT}`,
|
||||
extension: `${globalRules.EXTENSION_FORMAT}`,
|
||||
}
|
||||
};
|
||||
},
|
||||
|
|
@ -152,7 +191,10 @@ export default {
|
|||
zipCode: this.mainStore.order.customer.address.zipCode
|
||||
},
|
||||
firstName: this.mainStore.order.customer.firstName,
|
||||
lastName: this.mainStore.order.customer.lastName
|
||||
lastName: this.mainStore.order.customer.lastName,
|
||||
phoneNumber: this.mainStore.order.contactInfo.homePhone,
|
||||
extension: this.mainStore.order.contactInfo.extension,
|
||||
email: this.mainStore.order.customer.emailAddress,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue