From 45b88a8e9db8d94c3c4317018761d016a2fccb64 Mon Sep 17 00:00:00 2001 From: Beecher Baker Date: Tue, 6 Aug 2024 16:36:42 -0400 Subject: [PATCH] add details to Inventory panel and rename it from CollectionObjects panel --- .../PanelCollectionObjects.vue | 85 ---------- .../Panel/PanelCollectionObjects/main.js | 6 - .../Panel/PanelInventory/PanelInventory.vue | 160 ++++++++++++++++++ .../components/Panel/PanelInventory/main.js | 6 + .../otus/constants/layouts/overview.js | 2 +- src/modules/otus/services/TaxonWorks.js | 5 +- 6 files changed, 170 insertions(+), 94 deletions(-) delete mode 100644 src/modules/otus/components/Panel/PanelCollectionObjects/PanelCollectionObjects.vue delete mode 100644 src/modules/otus/components/Panel/PanelCollectionObjects/main.js create mode 100644 src/modules/otus/components/Panel/PanelInventory/PanelInventory.vue create mode 100644 src/modules/otus/components/Panel/PanelInventory/main.js diff --git a/src/modules/otus/components/Panel/PanelCollectionObjects/PanelCollectionObjects.vue b/src/modules/otus/components/Panel/PanelCollectionObjects/PanelCollectionObjects.vue deleted file mode 100644 index ce1f709..0000000 --- a/src/modules/otus/components/Panel/PanelCollectionObjects/PanelCollectionObjects.vue +++ /dev/null @@ -1,85 +0,0 @@ - - - diff --git a/src/modules/otus/components/Panel/PanelCollectionObjects/main.js b/src/modules/otus/components/Panel/PanelCollectionObjects/main.js deleted file mode 100644 index 8b202c9..0000000 --- a/src/modules/otus/components/Panel/PanelCollectionObjects/main.js +++ /dev/null @@ -1,6 +0,0 @@ -import PanelCollectionObjects from "./PanelCollectionObjects.vue"; - -export default { - id: 'panel:collection-objects', - component: PanelCollectionObjects -} \ No newline at end of file diff --git a/src/modules/otus/components/Panel/PanelInventory/PanelInventory.vue b/src/modules/otus/components/Panel/PanelInventory/PanelInventory.vue new file mode 100644 index 0000000..fffa445 --- /dev/null +++ b/src/modules/otus/components/Panel/PanelInventory/PanelInventory.vue @@ -0,0 +1,160 @@ + + + diff --git a/src/modules/otus/components/Panel/PanelInventory/main.js b/src/modules/otus/components/Panel/PanelInventory/main.js new file mode 100644 index 0000000..1c3a28a --- /dev/null +++ b/src/modules/otus/components/Panel/PanelInventory/main.js @@ -0,0 +1,6 @@ +import PanelInventory from "./PanelInventory.vue"; + +export default { + id: 'panel:inventory', + component: PanelInventory +} \ No newline at end of file diff --git a/src/modules/otus/constants/layouts/overview.js b/src/modules/otus/constants/layouts/overview.js index a5f52a2..bceeed6 100644 --- a/src/modules/otus/constants/layouts/overview.js +++ b/src/modules/otus/constants/layouts/overview.js @@ -8,7 +8,7 @@ export const DEFAULT_OVERVIEW_LAYOUT = { 'panel:type-specimen', 'panel:nomenclature', 'panel:nomenclature-references', - 'panel:collection-objects' + 'panel:inventory' ], [ 'panel:map', diff --git a/src/modules/otus/services/TaxonWorks.js b/src/modules/otus/services/TaxonWorks.js index 88024fb..9c11a45 100644 --- a/src/modules/otus/services/TaxonWorks.js +++ b/src/modules/otus/services/TaxonWorks.js @@ -68,9 +68,10 @@ export default class TaxonWorks { @with_buffered_determinations = boolean_param(params, :with_buffered_determinations) @with_buffered_other_labels = boolean_param(params, :with_buffered_other_labels) */ - return makeAPIRequest.get(`/collection_objects?otu_id[]=${otuId}&with_buffered_determination=true`, opt) + // return makeAPIRequest.get(`/collection_objects?otu_id[]=${otuId}&with_buffered_determination=true`, opt) // return makeAPIRequest.get(`/collection_objects?otu_id[]=${otuId}&descendants=true`, opt) - // return makeAPIRequest.get(`/collection_objects?otu_id[]=${otuId}`, opt) + return makeAPIRequest.get(`/collection_objects?otu_id[]=${otuId}`, opt) + // return makeAPIRequest.get(`/collection_objects?otu_id[]=${otuId}/dwc.json`, opt) } static getInventory(otuId, opt) {