CASH-1077 | Remove extra zip call
This commit is contained in:
parent
d94f5c03f6
commit
339a2343de
1 changed files with 6 additions and 12 deletions
|
|
@ -257,21 +257,15 @@ export default {
|
|||
this.modal.closeModal();
|
||||
},
|
||||
async onSearchZip(event) {
|
||||
this.isLoading = true;
|
||||
event.preventDefault();
|
||||
if (this.localZipCode) {
|
||||
this.zipCodeData = await this.getZipCodeData(this.localZipCode, "service-location");
|
||||
} else {
|
||||
if (!this.localZipCode) {
|
||||
this.zipCodeData = {
|
||||
containsMilitaryBase: false,
|
||||
isServiceable: false,
|
||||
isValid: false,
|
||||
state: "",
|
||||
zipCode: this.localZipCode,
|
||||
zipCodeCtu: "",
|
||||
};
|
||||
this.isLoading = false;
|
||||
isValid: false
|
||||
}
|
||||
return;
|
||||
}
|
||||
this.isLoading = true;
|
||||
this.zipCodeData = await this.getZipCodeData(this.localZipCode, "service-location");
|
||||
// Add zipCode to zipCodeData as it does not come back from endpoint
|
||||
this.zipCodeData.zipCode = this.localZipCode;
|
||||
if (this.zipCodeData.isValid) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue