diff --git a/src/api/types.ts b/src/api/types.ts
index e4be3f3..41cd401 100644
--- a/src/api/types.ts
+++ b/src/api/types.ts
@@ -97,6 +97,8 @@ export interface HIPProject {
admins?: string[]
members?: string[]
dataset?: BIDSDataset
+ hasDta?: boolean
+ hasEthics?: boolean
}
export interface ImportSubjectDto {
diff --git a/src/components/Projects/Create.tsx b/src/components/Projects/Create.tsx
index 1897fbd..4b62505 100644
--- a/src/components/Projects/Create.tsx
+++ b/src/components/Projects/Create.tsx
@@ -1,7 +1,7 @@
import { useMatomo } from '@jonkoops/matomo-tracker-react'
import { Save } from '@mui/icons-material'
import { LoadingButton } from '@mui/lab'
-import { Box, Grid, TextField, Typography } from '@mui/material'
+import { Box, Checkbox, FormControlLabel, Grid, TextField, Typography } from '@mui/material'
import { Form, Formik } from 'formik'
import * as React from 'react'
import { useNavigate } from 'react-router-dom'
@@ -41,6 +41,8 @@ const initialValues = {
Funding: '',
ReferencesAndLinks: '',
DatasetDOI: '',
+ hasDta: false,
+ hasEthics: false,
}
const CreateProject = () => {
@@ -76,12 +78,14 @@ const CreateProject = () => {
setIsLoading(true)
const adminId = user.uid
- const { title, shortDescription, description, ...datasetDescription } = values
+ const { title, shortDescription, description, hasDta, hasEthics, ...datasetDescription } = values
const project = {
adminId,
title,
shortDescription,
description,
+ hasDta,
+ hasEthics,
datasetDescription: {
...datasetDescription,
Authors: datasetDescription.Authors.split(','),
@@ -135,34 +139,68 @@ const CreateProject = () => {
? errors.title
: 'Title is required'
}
+ sx={{ mb: 2 }}
/>
+
+
+
+
+
+ Permissions
+
+
+ }
+ label='Has Data Transfer Agreement'
+ sx={{ display: 'block', mb: 1 }}
+ />
+
+ }
+ label='Has Ethics Approval'
+ sx={{ display: 'block' }}
+ />
+
@@ -357,6 +395,7 @@ const CreateProject = () => {
}
/>
+
diff --git a/src/components/Sidebar.tsx b/src/components/Sidebar.tsx
index 09d73bf..228312f 100644
--- a/src/components/Sidebar.tsx
+++ b/src/components/Sidebar.tsx
@@ -338,21 +338,23 @@ const Sidebar = () => {
-
- handleClickNavigate(`/projects/${project.name}/transfer`)
- }
- >
-
-
-
-
-
+ {project.hasDta === true && project.hasEthics === true && (
+
+ handleClickNavigate(`/projects/${project.name}/transfer`)
+ }
+ >
+
+
+
+
+
+ )}