Merge pull request #138 from Safelite/feature/SSR-233

Feature/ssr 233
This commit is contained in:
Kulbhushan Kaushik 2023-01-23 08:45:34 -05:00 committed by GitHub
commit d47358fc32
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 24 additions and 2 deletions

View file

@ -31,6 +31,17 @@
@keydown.enter.prevent /> @keydown.enter.prevent />
</div> </div>
</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"> <transition name="fade" mode="out-in">
<div class="row mb-4" aria-live="polite"> <div class="row mb-4" aria-live="polite">
<div class="col"> <div class="col">
@ -98,12 +109,14 @@ export default {
type: Object, type: Object,
default: () => ({ default: () => ({
streetAddress: "", streetAddress: "",
streetAddress2: "",
city: "", city: "",
state: "", state: "",
zipCode: "", zipCode: "",
}), }),
}, },
validationRules: String, validationRules: String,
includeStreetAddress2:false,
}, },
data() { data() {
return { return {

View file

@ -28,7 +28,7 @@
validationRules="last-name-required" /> validationRules="last-name-required" />
</div> </div>
</div> </div>
<addressQuestions ref="addressQuestions" v-model="customerQuestions.addressQuestions" /> <addressQuestions ref="addressQuestions" v-model="customerQuestions.addressQuestions" includeStreetAddress2="true" />
<siteFooter <siteFooter
cmsWidgetName="SiteFooterWidget" cmsWidgetName="SiteFooterWidget"
ref="siteFooter" ref="siteFooter"
@ -116,6 +116,7 @@ export default {
addressQuestions : addressQuestions :
{ {
streetAddress: this.mainStore.order.customer.address.streetAddress, streetAddress: this.mainStore.order.customer.address.streetAddress,
streetAddress2: this.mainStore.order.customer.address.streetAddress2,
city: this.mainStore.order.customer.address.city, city: this.mainStore.order.customer.address.city,
state: this.mainStore.order.customer.address.state, state: this.mainStore.order.customer.address.state,
zipCode: this.mainStore.order.customer.address.zipCode, zipCode: this.mainStore.order.customer.address.zipCode,
@ -135,3 +136,9 @@ export default {
}, },
} }
</script> </script>
<style lang="scss">
.alert.alert-warning
{
margin-top: 20px;
}
</style>

View file

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