Skip to content

Commit

Permalink
Updated: added check on zipcode & made Lat/Lon required fields(hotwax…
Browse files Browse the repository at this point in the history
  • Loading branch information
R-Sourabh committed May 2, 2024
1 parent e5bd37c commit 06224e6
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
12 changes: 10 additions & 2 deletions src/components/FacilityGeoPointModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,14 @@
</ion-button>
</ion-item>
<ion-item>
<ion-input label-placement="floating" :label="translate('Latitude')" type="number" v-model="geoPoint.latitude"/>
<ion-input label-placement="floating" type="number" v-model="geoPoint.latitude">
<div slot="label">{{ translate("Latitude")}}<ion-text color="danger">*</ion-text></div>
</ion-input>
</ion-item>
<ion-item>
<ion-input label-placement="floating" :label="translate('Longitude')" type="number" v-model="geoPoint.longitude"/>
<ion-input label-placement="floating" type="number" v-model="geoPoint.longitude">
<div slot="label">{{ translate("Longitude")}}<ion-text color="danger">*</ion-text></div>
</ion-input>
</ion-item>
</form>
</ion-content>
Expand Down Expand Up @@ -99,6 +103,10 @@ export default defineComponent({
modalController.dismiss()
},
async generateLatLong() {
if(!this.geoPoint.postalCode) {
showToast("Please fill the required Zipcode")
return;
}
this.isGeneratingLatLong = true
const payload = {
json: {
Expand Down
2 changes: 1 addition & 1 deletion src/views/FacilityDetails.vue
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
{{ translate("Latitude & Longitude") }}
</ion-card-title>
</ion-card-header>
<template v-if="postalAddress.latitude || postalAddress.latitude == 0">
<template v-if="postalAddress?.latitude || postalAddress.latitude == 0">
<ion-card-content>
{{ translate("These values are used to help customers lookup how close they are to your stores when they are finding nearby stores.") }}
</ion-card-content>
Expand Down

0 comments on commit 06224e6

Please sign in to comment.