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