Fixed modal button validation issue
This commit is contained in:
parent
c4aa209413
commit
33c2401392
1 changed files with 7 additions and 3 deletions
|
|
@ -16,9 +16,7 @@
|
|||
:onModalClosedCallback="onModalClosed"
|
||||
:onModalOpenedCallback="updateSelectedAnswer"
|
||||
:footerButtonText="modalFooterText"
|
||||
:footerButtonDisabled="
|
||||
displayInvalidZipAlert || displayNoShopsAlert || !localSelectedProviderNumber
|
||||
"
|
||||
:footerButtonDisabled="isModalFooterButtonDisabled"
|
||||
@footer-button-event="setZipCodeAndShop">
|
||||
<form @submit.prevent>
|
||||
<serviceZipQuestion
|
||||
|
|
@ -189,6 +187,9 @@ export default {
|
|||
updateSelectedAnswer() {
|
||||
this.localSelectedProviderNumber = this.selectedProviderNumberFromParent;
|
||||
},
|
||||
isModalFooterButtonDisabled() {
|
||||
return this.displayInvalidZipAlert || this.displayNoShopsAlert || !this.localSelectedProviderNumber;
|
||||
},
|
||||
updateShopListWithNextShops(numberToGet = 3) {
|
||||
//gaAction = this.GaActions.SHOPS_FIRST_DISPLAYED; --This needs to actually fire on initial display, can never happen here
|
||||
|
||||
|
|
@ -321,6 +322,9 @@ export default {
|
|||
};
|
||||
});
|
||||
this.answers = mappedData;
|
||||
if (!this.answers.some((a) => String(a.value) === String(this.localSelectedProviderNumber))) {
|
||||
this.localSelectedProviderNumber = null;
|
||||
}
|
||||
// I think we should call our new pushGA Event here with new mapped data
|
||||
this.indexOfLastShopToBeDisplayed = mappedData.length;
|
||||
this.displayNoShopsAlert = this.answers.length === 0;
|
||||
|
|
|
|||
Loading…
Reference in a new issue