Skip to content

Commit

Permalink
Merge pull request #1298 from culturecreates/bugfix/issue-1294
Browse files Browse the repository at this point in the history
fix: fixed lat and long not updated closes #1294
  • Loading branch information
AbhishekPAnil authored Sep 2, 2024
2 parents b9d40cf + cf2b3bf commit 39fd239
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/pages/Dashboard/CreateNewPlace/CreateNewPlace.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -435,6 +435,8 @@ function CreateNewPlace() {
languageKey,
dynamicFields,
containedInPlaceObj,
latitude,
longitude,
containsPlace = [];

if (calendarContentLanguage == contentLanguage.ENGLISH) languageKey = 'en';
Expand Down Expand Up @@ -521,6 +523,11 @@ function CreateNewPlace() {
};
});
}
if (values?.coordinates) {
const coordinates = values.coordinates.split(',');
latitude = coordinates[0] || undefined;
longitude = coordinates[1] || undefined;
}

placeObj = {
name: {
Expand All @@ -538,8 +545,8 @@ function CreateNewPlace() {
containedInPlace: containedInPlaceObj,
}),
geo: {
latitude: values?.latitude,
longitude: values?.longitude,
latitude,
longitude,
},

...((values?.frenchAccessibilityNote || values?.englishAccessibilityNote) && {
Expand Down

0 comments on commit 39fd239

Please sign in to comment.