looks like formatting only.
Sorry David :)
This commit is contained in:
parent
f6394b52fc
commit
80f90ce233
1 changed files with 99 additions and 106 deletions
|
|
@ -1,55 +1,47 @@
|
||||||
<template>
|
<template>
|
||||||
<Form
|
<Form ref="theForm" v-slot="{ meta }" @submit="onSubmit" @invalid-submit="onInvalidSubmit">
|
||||||
ref="theForm"
|
|
||||||
v-slot="{ meta }"
|
|
||||||
@submit="onSubmit"
|
|
||||||
@invalid-submit="onInvalidSubmit">
|
|
||||||
<div class="page-container-grouped-styles welcome">
|
<div class="page-container-grouped-styles welcome">
|
||||||
<div class="fade-on-route-transition position-relative">
|
<div class="fade-on-route-transition position-relative">
|
||||||
<siteHeader cmsWidgetName="SiteHeaderWidget" />
|
<siteHeader cmsWidgetName="SiteHeaderWidget" />
|
||||||
<siteSubHeader
|
<siteSubHeader cmsWidgetName="SiteSubHeaderWidget" class="mt-4" />
|
||||||
cmsWidgetName="SiteSubHeaderWidget"
|
|
||||||
class="mt-4" />
|
|
||||||
<div class="container-fluid px-5">
|
<div class="container-fluid px-5">
|
||||||
<div class="row mt-5">
|
<div class="row mt-5">
|
||||||
<div class="col">
|
<div class="col">
|
||||||
<textboxQuestion
|
<textboxQuestion
|
||||||
ref="policyNumber"
|
ref="policyNumber"
|
||||||
v-model="welcomePageModel.policyNumber"
|
v-model="welcomePageModel.policyNumber"
|
||||||
inputId="policyNumberField"
|
inputId="policyNumberField"
|
||||||
cmsWidgetName="PolicyNumberQuestion"
|
cmsWidgetName="PolicyNumberQuestion"
|
||||||
isRequired
|
isRequired
|
||||||
disableAutoFill
|
disableAutoFill
|
||||||
:isDisabled="isPolicyHolderEnabled"
|
:isDisabled="isPolicyHolderEnabled"
|
||||||
:validationRules="rules.policyNumber" />
|
:validationRules="rules.policyNumber" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div v-if="isCoverageEnabled" class="row mt-4">
|
||||||
v-if="isCoverageEnabled"
|
|
||||||
class="row mt-4">
|
|
||||||
<div class="col">
|
<div class="col">
|
||||||
<textboxQuestion
|
<textboxQuestion
|
||||||
ref="policyZip"
|
ref="policyZip"
|
||||||
v-model="welcomePageModel.policyZipCode"
|
v-model="welcomePageModel.policyZipCode"
|
||||||
inputId="policyZipCode"
|
inputId="policyZipCode"
|
||||||
cmsWidgetName="PolicyZipQuestion"
|
cmsWidgetName="PolicyZipQuestion"
|
||||||
isRequired
|
isRequired
|
||||||
:validationRules="rules.policyZip" />
|
:validationRules="rules.policyZip" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row mt-4">
|
<div class="row mt-4">
|
||||||
<div class="col">
|
<div class="col">
|
||||||
<textboxQuestion
|
<textboxQuestion
|
||||||
ref="dateOfLoss"
|
ref="dateOfLoss"
|
||||||
v-model="welcomePageModel.dateOfLoss"
|
v-model="welcomePageModel.dateOfLoss"
|
||||||
type="date"
|
type="date"
|
||||||
cmsWidgetName="DateOfLossQuestion"
|
cmsWidgetName="DateOfLossQuestion"
|
||||||
inputId="dateOfLossField"
|
inputId="dateOfLossField"
|
||||||
isRequired
|
isRequired
|
||||||
disableAutoFill
|
disableAutoFill
|
||||||
:max="new Date().toJSON().slice(0,10)"
|
:max="new Date().toJSON().slice(0, 10)"
|
||||||
:min="'1972-12-01'"
|
:min="'1972-12-01'"
|
||||||
:validationRules="rules.lossDate" />
|
:validationRules="rules.lossDate" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row px-4">
|
<div class="row px-4">
|
||||||
|
|
@ -63,92 +55,90 @@
|
||||||
<div class="row mt-4">
|
<div class="row mt-4">
|
||||||
<div class="col">
|
<div class="col">
|
||||||
<dropdownQuestion
|
<dropdownQuestion
|
||||||
id="welcomeDropdown"
|
id="welcomeDropdown"
|
||||||
ref="damageCause"
|
ref="damageCause"
|
||||||
v-model="welcomePageModel.damageCause"
|
v-model="welcomePageModel.damageCause"
|
||||||
cmsWidgetName="DamageCauseQuestion"
|
cmsWidgetName="DamageCauseQuestion"
|
||||||
inputId="damageCauseQuestionField"
|
inputId="damageCauseQuestionField"
|
||||||
:options="DamageCauseOptions"
|
:options="DamageCauseOptions"
|
||||||
disableAutoFill
|
disableAutoFill
|
||||||
:validationRules="rules.damageOption"
|
:validationRules="rules.damageOption"
|
||||||
placeHolderText="Select an option" />
|
placeHolderText="Select an option" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row mt-4">
|
<div class="row mt-4">
|
||||||
<div class="col">
|
<div class="col">
|
||||||
<textboxQuestion
|
<textboxQuestion
|
||||||
ref="phoneNumber"
|
ref="phoneNumber"
|
||||||
v-model="welcomePageModel.phoneNumber"
|
v-model="welcomePageModel.phoneNumber"
|
||||||
inputId="phoneNumberField"
|
inputId="phoneNumberField"
|
||||||
cmsWidgetName="PhoneNumberQuestion"
|
cmsWidgetName="PhoneNumberQuestion"
|
||||||
:validationRules="rules.phoneNumber"
|
:validationRules="rules.phoneNumber"
|
||||||
isRequired
|
isRequired
|
||||||
mask="###-###-####"
|
mask="###-###-####"
|
||||||
disableAutoFill />
|
disableAutoFill />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row mt-4">
|
<div class="row mt-4">
|
||||||
<div class="col">
|
<div class="col">
|
||||||
<textboxQuestion
|
<textboxQuestion
|
||||||
ref="email"
|
ref="email"
|
||||||
v-model="welcomePageModel.email"
|
v-model="welcomePageModel.email"
|
||||||
inputId="emailField"
|
inputId="emailField"
|
||||||
cmsWidgetName="EmailAddressQuestion"
|
cmsWidgetName="EmailAddressQuestion"
|
||||||
:validationRules="rules.email"
|
:validationRules="rules.email"
|
||||||
isRequired
|
isRequired
|
||||||
disableAutoFill />
|
disableAutoFill />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col">
|
<div class="col">
|
||||||
<textboxQuestion
|
<textboxQuestion
|
||||||
v-if="displayDamageCityQuestion"
|
v-if="displayDamageCityQuestion"
|
||||||
ref="damageCity"
|
ref="damageCity"
|
||||||
v-model="welcomePageModel.damageCity"
|
v-model="welcomePageModel.damageCity"
|
||||||
class="mt-4"
|
class="mt-4"
|
||||||
inputId="damageCityField"
|
inputId="damageCityField"
|
||||||
cmsWidgetName="DamageCityQuestion"
|
cmsWidgetName="DamageCityQuestion"
|
||||||
isRequired
|
isRequired
|
||||||
disableAutoFill
|
disableAutoFill
|
||||||
:validationRules="rules.lossCity" />
|
:validationRules="rules.lossCity" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col">
|
<div class="col">
|
||||||
<dropdownQuestion
|
<dropdownQuestion
|
||||||
v-if="displayDamageStateQuestion"
|
v-if="displayDamageStateQuestion"
|
||||||
id="welcomeDropdown"
|
id="welcomeDropdown"
|
||||||
ref="state"
|
ref="state"
|
||||||
v-model="welcomePageModel.damageState"
|
v-model="welcomePageModel.damageState"
|
||||||
class="mt-4"
|
class="mt-4"
|
||||||
cmsWidgetName="DamageStateQuestion"
|
cmsWidgetName="DamageStateQuestion"
|
||||||
inputId="8fdf9dc2e13e430eb57529499dceb3eb"
|
inputId="8fdf9dc2e13e430eb57529499dceb3eb"
|
||||||
:options="getStates"
|
:options="getStates"
|
||||||
:validationRules="rules.lossState"
|
:validationRules="rules.lossState"
|
||||||
isRequired
|
isRequired
|
||||||
disableAutoFill
|
disableAutoFill
|
||||||
placeHolderText="Select an option" />
|
placeHolderText="Select an option" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row mb-3">
|
<div class="row mb-3">
|
||||||
<buttonQuestion
|
<buttonQuestion
|
||||||
v-if="displayGlassOnlyQuestion"
|
v-if="displayGlassOnlyQuestion"
|
||||||
ref="glassOnlyDamage"
|
ref="glassOnlyDamage"
|
||||||
v-model="welcomePageModel.isDamageGlassOnly"
|
v-model="welcomePageModel.isDamageGlassOnly"
|
||||||
class="px-0 mt-4"
|
class="px-0 mt-4"
|
||||||
cmsWidgetName="GlassOnlyQuestion"
|
cmsWidgetName="GlassOnlyQuestion"
|
||||||
inputId="isDamageGlassOnly"
|
inputId="isDamageGlassOnly"
|
||||||
:answers="DamageGlassOnlyOptions"
|
:answers="DamageGlassOnlyOptions"
|
||||||
:questionText="DamageGlassOnlyQuestion"
|
:questionText="DamageGlassOnlyQuestion"
|
||||||
buttonTypeString="listButtonHorizontal"
|
buttonTypeString="listButtonHorizontal"
|
||||||
:validationRules="rules.damageOption"
|
:validationRules="rules.damageOption"
|
||||||
isRequired
|
isRequired
|
||||||
isSmallQuestionLabelText
|
isSmallQuestionLabelText
|
||||||
disableAutoFill />
|
disableAutoFill />
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div id="welcomeFooter" class="row position-sticky top-100">
|
||||||
id="welcomeFooter"
|
|
||||||
class="row position-sticky top-100">
|
|
||||||
<div class="col">
|
<div class="col">
|
||||||
<siteFooter
|
<siteFooter
|
||||||
class="mt-3"
|
class="mt-3"
|
||||||
|
|
@ -227,8 +217,6 @@ export default {
|
||||||
const resultMap = await settleAllPromises(promiseResultMap);
|
const resultMap = await settleAllPromises(promiseResultMap);
|
||||||
|
|
||||||
next((vm) => {
|
next((vm) => {
|
||||||
console.log(resultMap);
|
|
||||||
console.log(resultMap.cmsContent);
|
|
||||||
vm.setCmsContent(resultMap.cmsContent);
|
vm.setCmsContent(resultMap.cmsContent);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
@ -294,8 +282,7 @@ export default {
|
||||||
return this.mainStore.issConfig.isCoverageEnabled;
|
return this.mainStore.issConfig.isCoverageEnabled;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods:
|
methods: {
|
||||||
{
|
|
||||||
async forwardButtonAction() {
|
async forwardButtonAction() {
|
||||||
this.mainStore.updatePolicyData(this.welcomePageModel);
|
this.mainStore.updatePolicyData(this.welcomePageModel);
|
||||||
|
|
||||||
|
|
@ -347,21 +334,27 @@ export default {
|
||||||
if (policy) {
|
if (policy) {
|
||||||
if (this.vehiclesFound) {
|
if (this.vehiclesFound) {
|
||||||
// if policy lookup is successful and vehicles are found, navigate to policy-vehicles page
|
// if policy lookup is successful and vehicles are found, navigate to policy-vehicles page
|
||||||
this.$router.navigate(this.navigationScenarios.CLICKED_FORWARD_POLICY_VERIFIED_WITH_VEHICLES,
|
this.$router.navigate(
|
||||||
|
this.navigationScenarios.CLICKED_FORWARD_POLICY_VERIFIED_WITH_VEHICLES,
|
||||||
this.$route,
|
this.$route,
|
||||||
{},
|
{},
|
||||||
{},
|
{},
|
||||||
this.vehiclesFound);
|
this.vehiclesFound
|
||||||
|
);
|
||||||
} else {
|
} else {
|
||||||
// if policy lookup is successful, but no vehicles are associated with the policy
|
// if policy lookup is successful, but no vehicles are associated with the policy
|
||||||
// navigate to vehicle-selection page (manual entry)
|
// navigate to vehicle-selection page (manual entry)
|
||||||
this.$router.navigate(this.navigationScenarios.CLICKED_FORWARD_POLICY_VERIFIED_NO_VEHICLES,
|
this.$router.navigate(
|
||||||
this.$route);
|
this.navigationScenarios.CLICKED_FORWARD_POLICY_VERIFIED_NO_VEHICLES,
|
||||||
|
this.$route
|
||||||
|
);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// if policy lookup is unsuccessful, navigate to policy-holder-details page
|
// if policy lookup is unsuccessful, navigate to policy-holder-details page
|
||||||
this.$router.navigate(this.navigationScenarios.CLICKED_FORWARD_POLICY_UNVERIFIED,
|
this.$router.navigate(
|
||||||
this.$route);
|
this.navigationScenarios.CLICKED_FORWARD_POLICY_UNVERIFIED,
|
||||||
|
this.$route
|
||||||
|
);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue