Skip to content

Commit

Permalink
Showing 5 changed files with 181 additions and 159 deletions.
4 changes: 2 additions & 2 deletions src/Routes.js
Original file line number Diff line number Diff line change
@@ -85,9 +85,9 @@ const Routes = (props) => (
{/* Order is important for processing links with embedded dataRequestIds */}
<AuthenticatedRoute path="/dar_application/:dataRequestId" component={DataAccessRequestApplication} props={props} rolesAllowed={[USER_ROLES.researcher]} />
<AuthenticatedRoute path="/dar_application" component={DataAccessRequestApplication} props={props} rolesAllowed={[USER_ROLES.researcher]} />
<AuthenticatedRoute path="/signing_official_console/researchers" component={ensureSoHasDaaAcknowledgement(SigningOfficialResearchers)} props={props} rolesAllowed={[USER_ROLES.admin, USER_ROLES.signingOfficial]} />
<AuthenticatedRoute path="/signing_official_console/researchers" component={ensureSoHasDaaAcknowledgement(SigningOfficialResearchers, true)} props={props} rolesAllowed={[USER_ROLES.admin, USER_ROLES.signingOfficial]} />
<AuthenticatedRoute path="/signing_official_console/dar_requests" component={ensureSoHasDaaAcknowledgement(SigningOfficialDarRequests)} props={props} rolesAllowed={[USER_ROLES.admin, USER_ROLES.signingOfficial]} />
{checkEnv(envGroups.NON_STAGING) && <AuthenticatedRoute path="/signing_official_console/data_submitters" component={ensureSoHasDaaAcknowledgement(SigningOfficialDataSubmitters, true)} props={props} rolesAllowed={[USER_ROLES.admin, USER_ROLES.signingOfficial]} />}
{checkEnv(envGroups.NON_STAGING) && <AuthenticatedRoute path="/signing_official_console/data_submitters" component={ensureSoHasDaaAcknowledgement(SigningOfficialDataSubmitters, false, true)} props={props} rolesAllowed={[USER_ROLES.admin, USER_ROLES.signingOfficial]} />}
<AuthenticatedRoute path="/dataset_submissions" component={DatasetSubmissions} props={props} rolesAllowed={[USER_ROLES.dataSubmitter]}/>
<AuthenticatedRoute path="/dataset_registration/:datasetId" component={DatasetRegistration} props={props} rolesAllowed={[USER_ROLES.admin, USER_ROLES.chairperson]} />
<AuthenticatedRoute path="/dataset_update/:datasetId" component={DatasetUpdateForm} props={props} rolesAllowed={[USER_ROLES.admin, USER_ROLES.chairperson]} />
13 changes: 9 additions & 4 deletions src/components/SigningOfficialDaaAgreementWrapper.js
Original file line number Diff line number Diff line change
@@ -8,6 +8,7 @@ import { useEffect, useState } from 'react';
import { spinnerService } from '../libs/spinner-service';
import { isNil, isNull } from 'lodash';
import { Styles } from '../libs/theme';
import UsgOmbText from './UsgOmbText';

export const SigningOfficialDaaAgreementWrapper = (props) => {
const {
@@ -98,10 +99,14 @@ export const SigningOfficialDaaAgreementWrapper = (props) => {
// Wraps component and ensures that SO agrees to the
// Broad and NIH agreements before proceeding to the given
// component.
export const ensureSoHasDaaAcknowledgement = (component, isDataSubmitterTab=false) => {
return (props) => h(SigningOfficialDaaAgreementWrapper, {isDataSubmitterTab}, [
h(component, props),
]);
export const ensureSoHasDaaAcknowledgement = (component, isLibraryCardIssueTable = false, isDataSubmitterTab = false) => {
return (props) => (
div({}, [
h(SigningOfficialDaaAgreementWrapper, { isDataSubmitterTab }, [
h(component, props),
]),
isLibraryCardIssueTable && UsgOmbText()
]));
};

export default SigningOfficialDaaAgreementWrapper;
9 changes: 9 additions & 0 deletions src/components/UsgOmbText.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

48 changes: 26 additions & 22 deletions src/pages/DataSubmissionForm.js
Original file line number Diff line number Diff line change
@@ -18,6 +18,7 @@ import NihAnvilUse from '../components/data_submission/NihAnvilUse';
// schama changes, then run `npm run genschemas` to regenerate this code
import validateSchema from '../assets/schemas/DataRegistrationV1Validation';
import { set } from 'lodash';
import UsgOmbText from '../components/UsgOmbText';

export const DataSubmissionForm = (props) => {
const {
@@ -152,36 +153,39 @@ export const DataSubmissionForm = (props) => {
};


return !failedInit && <div style={Styles.PAGE} >
<div style={{ display: 'flex', justifyContent: 'space-between', width: '112%', marginLeft: '-6%', padding: '0 2.5%' }}>
<div className='left-header-section' style={Styles.LEFT_HEADER_SECTION} >
<div style={Styles.ICON_CONTAINER}>
<img id='lock-icon' src={lockIcon} style={Styles.HEADER_IMG} />
</div>
<div style={Styles.HEADER_CONTAINER}>
<div style={Styles.TITLE}>
Study Registration Form
<div style={Styles.MEDIUM_DESCRIPTION}>
Submit new datasets to DUOS
return <div>
{!failedInit && <div style={Styles.PAGE} >
<div style={{ display: 'flex', justifyContent: 'space-between', width: '112%', marginLeft: '-6%', padding: '0 2.5%' }}>
<div className='left-header-section' style={Styles.LEFT_HEADER_SECTION} >
<div style={Styles.ICON_CONTAINER}>
<img id='lock-icon' src={lockIcon} style={Styles.HEADER_IMG} />
</div>
<div style={Styles.HEADER_CONTAINER}>
<div style={Styles.TITLE}>
Study Registration Form
<div style={Styles.MEDIUM_DESCRIPTION}>
Submit new datasets to DUOS
</div>
</div>
</div>
</div>
</div>
</div>

<form style={{ margin: 'auto', maxWidth: 800}}>
<form style={{ margin: 'auto', maxWidth: 800}}>


<DataSubmissionStudyInformation onChange={onChange} validation={formValidation} onValidationChange={onValidationChange} studyEditMode={studyEditMode}/>
<NihAnvilUse onChange={onChange} formData={formData} validation={formValidation} onValidationChange={onValidationChange} studyEditMode={studyEditMode}/>
<NIHAdministrativeInformation formData={formData} onChange={onChange} institutions={institutions} validation={formValidation} onValidationChange={onValidationChange} studyEditMode={studyEditMode}/>
<NIHDataManagement formData={formData} onChange={onChange} onFileChange={onFileChange} validation={formValidation} onValidationChange={onValidationChange} studyEditMode={studyEditMode}/>
<DataAccessGovernance onChange={onChange} onFileChange={onFileChange} validation={formValidation} onValidationChange={onValidationChange} setAllConsentGroupsSaved={setAllConsentGroupsSaved} studyEditMode={studyEditMode}/>
<DataSubmissionStudyInformation onChange={onChange} validation={formValidation} onValidationChange={onValidationChange} studyEditMode={studyEditMode}/>
<NihAnvilUse onChange={onChange} formData={formData} validation={formValidation} onValidationChange={onValidationChange} studyEditMode={studyEditMode}/>
<NIHAdministrativeInformation formData={formData} onChange={onChange} institutions={institutions} validation={formValidation} onValidationChange={onValidationChange} studyEditMode={studyEditMode}/>
<NIHDataManagement formData={formData} onChange={onChange} onFileChange={onFileChange} validation={formValidation} onValidationChange={onValidationChange} studyEditMode={studyEditMode}/>
<DataAccessGovernance onChange={onChange} onFileChange={onFileChange} validation={formValidation} onValidationChange={onValidationChange} setAllConsentGroupsSaved={setAllConsentGroupsSaved} studyEditMode={studyEditMode}/>

<div className='flex flex-row' style={{justifyContent: 'flex-end', marginBottom: '2rem'}}>
<a className='button button-white' onClick={submit}>Submit</a>
</div>
</form>
<div className='flex flex-row' style={{justifyContent: 'flex-end', marginBottom: '2rem'}}>
<a className='button button-white' onClick={submit}>Submit</a>
</div>
</form>
</div>}
<UsgOmbText />
</div>;
};

Loading

0 comments on commit 8edb1d7

Please sign in to comment.