diff --git a/src/couchdb/notebooks.ts b/src/couchdb/notebooks.ts index 93e0e699..275fe00f 100644 --- a/src/couchdb/notebooks.ts +++ b/src/couchdb/notebooks.ts @@ -623,12 +623,14 @@ const csvFormatValue = ( if (fieldType === 'faims-pos::Location') { if (value instanceof Object && 'geometry' in value) { result[fieldName] = value; - result[fieldName + '_latitude'] = value.geometry.coordinates[0]; - result[fieldName + '_longitude'] = value.geometry.coordinates[1]; + result[fieldName + '_latitude'] = value.geometry.coordinates[1]; + result[fieldName + '_longitude'] = value.geometry.coordinates[0]; + result[fieldName + '_accuracy'] = value.properties.accuracy || ''; } else { result[fieldName] = value; result[fieldName + '_latitude'] = ''; result[fieldName + '_longitude'] = ''; + result[fieldName + '_accuracy'] = ''; } return result; } @@ -740,6 +742,8 @@ export const streamNotebookRecordsAsCSV = async ( record.record_id, record.revision_id, record.type, + record.created_by, + record.created.toISOString(), record.updated_by, record.updated.toISOString(), ]; @@ -759,6 +763,8 @@ export const streamNotebookRecordsAsCSV = async ( 'record_id', 'revision_id', 'type', + 'created_by', + 'created', 'updated_by', 'updated', ];