diff --git a/src/modules/otus/components/Panel/PanelSpecimens/PanelSpecimens.vue b/src/modules/otus/components/Panel/PanelSpecimens/PanelSpecimens.vue
index b9f2ad7..ef3be2a 100644
--- a/src/modules/otus/components/Panel/PanelSpecimens/PanelSpecimens.vue
+++ b/src/modules/otus/components/Panel/PanelSpecimens/PanelSpecimens.vue
@@ -17,26 +17,8 @@
- -
-
-
- {{ makeInventoryLabel(inventoryItem) }}
-
-
-
- -
-
- Full Record ({{Object.keys(inventoryItem).length}} items)
-
-
- - {{ entry[0] }}
- - {{ entry[1] }}
-
-
-
-
-
-
+ -
+
@@ -48,6 +30,7 @@ import { ref, watch } from 'vue'
import PanelDropdown from '../PanelDropdown.vue'
import { useOtuPageRequest } from "@/modules/otus/helpers/useOtuPageRequest.js"
import TaxonWorks from "@/modules/otus/services/TaxonWorks.js"
+import SpecimenSummary from "@/modules/otus/components/Panel/PanelSpecimens/SpecimenSummary.vue"
const props = defineProps({
otuId: {
@@ -59,52 +42,6 @@ const props = defineProps({
const inventoryDWC = ref("Loading...")
const isLoading = ref(false)
-/** Based on taxonpages-orthoptera PanelSpecimentRecords. */
-function makeInventoryLabel(item) {
- return [
- item.catalogNumber,
- makeLocationDescription(item),
- item.year,
- // `length ${JSON.stringify(item).length}`,
- ].filter(Boolean).join("; ")
-}
-
-function makeInventoryDetails(item) {
- return [
- makeInventoryCollectionDate(item),
- item.recordedBy && `Recorded by ${item.recordedBy}`,
- makeIdentifiedByDesccription(item),
- item.georeferencedBy && `Georeferenced by ${item.georeferencedBy}${makeGeoreferenceUncertainty(item)}`,
- // CollectionObject #1234
- item.dwc_occurrence_object_id && `${item.dwc_occurrence_object_type} #${item.dwc_occurrence_object_id}`,
- ].filter(Boolean)
-}
-
-function makeLocationDescription(item) {
- return [
- item.country && item.country,
- item.stateProvince && item.stateProvince,
- item.county && `${item.county} County`,
- ].filter(Boolean).join(", ")
-}
-
-function makeIdentifiedByDesccription(item) {
- return [
- item.identifiedBy && `Identified by ${item.identifiedBy}`,
- item.dateIdentified,
- ].filter(Boolean).join(", ")
-}
-
-function makeInventoryCollectionDate(item) {
- if (!item.year) return null
- const date = new Date(item.year, item.month, item.day)
- return `Collected ${date.toLocaleDateString()}`
-}
-
-function makeGeoreferenceUncertainty(item) {
- return item.coordinateUncertaintyInMeters && ` to within ${item.coordinateUncertaintyInMeters} meters`
-}
-
watch(
() => props.otuId,
async () => {
diff --git a/src/modules/otus/components/Panel/PanelSpecimens/SpecimenSummary.vue b/src/modules/otus/components/Panel/PanelSpecimens/SpecimenSummary.vue
new file mode 100644
index 0000000..5e4250c
--- /dev/null
+++ b/src/modules/otus/components/Panel/PanelSpecimens/SpecimenSummary.vue
@@ -0,0 +1,81 @@
+
+
+
+
+ {{ describeSpecimen(specimen) }}
+
+
+
+ -
+
+ Full Record ({{Object.keys(specimen).length}} items)
+
+
+ - {{ entry[0] }}
+ - {{ entry[1] }}
+
+
+
+
+
+
+
+
+
\ No newline at end of file