Skip to content

Commit

Permalink
Merge pull request #17 from smartcommunitylab/new-pgAziendale-console
Browse files Browse the repository at this point in the history
fixed messages helping user in location
  • Loading branch information
chin8 authored Dec 4, 2024
2 parents 40ad681 + 2ee6063 commit 3d809e1
Showing 1 changed file with 12 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -725,6 +725,12 @@ export default {
this.copyDate = false;
},
/************* ✨ Codeium Command ⭐ *************/
/**
* Checks if the address form is valid.
* @returns {boolean} true if the form is valid, false otherwise
*/
/****** 46cb2d65-d5f6-41a1-b82b-c00dbaa7fea7 *******/
addressFormIsValid() {
return (
this.$v.address.$invalid == false &&
Expand All @@ -737,12 +743,17 @@ export default {
);
},
geoSearchResult(results) {
console.log(results);
// console.log(results);
if (this.addressFormIsValid()) {
if (results.length > 0) {
this.addresIsValid = true;
this.geoResults = results;
this.showErrorLocation = false;
this.autoPositionLocation = {
position: { lat: this.geoResults[0].y, lng: this.geoResults[0].x }
}
// this.$refs.geolocationSelector.onSearch({ location: this.geoResults[0] });
} else {
this.showErrorLocation = true;
this.addresIsValid = false;
Expand Down

0 comments on commit 3d809e1

Please sign in to comment.