Skip to content

Commit

Permalink
Use new location rather than lat/lon fields
Browse files Browse the repository at this point in the history
  • Loading branch information
NoisyFlowers committed May 27, 2024
1 parent a878343 commit 1e362dc
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
6 changes: 4 additions & 2 deletions src/components/Collection/CollectionMutateResults.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,10 @@ const CollectionMutateResults = ({queryParams}) => {
collectors: queryParams.collectors || null,
collectionMethods: queryParams.collectionmethods || null,
collectingComments: queryParams.collectingcomments || null,
lat: parseFloat(queryParams.lat) || null,
lon: parseFloat(queryParams.lon) || null,
location: {
latitude: parseFloat(queryParams.lat) || null,
longitude: parseFloat(queryParams.lon) || null
},
gpsCoordinateUncertainty: parseFloat(queryParams.gpsuncertainty) || null,
geographicResolution: queryParams.geographicresolution || null,
geographicComments: queryParams.geographiccomments || null,
Expand Down
10 changes: 6 additions & 4 deletions src/components/Collection/CollectionSelect.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,10 @@ export const InnerCollectionSelect = (props) => {
name
collectionType
sizeClasses
lat
lon
location {
latitude
longitude
}
gpsCoordinateUncertainty
geographicResolution
geographicComments
Expand Down Expand Up @@ -222,8 +224,8 @@ export const CollectionSelect = (props) => {

formikProps.setFieldValue("collectiontype", collection.collectionType || '');
formikProps.setFieldValue("sizeclasses", collection.sizeClasses || []);
formikProps.setFieldValue("lat", collection.lat || '');
formikProps.setFieldValue("lon", collection.lon || '');
formikProps.setFieldValue("lat", collection.location.latitude || '');
formikProps.setFieldValue("lon", collection.location.longitude || '');
formikProps.setFieldValue("gpsuncertainty", collection.gpsCoordinateUncertainty || '');
formikProps.setFieldValue("geographicresolution", collection.geographicResolution || '');
formikProps.setFieldValue("geographiccomments", collection.geographicComments || '');
Expand Down

0 comments on commit 1e362dc

Please sign in to comment.