Merge branch 'develop' into feature/SSR-705
This commit is contained in:
commit
e9f4f77354
8 changed files with 59 additions and 16 deletions
|
|
@ -50,7 +50,8 @@ const errorMessages = Object.freeze({
|
||||||
YEAR_REQUIRED: 'Please select your vehicle year',
|
YEAR_REQUIRED: 'Please select your vehicle year',
|
||||||
MAKE_REQUIRED: 'Please select your vehicle make',
|
MAKE_REQUIRED: 'Please select your vehicle make',
|
||||||
MODEL_REQUIRED: 'Please select your vehicle model',
|
MODEL_REQUIRED: 'Please select your vehicle model',
|
||||||
STYLE_REQUIRED: 'Please select your vehicle style'
|
STYLE_REQUIRED: 'Please select your vehicle style',
|
||||||
|
MOBILE_LOCATION_REQUIRED: 'Please enter your service address'
|
||||||
});
|
});
|
||||||
|
|
||||||
export default errorMessages;
|
export default errorMessages;
|
||||||
|
|
|
||||||
|
|
@ -80,7 +80,7 @@ import listButton from '@/ux-components/list-button/list-button.vue';
|
||||||
import listButtonHorizontal from '@/ux-components/list-button-horizontal/list-button-horizontal.vue';
|
import listButtonHorizontal from '@/ux-components/list-button-horizontal/list-button-horizontal.vue';
|
||||||
import listCard from '@/ux-components/list-card/list-card.vue';
|
import listCard from '@/ux-components/list-card/list-card.vue';
|
||||||
import radio from '@/ux-components/radio/radio.vue';
|
import radio from '@/ux-components/radio/radio.vue';
|
||||||
import { ErrorMessage } from 'vee-validate';
|
import { useField, ErrorMessage } from 'vee-validate';
|
||||||
import providerPrefRadio from '@/layouts/provider-preference/provider-pref-radio/provider-pref-radio.vue';
|
import providerPrefRadio from '@/layouts/provider-preference/provider-pref-radio/provider-pref-radio.vue';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
|
@ -134,6 +134,28 @@ export default {
|
||||||
isSmallQuestionLabelText: Boolean
|
isSmallQuestionLabelText: Boolean
|
||||||
},
|
},
|
||||||
emits: ['update:modelValue'],
|
emits: ['update:modelValue'],
|
||||||
|
setup(props) {
|
||||||
|
const propsClone = { ...props };
|
||||||
|
const { modelValue } = propsClone;
|
||||||
|
|
||||||
|
const fieldOptions = {
|
||||||
|
value: modelValue,
|
||||||
|
initialValue: null
|
||||||
|
};
|
||||||
|
|
||||||
|
const { errorMessage, handleBlur, handleChange, meta, validate, errors, resetField } =
|
||||||
|
useField(props.groupName, props.validationRules, fieldOptions);
|
||||||
|
|
||||||
|
return {
|
||||||
|
errorMessage,
|
||||||
|
handleBlur,
|
||||||
|
handleChange,
|
||||||
|
validate,
|
||||||
|
meta,
|
||||||
|
errors,
|
||||||
|
resetField
|
||||||
|
};
|
||||||
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
lastValuePushedToGa: null
|
lastValuePushedToGa: null
|
||||||
|
|
@ -231,6 +253,13 @@ export default {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
watch: {
|
||||||
|
modelValue(newValue) {
|
||||||
|
this.resetField({
|
||||||
|
value: newValue
|
||||||
|
});
|
||||||
|
}
|
||||||
|
},
|
||||||
beforeMount() {
|
beforeMount() {
|
||||||
if (this.buttonTypeObject) {
|
if (this.buttonTypeObject) {
|
||||||
this.$options.components[this.buttonTypeString] = this.buttonTypeObject;
|
this.$options.components[this.buttonTypeString] = this.buttonTypeObject;
|
||||||
|
|
|
||||||
|
|
@ -83,7 +83,7 @@ function getMountedComponent(mainInitialState = {}, initialData = {}, methodToRu
|
||||||
return { wrapper };
|
return { wrapper };
|
||||||
}
|
}
|
||||||
|
|
||||||
describe('coverageStatement.vue', () => {
|
describe.skip('coverageStatement.vue', () => {
|
||||||
describe('method arePagePrerequisitesValid...', () => {
|
describe('method arePagePrerequisitesValid...', () => {
|
||||||
test('Should return true for valid page requisites if vin exists', () => {
|
test('Should return true for valid page requisites if vin exists', () => {
|
||||||
// Arrange
|
// Arrange
|
||||||
|
|
|
||||||
|
|
@ -72,6 +72,7 @@
|
||||||
cmsWidgetName="ServiceProviderQuestion"
|
cmsWidgetName="ServiceProviderQuestion"
|
||||||
:questionText="questionText"
|
:questionText="questionText"
|
||||||
:answers="answersFromCms"
|
:answers="answersFromCms"
|
||||||
|
groupName="ServiceProviderQuestionOption"
|
||||||
buttonTypeString="listButton"
|
buttonTypeString="listButton"
|
||||||
isRequired
|
isRequired
|
||||||
:validationRules="rules.selectionRequired">
|
:validationRules="rules.selectionRequired">
|
||||||
|
|
|
||||||
|
|
@ -8,22 +8,21 @@
|
||||||
<div class="fade-on-route-transition">
|
<div class="fade-on-route-transition">
|
||||||
<siteHeader
|
<siteHeader
|
||||||
ref="siteHeader"
|
ref="siteHeader"
|
||||||
:cmsWidgetName="widget.siteHeader"
|
:cmsWidgetName="widget.siteHeader" />
|
||||||
/>
|
|
||||||
<div class="container-fluid px-6">
|
<div class="container-fluid px-6">
|
||||||
<siteSubHeader
|
<siteSubHeader
|
||||||
id="sub-header"
|
id="sub-header"
|
||||||
ref="siteSubHeader"
|
ref="siteSubHeader"
|
||||||
class="mt-5 duplicate-check-subheader"
|
class="mt-5 duplicate-check-subheader"
|
||||||
:cmsWidgetName="widget.siteSubHeader" />
|
:cmsWidgetName="widget.siteSubHeader" />
|
||||||
|
|
||||||
<buttonQuestion
|
<buttonQuestion
|
||||||
ref="buttonQuestion"
|
ref="buttonQuestion"
|
||||||
class="duplicate-check-question"
|
|
||||||
v-model="selectedAnswer"
|
v-model="selectedAnswer"
|
||||||
|
class="duplicate-check-question"
|
||||||
:cmsWidgetName="widget.existingOrNewQuestion"
|
:cmsWidgetName="widget.existingOrNewQuestion"
|
||||||
:questionText="questionText"
|
:questionText="questionText"
|
||||||
:answers="answers"
|
:answers="answers"
|
||||||
|
groupName="existingOrNewQuestionOption"
|
||||||
buttonTypeString="listButton"
|
buttonTypeString="listButton"
|
||||||
isRequired
|
isRequired
|
||||||
:validationRules="rules.selectionRequired">
|
:validationRules="rules.selectionRequired">
|
||||||
|
|
@ -62,6 +61,7 @@ export default {
|
||||||
siteSubHeader,
|
siteSubHeader,
|
||||||
buttonQuestion,
|
buttonQuestion,
|
||||||
siteFooter,
|
siteFooter,
|
||||||
|
// eslint-disable-next-line vue/no-reserved-component-names
|
||||||
Form
|
Form
|
||||||
},
|
},
|
||||||
mixins: [BaseFormMixin],
|
mixins: [BaseFormMixin],
|
||||||
|
|
@ -83,7 +83,7 @@ export default {
|
||||||
rules: {
|
rules: {
|
||||||
selectionRequired: globalRules.OPTION_REQUIRED
|
selectionRequired: globalRules.OPTION_REQUIRED
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
questionText() {
|
questionText() {
|
||||||
|
|
@ -95,11 +95,11 @@ export default {
|
||||||
duplicateOrders() {
|
duplicateOrders() {
|
||||||
const duplicateOrderText = 'Finish Existing Claim';
|
const duplicateOrderText = 'Finish Existing Claim';
|
||||||
const orders = useMainStore().applicationUser.duplicateOrders;
|
const orders = useMainStore().applicationUser.duplicateOrders;
|
||||||
return orders?.map(o => {
|
return orders?.map((o) => {
|
||||||
const vehicle = !!o.vehicleYear && !!o.vehicleMake && !!o.vehicleModel
|
const vehicle = !!o.vehicleYear && !!o.vehicleMake && !!o.vehicleModel
|
||||||
? `${o.vehicleYear} ${o.vehicleMake} ${o.vehicleModel}`
|
? `${o.vehicleYear} ${o.vehicleMake} ${o.vehicleModel}`
|
||||||
: null;
|
: null;
|
||||||
const subtext = !!vehicle
|
const subtext = vehicle
|
||||||
? `${vehicle}, ${o.dateOfLoss}`
|
? `${vehicle}, ${o.dateOfLoss}`
|
||||||
: o.dateOfLoss;
|
: o.dateOfLoss;
|
||||||
|
|
||||||
|
|
@ -125,7 +125,7 @@ export default {
|
||||||
* @summary Steps to perform when forward button clicked.
|
* @summary Steps to perform when forward button clicked.
|
||||||
*/
|
*/
|
||||||
forwardButtonAction() {
|
forwardButtonAction() {
|
||||||
if (useMainStore().order.policy.policyLookupSuccessful){
|
if (useMainStore().order.policy.policyLookupSuccessful) {
|
||||||
const policyVehicles = useMainStore().order.policy.vehicles ?? [];
|
const policyVehicles = useMainStore().order.policy.vehicles ?? [];
|
||||||
if (policyVehicles.length > 0) {
|
if (policyVehicles.length > 0) {
|
||||||
this.$router.navigate(
|
this.$router.navigate(
|
||||||
|
|
@ -141,11 +141,12 @@ export default {
|
||||||
} else {
|
} else {
|
||||||
this.$router.navigate(
|
this.$router.navigate(
|
||||||
this.navigationScenarios.CLICKED_FORWARD_POLICY_UNVERIFIED,
|
this.navigationScenarios.CLICKED_FORWARD_POLICY_UNVERIFIED,
|
||||||
this.$route);
|
this.$route
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
|
|
|
||||||
|
|
@ -128,7 +128,7 @@ export default {
|
||||||
type: Function
|
type: Function
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
emits: ['update:modelValue', 'updated-mobile-fee-part', 'updated-contains-military-base'],
|
emits: ['update:modelValue', 'updated-mobile-fee-part', 'updated-contains-military-base', 'updated-serviceability'],
|
||||||
setup(props) {
|
setup(props) {
|
||||||
const uuid = crypto.randomUUID();
|
const uuid = crypto.randomUUID();
|
||||||
const componentId = !props.customComponentId
|
const componentId = !props.customComponentId
|
||||||
|
|
|
||||||
|
|
@ -14,6 +14,7 @@
|
||||||
ref="serviceZipCodeQuestion"
|
ref="serviceZipCodeQuestion"
|
||||||
v-model="serviceZipCodeQuestion"
|
v-model="serviceZipCodeQuestion"
|
||||||
modalWidgetName="ServiceZipModalWidget"
|
modalWidgetName="ServiceZipModalWidget"
|
||||||
|
:onZipUpdateCallback="reloadShopData"
|
||||||
@updatedServiceability="setServiceabilityDetails"
|
@updatedServiceability="setServiceabilityDetails"
|
||||||
@updatedContainsMilitaryBase="setContainsMilitaryBase" />
|
@updatedContainsMilitaryBase="setContainsMilitaryBase" />
|
||||||
<alert
|
<alert
|
||||||
|
|
@ -329,6 +330,9 @@ export default {
|
||||||
*/
|
*/
|
||||||
this.$router.navigate(this.navigationScenarios.CLICKED_BACK, this.$route);
|
this.$router.navigate(this.navigationScenarios.CLICKED_BACK, this.$route);
|
||||||
},
|
},
|
||||||
|
async reloadShopData() {
|
||||||
|
await this.$refs.shopQuestion.reloadShopData(this.zipCode);
|
||||||
|
},
|
||||||
async forwardButtonAction() {
|
async forwardButtonAction() {
|
||||||
useMainStore().saveServiceLocation({
|
useMainStore().saveServiceLocation({
|
||||||
address: this.streetAddress,
|
address: this.streetAddress,
|
||||||
|
|
|
||||||
|
|
@ -57,7 +57,10 @@ export default {
|
||||||
zipCode: ''
|
zipCode: ''
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
modalWidgetName: String
|
modalWidgetName: String,
|
||||||
|
onZipUpdateCallback: {
|
||||||
|
type: Function
|
||||||
|
}
|
||||||
},
|
},
|
||||||
emits: ['update:modelValue', 'updated-serviceability', 'updated-contains-military-base'],
|
emits: ['update:modelValue', 'updated-serviceability', 'updated-contains-military-base'],
|
||||||
setup() {
|
setup() {
|
||||||
|
|
@ -162,6 +165,10 @@ export default {
|
||||||
|
|
||||||
// Update the page level model
|
// Update the page level model
|
||||||
this.$emit('update:modelValue', this.internalModel);
|
this.$emit('update:modelValue', this.internalModel);
|
||||||
|
if (this.onZipUpdateCallback) {
|
||||||
|
await this.onZipUpdateCallback(serviceZipCode);
|
||||||
|
}
|
||||||
|
|
||||||
this.closeModal();
|
this.closeModal();
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue