This commit is contained in:
Kulbhushan Kaushik 2023-01-23 08:35:36 -05:00
parent 871fc4702a
commit b13b80de23
3 changed files with 17 additions and 1 deletions

View file

@ -31,6 +31,17 @@
@keydown.enter.prevent />
</div>
</div>
<div class="row mt-2 mb-4" v-if="includeStreetAddress2">
<div class="col">
<textboxQuestion
cmsWidgetName="StreetAddress2QuestionWidget"
v-model="addressModel.streetAddress2"
aria-haspopup=""
inputId="streetAddress2Field"
disableAutoFill
/>
</div>
</div>
<transition name="fade" mode="out-in">
<div class="row mb-4" aria-live="polite">
<div class="col">
@ -98,12 +109,14 @@ export default {
type: Object,
default: () => ({
streetAddress: "",
streetAddress2: "",
city: "",
state: "",
zipCode: "",
}),
},
validationRules: String,
includeStreetAddress2:false,
},
data() {
return {

View file

@ -28,7 +28,7 @@
validationRules="last-name-required" />
</div>
</div>
<addressQuestions ref="addressQuestions" v-model="customerQuestions.addressQuestions" />
<addressQuestions ref="addressQuestions" v-model="customerQuestions.addressQuestions" includeStreetAddress2="true" />
<siteFooter
cmsWidgetName="SiteFooterWidget"
ref="siteFooter"
@ -116,6 +116,7 @@ export default {
addressQuestions :
{
streetAddress: this.mainStore.order.customer.address.streetAddress,
streetAddress2: this.mainStore.order.customer.address.streetAddress2,
city: this.mainStore.order.customer.address.city,
state: this.mainStore.order.customer.address.state,
zipCode: this.mainStore.order.customer.address.zipCode,

View file

@ -52,6 +52,7 @@ const getDefaultState = () => {
customer: {
address: {
streetAddress: null,
streetAddress2: null,
city: null,
state: null,
zipCode: null,
@ -668,6 +669,7 @@ export const useMainStore = defineStore({
updatePolicyHolderDetails(customerQuestions)
{
this.order.customer.address.streetAddress = customerQuestions.addressQuestions.streetAddress;
this.order.customer.address.streetAddress2 = customerQuestions.addressQuestions.streetAddress2;
this.order.customer.address.city = customerQuestions.addressQuestions.city;
this.order.customer.address.state = customerQuestions.addressQuestions.state;
this.order.customer.address.zipCode = customerQuestions.addressQuestions.zipCode;