CSR-1012 loading spinner and removed updated-service-zip-code event
This commit is contained in:
parent
c8df5e655d
commit
59f2555fac
5 changed files with 12 additions and 6 deletions
|
|
@ -78,8 +78,9 @@ export default {
|
|||
const validationResult = await this.form.validate();
|
||||
if (validationResult.valid) {
|
||||
this.$emit("footer-button-event");
|
||||
} else {
|
||||
this.resetButtonStyle();
|
||||
}
|
||||
this.resetButtonStyle();
|
||||
},
|
||||
resetButtonStyle() {
|
||||
this.$refs.buttonMain.resetButtonStyle();
|
||||
|
|
|
|||
|
|
@ -94,13 +94,13 @@ export default {
|
|||
},
|
||||
mobileLocationLinkText() {
|
||||
if (
|
||||
this.addressModel.streetAddress !== null &&
|
||||
this.addressModel.streetAddress &&
|
||||
this.addressModel.streetAddress !== "" &&
|
||||
this.addressModel.city !== null &&
|
||||
this.addressModel.city &&
|
||||
this.addressModel.city !== "" &&
|
||||
this.addressModel.state !== null &&
|
||||
this.addressModel.state &&
|
||||
this.addressModel.state !== "" &&
|
||||
this.addressModel.zipCode !== null &&
|
||||
this.addressModel.zipCode &&
|
||||
this.addressModel.zipCode !== ""
|
||||
) {
|
||||
return `${this.addressModel.streetAddress}\n${this.addressModel.city}, ${this.addressModel.state} ${this.addressModel.zipCode}`;
|
||||
|
|
|
|||
|
|
@ -6,7 +6,6 @@
|
|||
<funnelSubHeader cmsWidgetName="FunnelSubHeaderWidget" />
|
||||
<serviceZipModalQuestion
|
||||
v-model="serviceZipCodeQuestion"
|
||||
@updated-service-zip-code="resetMobileLocation"
|
||||
ref="serviceZipCodeQuestion"
|
||||
linkWidgetName="ServiceZipLinkWidget"
|
||||
modalWidgetName="ServiceZipModalWidget" />
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@ jest.mock("@/digital-components/textbox-question/textbox-question", () => ({
|
|||
jest.mock("@/digital-components/modal/modal", () => ({
|
||||
methods: {
|
||||
closeModal: jest.fn(),
|
||||
resetButtonStyle: jest.fn(),
|
||||
},
|
||||
}));
|
||||
|
||||
|
|
|
|||
|
|
@ -116,6 +116,10 @@ export default {
|
|||
this.$refs[this.modalName].closeModal();
|
||||
},
|
||||
|
||||
resetModalButtonStyle() {
|
||||
this.$refs[this.modalName].resetButtonStyle();
|
||||
},
|
||||
|
||||
onInputIdAssigned(inputId) {
|
||||
this.serviceZipCodeTextInputId = inputId;
|
||||
},
|
||||
|
|
@ -134,6 +138,7 @@ export default {
|
|||
this.resetAlerts();
|
||||
|
||||
const zipCodeData = await this.getZipCodeData(this.internalModel.zipCode);
|
||||
this.resetModalButtonStyle();
|
||||
|
||||
if (!zipCodeData.isValid) {
|
||||
this.displayInvalidZipAlert = true;
|
||||
|
|
|
|||
Loading…
Reference in a new issue