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