This commit is contained in:
Leah Schumann 2023-04-24 11:02:00 -04:00
parent 8ac7007a2a
commit 5933a44bc8
2 changed files with 23 additions and 10 deletions

View file

@ -67,7 +67,7 @@
modalWidgetName="MobileLocationModalWidget" /> modalWidgetName="MobileLocationModalWidget" />
<shopQuestion <shopQuestion
ref="shopQuestion" ref="shopQuestion"
v-if="selectedAppointmentType === 'Inshop' || selectedAppointmentType === 'Dropoff'" v-show="selectedAppointmentType === 'Inshop' || selectedAppointmentType === 'Dropoff'"
v-model="selectedShop" v-model="selectedShop"
:isDropoff="isDropoff" :isDropoff="isDropoff"
:serviceZipCode="zipCode" :serviceZipCode="zipCode"

View file

@ -149,13 +149,19 @@ export default {
await this.$nextTick(); await this.$nextTick();
if (this.shopIndex == this.shops.length) {
this.displaySeeMoreLocationsLink = false;
} else {
this.displaySeeMoreLocationsLink = true;
}
await this.$nextTick();
const container = document.getElementsByClassName("page-container-grouped-styles")[0]; const container = document.getElementsByClassName("page-container-grouped-styles")[0];
container.scrollTo({ top: container.scrollHeight, left: 0, behavior: "smooth" }); container.scrollTo({ top: container.scrollHeight, left: 0, behavior: "smooth" });
if (this.shopIndex == this.shops.length) {
this.displaySeeMoreLocationsLink = false;
}
}, },
resetShopList() { resetShopList() {
this.answers = []; this.answers = [];
@ -167,12 +173,12 @@ export default {
this.$refs.buttonQuestion.resetField(); this.$refs.buttonQuestion.resetField();
}, },
}, },
mounted() { // mounted() {
console.log(this.shopQuestionData) // console.log(this.shopQuestionData);
this.shops = this.shopQuestionData; // this.shops = this.shopQuestionData;
this.getNextShopsFromList() // this.getNextShopsFromList();
console.log(this.shops) // console.log(this.shops);
}, // },
watch: { watch: {
serviceZipCode: { serviceZipCode: {
async handler() { async handler() {
@ -198,6 +204,13 @@ export default {
this.resetShopList(); this.resetShopList();
}, },
}, },
shopQuestionData: {
handler(newValue) {
console.log(newValue)
this.shops = newValue;
this.getNextShopsFromList();
},
}
}, },
}; };
</script> </script>