Merge pull request #1106 from Safelite/feature/CSR-1112B

More Tech Review Changes
This commit is contained in:
Leah Schumann 2023-05-19 08:50:15 -04:00 committed by GitHub
commit cfe116fdac
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -17,7 +17,7 @@
:answers="answers" :answers="answers"
groupName="chooseShop" groupName="chooseShop"
textPosition="text-start" textPosition="text-start"
v-model="selectedValue" v-model="selectedProviderNumber"
isRequired isRequired
validationRules="option-required" /> validationRules="option-required" />
<textLink <textLink
@ -81,12 +81,19 @@ export default {
}, },
selectedValue: { selectedValue: {
get: function () { get: function () {
return this.modelValue?.providerNumber; return this.modelValue;
}, },
set: function (newValue) { set: function (newValue) {
// Button Question only supports Number, String data types so we must get the full object to emit this.$emit("update:modelValue", newValue);
const provider = this.getSelectedProviderObject(newValue); },
this.$emit("update:modelValue", provider); },
selectedProviderNumber: {
get: function () {
return this.selectedValue?.providerNumber;
},
set: function (newValue) {
// Button Question only supports Number, or String data types so we must get the full object to emit
this.selectedValue = this.getSelectedProviderObject(newValue);
}, },
}, },
displayDropoffInformation() { displayDropoffInformation() {
@ -198,7 +205,7 @@ export default {
await this.$nextTick(); await this.$nextTick();
this.selectedValue = null; this.selectedProviderNumber = null;
this.$refs.buttonQuestion?.resetField(); this.$refs.buttonQuestion?.resetField();
@ -216,7 +223,7 @@ export default {
if (this.selectedAppointmentType) { if (this.selectedAppointmentType) {
const selectedShopIndex = this.getSelectedProviderIndex( const selectedShopIndex = this.getSelectedProviderIndex(
newValue, newValue,
this.modelValue?.providerNumber this.selectedProviderNumber
); );
if (selectedShopIndex >= 3) { if (selectedShopIndex >= 3) {