Skip to content

Commit

Permalink
Merge branch 'development' into rails7.2
Browse files Browse the repository at this point in the history
  • Loading branch information
LocoDelAssembly committed Nov 26, 2024
2 parents d5e5f8c + 5335765 commit 1998c39
Show file tree
Hide file tree
Showing 6 changed files with 192 additions and 151 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@
<h3>{{ isICN ? 'Basionym' : 'Original combination and rank' }}</h3>
</template>
<template #body>
<div class="original-combination-picker">
<div
class="original-combination-picker"
v-if="taxon.id"
>
<form class="horizontal-left-content">
<div class="button-current separate-right">
<v-btn
Expand Down Expand Up @@ -89,11 +92,7 @@
},
filter: '.item-filter'
}"
:relationships="
isICN
? combinationRanks.SpeciesAndInfraspeciesGroup
: combinationRanks.speciesGroup
"
:relationships="speciesRanks"
/>
<div class="original-combination separate-top separate-bottom">
<div class="flex-wrap-column rank-name-label">
Expand Down Expand Up @@ -172,13 +171,17 @@ export default {
return !!Object.values(this.originalCombinations).length
},
speciesRanks() {
return this.isICN
? this.combinationRanks.SpeciesAndInfraspeciesGroup
: this.combinationRanks.speciesGroup
},
types() {
return Object.assign(
{},
this.combinationRanks.genusGroup,
this.isICN
? this.combinationRanks.SpeciesAndInfraspeciesGroup
: this.combinationRanks.speciesGroup
...this.speciesRanks
)
},
Expand Down
2 changes: 1 addition & 1 deletion app/models/georeference/geo_locate.rb
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ def make_geographic_point(x, y, z = '0.0')
test_grs = []
else
test_grs = GeographicItem::Point
.where("point = ST_GeographyFromText('POINT(? ? ?)')", x.to_f, y.to_f, z.to_f)
.where('point = ST_GeographyFromText(?)', "POINT(#{x.to_f} #{y.to_f} #{z.to_f})")
# .where(['ST_Z(point::geometry) = ?', z.to_f])
end
if test_grs.empty? # put a new one in the array
Expand Down
4 changes: 2 additions & 2 deletions app/models/georeference/verbatim_data.rb
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def initialize(params = {})
if point.nil?
test_grs = []
else
test_grs = GeographicItem::Point.where("point = ST_GeographyFromText('POINT(? ? ?)')", point.x, point.y, point.z)
test_grs = GeographicItem::Point.where('point = ST_GeographyFromText(?)', "POINT(#{point.x} #{point.y} #{point.z})")
end

if test_grs.empty?
Expand All @@ -67,7 +67,7 @@ def dwc_georeference_attributes
verbatimLatitude: collecting_event.verbatim_latitude,
verbatimLongitude: collecting_event.verbatim_longitude,
coordinateUncertaintyInMeters: error_radius,
georeferenceSources: "Physical collection object.",
georeferenceSources: 'Physical collection object.',
georeferenceRemarks: "Derived from a instance of TaxonWorks' Georeference::VerbatimData.",
geodeticDatum: nil # TODO: check
)
Expand Down
2 changes: 1 addition & 1 deletion config/interface/hub/user_tasks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -854,6 +854,7 @@ new_field_occurrence_task:
categories:
- collecting_event
- georeference
- new
status: prototype
description: 'Link OTUs to collecting events. Used when no physical object was collected and returned to a repository.'
debug_geographic_item_task:
Expand Down Expand Up @@ -998,4 +999,3 @@ print_key_task:
categories:
status: prototype
description: 'Format a key for print.'

Loading

0 comments on commit 1998c39

Please sign in to comment.