Merge pull request #2164 from Safelite/Feature/Digital/CSR-2419

CSR-2419
This commit is contained in:
hiteshkumar87 2024-12-10 19:20:22 +05:30 committed by GitHub
commit dfb90ed050
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 21 additions and 3 deletions

View file

@ -124,6 +124,10 @@ export default {
type: Boolean, type: Boolean,
default: false, default: false,
}, },
isAddressFieldFocused: {
type: Boolean,
default: true,
},
}, },
data() { data() {
return { return {
@ -225,7 +229,9 @@ export default {
).then(() => { ).then(() => {
// When loaded, trigger the setup // When loaded, trigger the setup
this.initializeAutocomplete(); this.initializeAutocomplete();
this.addressField1.focus(); if (this.isAddressFieldFocused) {
this.addressField1.focus();
}
}); });
}, },
initializeAutocomplete() { initializeAutocomplete() {

View file

@ -19,7 +19,8 @@
ref="customerQuestions" ref="customerQuestions"
v-model="customerQuestions" v-model="customerQuestions"
:validationRules="EmailValidationRules" :validationRules="EmailValidationRules"
:isEmailOptional="IsEmailOptional" /> :isEmailOptional="IsEmailOptional"
:isAddressFieldFocused="IsAddressFieldFocused" />
<alert <alert
ref="alertVinNotFound" ref="alertVinNotFound"
v-if="displayVinNotFoundAlert" v-if="displayVinNotFoundAlert"
@ -443,6 +444,9 @@ export default {
.replaceAll("{custom:vinYmmFound}", vinYmmFound) .replaceAll("{custom:vinYmmFound}", vinYmmFound)
.replaceAll("{custom:vinYmmExpected}", vinYmmExpected); .replaceAll("{custom:vinYmmExpected}", vinYmmExpected);
}, },
IsAddressFieldFocused() {
return false;
},
}, },
watch: { watch: {
customerQuestions: { customerQuestions: {

View file

@ -1,6 +1,9 @@
<template> <template>
<div class="customer-questions"> <div class="customer-questions">
<addressQuestions ref="addressQuestions" v-model="customerModel.addressQuestions" /> <addressQuestions
ref="addressQuestions"
v-model="customerModel.addressQuestions"
:isAddressFieldFocused="isAddressFieldFocused" />
<div class="row mb-4"> <div class="row mb-4">
<div class="col"> <div class="col">
<textboxQuestion <textboxQuestion
@ -87,6 +90,11 @@ export default {
}, },
validationRules: String, validationRules: String,
isEmailOptional: Boolean, isEmailOptional: Boolean,
isAddressFieldFocused: {
required: false,
type: Boolean,
default: true,
},
}, },
computed: { computed: {
customerModel: { customerModel: {