From 7c5d308d2df8319027286685d5d929346c2d5e25 Mon Sep 17 00:00:00 2001 From: Hamsini Malli Sivakumar Date: Mon, 2 Oct 2023 17:06:52 -0400 Subject: [PATCH] passed in researcher profile for read only dar --- .../dar_application/DataAccessRequestApplication.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/pages/dar_application/DataAccessRequestApplication.js b/src/pages/dar_application/DataAccessRequestApplication.js index ebc23ed65..8512c939b 100644 --- a/src/pages/dar_application/DataAccessRequestApplication.js +++ b/src/pages/dar_application/DataAccessRequestApplication.js @@ -100,6 +100,8 @@ const DataAccessRequestApplication = (props) => { const [formValidation, setFormValidation] = useState({ researcherInfoErrors: {}, darErrors: {}, rusErrors: {} }); + const [researcherProfile, setResearcherProfile] = useState({}); + const [nihValid, setNihValid] = useState(true); const [showNihValidationError, setShowNihValidationError] = useState(false); @@ -189,7 +191,7 @@ const DataAccessRequestApplication = (props) => { }); if (!props.readOnlyMode) { ApplicationTabs.push({ name: 'Data Use Agreement' }); - setApplicationTabs(ApplicationTabs) + setApplicationTabs(ApplicationTabs); } }, [formData.datasetIds, props.readOnlyMode]); @@ -229,6 +231,9 @@ const DataAccessRequestApplication = (props) => { const init = useCallback(async () => { const { dataRequestId, collectionId } = props.match.params; + const collection = await Collections.getCollectionById(collectionId); + const researcherProfile = await User.getById(collection.createUserId); + setResearcherProfile(researcherProfile); let formData = {}; const researcher = await User.getMe(); const signingOfficials = await User.getSOsForCurrentUser(); @@ -533,7 +538,7 @@ const DataAccessRequestApplication = (props) => {