Merge pull request #2515 from Safelite/feature/Digital/CASH-688
CASH-688
This commit is contained in:
commit
2937c6422c
1 changed files with 11 additions and 13 deletions
|
|
@ -225,6 +225,15 @@ export default {
|
||||||
|
|
||||||
return index;
|
return index;
|
||||||
},
|
},
|
||||||
|
async handleUpdate(selectedShopIndex = null) {
|
||||||
|
this.resetAnswers();
|
||||||
|
if (selectedShopIndex >= 3) {
|
||||||
|
await this.getNextShopsFromList(selectedShopIndex + 1);
|
||||||
|
} else {
|
||||||
|
await this.getNextShopsFromList();
|
||||||
|
await nextTick();
|
||||||
|
}
|
||||||
|
},
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
selectedAppointmentType: {
|
selectedAppointmentType: {
|
||||||
|
|
@ -233,27 +242,16 @@ export default {
|
||||||
// nothing to do with this component. We could mitigate this by showing / hiding this component with v-if but that messes
|
// nothing to do with this component. We could mitigate this by showing / hiding this component with v-if but that messes
|
||||||
// up the component initialization on page load.
|
// up the component initialization on page load.
|
||||||
async handler() {
|
async handler() {
|
||||||
await nextTick();
|
this.handleUpdate();
|
||||||
this.resetAnswers();
|
|
||||||
this.getNextShopsFromList();
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
shopProviders: {
|
shopProviders: {
|
||||||
async handler(newValue) {
|
async handler(newValue) {
|
||||||
this.resetAnswers();
|
|
||||||
|
|
||||||
await nextTick();
|
|
||||||
const selectedShopIndex = this.getSelectedProviderIndex(
|
const selectedShopIndex = this.getSelectedProviderIndex(
|
||||||
newValue,
|
newValue,
|
||||||
this.selectedProviderNumber
|
this.selectedProviderNumber
|
||||||
);
|
);
|
||||||
|
this.handleUpdate(selectedShopIndex);
|
||||||
if (selectedShopIndex >= 3) {
|
|
||||||
await this.getNextShopsFromList(selectedShopIndex + 1);
|
|
||||||
} else {
|
|
||||||
await this.getNextShopsFromList();
|
|
||||||
await nextTick();
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue