commit
This commit is contained in:
parent
16322ceb62
commit
f5c02b4f0e
2 changed files with 37 additions and 11 deletions
|
|
@ -32,7 +32,7 @@
|
||||||
<siteFooter
|
<siteFooter
|
||||||
cmsWidgetName="SiteFooterWidget"
|
cmsWidgetName="SiteFooterWidget"
|
||||||
ref="siteFooter"
|
ref="siteFooter"
|
||||||
:isDisabled="!meta.valid"
|
:isForwardActionDisabled="!meta.valid"
|
||||||
@ForwardClicked="forwardButtonAction"
|
@ForwardClicked="forwardButtonAction"
|
||||||
@back-clicked="backButtonAction"
|
@back-clicked="backButtonAction"
|
||||||
/>
|
/>
|
||||||
|
|
@ -66,16 +66,7 @@ export default {
|
||||||
mixins: [BaseFormMixin],
|
mixins: [BaseFormMixin],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
customerQuestions: {
|
customerQuestions: this.getPolicyHolderDetailsFromStore()
|
||||||
addressQuestions: {
|
|
||||||
streetAddress: "",
|
|
||||||
city: "",
|
|
||||||
state: "",
|
|
||||||
zipCode: "",
|
|
||||||
},
|
|
||||||
firstName: "",
|
|
||||||
lastName: "",
|
|
||||||
},
|
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
setup() {
|
setup() {
|
||||||
|
|
@ -107,6 +98,32 @@ export default {
|
||||||
backButtonAction() {
|
backButtonAction() {
|
||||||
this.$router.navigate(this.navigationScenarios.CLICKED_BACK, this.$route);
|
this.$router.navigate(this.navigationScenarios.CLICKED_BACK, this.$route);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
forwardButtonAction()
|
||||||
|
{
|
||||||
|
this.mainStore.updatePolicyHolderDetails(this.customerQuestions);
|
||||||
|
return this.navigateForward();
|
||||||
|
},
|
||||||
|
|
||||||
|
navigateForward() {
|
||||||
|
this.$router.navigate(
|
||||||
|
this.navigationScenarios.CLICKED_FORWARD_POLICY_HOLDER_DETAILS,
|
||||||
|
this.$route
|
||||||
|
);
|
||||||
|
},
|
||||||
|
getPolicyHolderDetailsFromStore() {
|
||||||
|
return {
|
||||||
|
addressQuestions :
|
||||||
|
{
|
||||||
|
streetAddress: this.mainStore.order.customer.address.streetAddress,
|
||||||
|
city: this.mainStore.order.customer.address.city,
|
||||||
|
state: this.mainStore.order.customer.address.state,
|
||||||
|
zipCode: this.mainStore.order.customer.address.zipCode,
|
||||||
|
},
|
||||||
|
firstName : this.mainStore.order.customer.firstName,
|
||||||
|
lastName : this.mainStore.order.customer.lastName,
|
||||||
|
}
|
||||||
|
},
|
||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
siteHeader,
|
siteHeader,
|
||||||
|
|
|
||||||
|
|
@ -665,6 +665,15 @@ export const useMainStore = defineStore({
|
||||||
this.order.customer.phoneNumber = welcomePageModel?.phoneNumber;
|
this.order.customer.phoneNumber = welcomePageModel?.phoneNumber;
|
||||||
this.order.customer.emailAddress = welcomePageModel?.email;
|
this.order.customer.emailAddress = welcomePageModel?.email;
|
||||||
},
|
},
|
||||||
|
updatePolicyHolderDetails(customerQuestions)
|
||||||
|
{
|
||||||
|
this.order.customer.address.streetAddress = customerQuestions.addressQuestions.streetAddress;
|
||||||
|
this.order.customer.address.city = customerQuestions.addressQuestions.city;
|
||||||
|
this.order.customer.address.state = customerQuestions.addressQuestions.state;
|
||||||
|
this.order.customer.address.zipCode = customerQuestions.addressQuestions.zipCode;
|
||||||
|
this.order.customer.firstName = customerQuestions.firstName;
|
||||||
|
this.order.customer.lastName = customerQuestions.lastName;
|
||||||
|
},
|
||||||
savePartQuestionAnswers(partQuestionAnswersArray) {
|
savePartQuestionAnswers(partQuestionAnswersArray) {
|
||||||
// if part question answers have changed, reset subsequent question answers
|
// if part question answers have changed, reset subsequent question answers
|
||||||
const sortedPreviousResultsArray = sortArrayOfObjectsByPropertyValue(
|
const sortedPreviousResultsArray = sortArrayOfObjectsByPropertyValue(
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue