Skip to content

Commit

Permalink
Merge branch 'hm-duos-2608-read-only-dar-form' into hm-duos-2676-read…
Browse files Browse the repository at this point in the history
…-only-dar-researcher-console
  • Loading branch information
hams7504 committed Sep 29, 2023
2 parents 6c5f271 + 22d2213 commit 4586213
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
11 changes: 6 additions & 5 deletions src/pages/dar_application/DataAccessRequestApplication.js
Original file line number Diff line number Diff line change
Expand Up @@ -124,9 +124,6 @@ const DataAccessRequestApplication = (props) => {
const [isLoading, setIsLoading] = useState(true);
const [isAttested, setIsAttested] = useState(false);

if (!props.readOnlyMode) {
ApplicationTabs.push({ name: 'Data Use Agreement' });
}
const [applicationTabs, setApplicationTabs] = useState(ApplicationTabs);

//helper function to coordinate local state changes as well as updates to form data on the parent
Expand Down Expand Up @@ -190,7 +187,11 @@ const DataAccessRequestApplication = (props) => {
fetchAllDatasets(formData.datasetIds).then((datasets) => {
setDatasets(datasets);
});
}, [formData.datasetIds]);
if (!props.readOnlyMode) {
ApplicationTabs.push({ name: 'Data Use Agreement' });
setApplicationTabs(ApplicationTabs)
}
}, [formData.datasetIds, props.readOnlyMode]);

useEffect(() => {
translateDataUseRestrictionsFromDataUseArray(datasets.map((ds) => ds.dataUse)).then((translations) => {
Expand Down Expand Up @@ -607,4 +608,4 @@ const DataAccessRequestApplication = (props) => {
);
};

export default DataAccessRequestApplication;
export default DataAccessRequestApplication;
4 changes: 2 additions & 2 deletions src/pages/dar_application/ResearcherInfo.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,8 @@ export default function ResearcherInfo(props) {
div({className: 'dar-application-row'}, [
h3('1.2 Researcher Identification' + (formData.checkCollaborator ? ' (optional)' : '')),
span({ className: `${showNihValidationError ? 'errored' : 'default-color'}`, isRendered: formData.checkCollaborator !== true }, [
includeInstructions ? ('Please authenticate with ',
a({ target: '_blank', href: 'https://era.nih.gov/reg-accounts/register-commons.htm' }, ['eRA Commons']), ' in order to proceed.') : ''
includeInstructions ? ['Please authenticate with ',
a({ target: '_blank', href: 'https://era.nih.gov/reg-accounts/register-commons.htm' }, ['eRA Commons']), ' in order to proceed.'] : ''
]),
div({ className: 'flex-row', style: { justifyContent: 'flex-start', alignItems: 'flex-start' } }, [
h4({ style: { marginRight: 30, marginTop: 30 } }, '1.2.1'),
Expand Down

0 comments on commit 4586213

Please sign in to comment.