Skip to content

Commit

Permalink
reformatted full dar tab
Browse files Browse the repository at this point in the history
  • Loading branch information
hams7504 committed Sep 29, 2023
1 parent d8c8e05 commit 8c6b509
Showing 1 changed file with 14 additions and 11 deletions.
25 changes: 14 additions & 11 deletions src/pages/dar_application/DataAccessRequestApplication.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,7 @@ import UsgOmbText from '../../components/UsgOmbText';
const ApplicationTabs = [
{ name: 'Researcher Information' },
{ name: 'Data Access Request' },
{ name: 'Research Purpose Statement' },
{ name: 'Data Use Agreement' }
{ name: 'Research Purpose Statement' }
];

const fetchAllDatasets = async (dsIds) => {
Expand Down Expand Up @@ -125,6 +124,9 @@ 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 @@ -579,15 +581,16 @@ const DataAccessRequestApplication = (props) => {
/>
</div>

<div className='step-container'>
{!props.readOnlyMode ? <DataUseAgreements
darCode={formData.darCode}
cancelAttest={() => setIsAttested(false)}
isAttested={isAttested}
attest={attemptSubmit}
save={() => setShowDialogSave(true)}
/> : <div />}
</div>
{!props.readOnlyMode ?
<div className='step-container'>
<DataUseAgreements
darCode={formData.darCode}
cancelAttest={() => setIsAttested(false)}
isAttested={isAttested}
attest={attemptSubmit}
save={() => setShowDialogSave(true)}
/>
</div> : <div />}

{isAttested &&
<div className='step-container'>
Expand Down

0 comments on commit 8c6b509

Please sign in to comment.