From 1c7414c5d71902df6acc303ad8894326a50bb312 Mon Sep 17 00:00:00 2001 From: Birdmachine Date: Thu, 29 Aug 2024 14:20:58 -0400 Subject: [PATCH 1/2] Update collection Creators to Contributors, fix rendering of post-group selection --- src/src/components/uuid/groupModal.jsx | 1 - 1 file changed, 1 deletion(-) diff --git a/src/src/components/uuid/groupModal.jsx b/src/src/components/uuid/groupModal.jsx index dcb58103..bf4db9b7 100644 --- a/src/src/components/uuid/groupModal.jsx +++ b/src/src/components/uuid/groupModal.jsx @@ -17,7 +17,6 @@ class GroupModal extends Component { render() { return ( -
From 50c71415fd9b9dffd6eb36f301979ea759ed468e Mon Sep 17 00:00:00 2001 From: Birdmachine Date: Thu, 29 Aug 2024 14:43:13 -0400 Subject: [PATCH 2/2] add missing files for prior commit --- src/src/components/collections/collections.jsx | 12 ++++++------ src/src/components/collections/epicollections.jsx | 12 ++++++------ src/src/components/search/searchTable.jsx | 2 +- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/src/src/components/collections/collections.jsx b/src/src/components/collections/collections.jsx index f85c2659..855236c9 100644 --- a/src/src/components/collections/collections.jsx +++ b/src/src/components/collections/collections.jsx @@ -69,7 +69,7 @@ export function CollectionForm (props){ title:"", description: "", dataset_uuids: "", - creators: [], + contributors: [], // contacts: [], bulk_dataset_uuids:["","",""] }); @@ -77,7 +77,7 @@ export function CollectionForm (props){ title: '', description: '', dataset_uuids: [], - creators: [], + contributors: [], group_uuid:"", // contacts: [], }); @@ -109,8 +109,8 @@ export function CollectionForm (props){ formVals.dataset_uuids = UUIDs setassociatedEntitiesInitial(UUIDs) } - if (editingCollection.creators && editingCollection.creators.length > 0) { - formVals.contributors = editingCollection.creators + if (editingCollection.contributors && editingCollection.contributors.length > 0) { + formVals.contributors = editingCollection.contributors } setFormValues(formVals); setLoadingDatasets(false); @@ -375,8 +375,7 @@ export function CollectionForm (props){ console.debug('%c⊙', 'color:#00ff7b', "contributors",contributors ); if (contributors && (contributors[0] && contributors[0].orcid!==undefined)) { // formValuesSubmit.contributors = contributors - // Still called creators on the back end - formValuesSubmit.creators = contributors + formValuesSubmit.contributors = contributors setFormErrors((prevValues) => ({ ...prevValues, 'contributors': "", @@ -447,6 +446,7 @@ export function CollectionForm (props){ }; const handleCreate = (formSubmit) => { + setOpenGroupModal(false); entity_api_create_entity("collection", formSubmit, props.authToken) .then((response) => { props.onProcessed(response); diff --git a/src/src/components/collections/epicollections.jsx b/src/src/components/collections/epicollections.jsx index ffc1fee8..6c9a5364 100644 --- a/src/src/components/collections/epicollections.jsx +++ b/src/src/components/collections/epicollections.jsx @@ -69,7 +69,7 @@ export function EPICollectionForm (props){ title:"", description: "", dataset_uuids: "", - creators: [], + contributors: [], // contacts: [], bulk_dataset_uuids:["","",""] }); @@ -77,7 +77,7 @@ export function EPICollectionForm (props){ title: '', description: '', dataset_uuids: [], - creators: [], + contributors: [], group_uuid:"", // contacts: [], }); @@ -109,8 +109,8 @@ export function EPICollectionForm (props){ formVals.dataset_uuids = UUIDs setassociatedEntitiesInitial(UUIDs) } - if (editingCollection.creators && editingCollection.creators.length > 0) { - formVals.contributors = editingCollection.creators + if (editingCollection.contributors && editingCollection.contributors.length > 0) { + formVals.contributors = editingCollection.contributors } setFormValues(formVals); setLoadingDatasets(false); @@ -376,8 +376,7 @@ export function EPICollectionForm (props){ console.debug('%c⊙', 'color:#00ff7b', "contributors",contributors ); if (contributors && (contributors[0] && contributors[0].orcid!==undefined)) { // formValuesSubmit.contributors = contributors - // Still called creators on the back end - formValuesSubmit.creators = contributors + formValuesSubmit.contributors = contributors setFormErrors((prevValues) => ({ ...prevValues, 'contributors': "", @@ -454,6 +453,7 @@ export function EPICollectionForm (props){ }; const handleCreate = (formSubmit) => { + setOpenGroupModal(false); entity_api_create_entity("epicollection", formSubmit, props.authToken) .then((response) => { if(response.status === 200){ diff --git a/src/src/components/search/searchTable.jsx b/src/src/components/search/searchTable.jsx index 4d99066b..2725fc92 100644 --- a/src/src/components/search/searchTable.jsx +++ b/src/src/components/search/searchTable.jsx @@ -203,7 +203,7 @@ export const RenderSearchTable = (props) => { }, [allGroups,entityTypeList]); function handlePageChange(pageInfo) { - console.debug("%c⭗", "color:#ff005d", "AAAAAAAAAAAAAAAAAAA", pageInfo); + // console.debug("%c⭗", "color:#ff005d", "AAAAAAAAAAAAAAAAAAA", pageInfo); setPage(pageInfo.page); setPageSize(pageInfo.pageSize); }