Added code to display invalid zip alert
This commit is contained in:
parent
ba80ae58d2
commit
4562f7679e
1 changed files with 11 additions and 4 deletions
|
|
@ -36,7 +36,7 @@
|
|||
ref="alertInvalidZip"
|
||||
v-if="displayInvalidZipAlert"
|
||||
class="my-4"
|
||||
:cmsWidgetName="AlertInvalidZipWidget"
|
||||
cmsWidgetName="AlertInvalidZipWidget"
|
||||
alertClass="alert-danger"
|
||||
v-bind:isDismissible="false" />
|
||||
</modal>
|
||||
|
|
@ -57,6 +57,7 @@ export default {
|
|||
data() {
|
||||
return {
|
||||
internalModel: this.copyModel(this.modelValue),
|
||||
displayInvalidZipAlert: false,
|
||||
};
|
||||
},
|
||||
props: {
|
||||
|
|
@ -162,11 +163,17 @@ export default {
|
|||
|
||||
async setMobileLocation() {
|
||||
// TODO: Any lookups or actions to be taken before assigning the Mobile Location
|
||||
const zipCodeData = await this.getZipCodeData(this.internalModel.addressQuestions.zipCode);
|
||||
|
||||
// Update the page level model
|
||||
this.$emit("update:modelValue", this.internalModel);
|
||||
if (!zipCodeData.isValid) {
|
||||
this.displayInvalidZipAlert = true;
|
||||
} else {
|
||||
// Update the page level model
|
||||
this.$emit("update:modelValue", this.internalModel);
|
||||
|
||||
this.closeModal();
|
||||
}
|
||||
|
||||
this.closeModal();
|
||||
},
|
||||
},
|
||||
watch: {
|
||||
|
|
|
|||
Loading…
Reference in a new issue