-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1105 from sennetconsortium/libpitt/1090-dataset_type
Libpitt/1090 dataset type
- Loading branch information
Showing
25 changed files
with
147 additions
and
229 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
import React from 'react'; | ||
import {Col, Form, Row} from 'react-bootstrap'; | ||
import {QuestionCircleFill} from "react-bootstrap-icons"; | ||
import SenNetPopover from "../../../SenNetPopover"; | ||
import {getUBKGFullName} from "../../js/functions"; | ||
|
||
export default function DatasetType({datasetTypes, data, onChange}) { | ||
|
||
return ( | ||
//Data Types | ||
<> | ||
<Form.Group className="mb-3" controlId="dataset_type"> | ||
<Form.Label>Dataset Type <span | ||
className="required">* </span> | ||
<SenNetPopover className={'dataset_type'} | ||
text={<>The type of data contained in this <code>Dataset</code>. Choose from one | ||
of the available options.</>}> | ||
<QuestionCircleFill/> | ||
</SenNetPopover> | ||
</Form.Label> | ||
|
||
{/*Check that there exists a data type for this dataset and if it is not a part of the list of primary assay types*/} | ||
{data?.dataset_type && !datasetTypes.includes(data.dataset_type) ? | ||
( | ||
<Form.Select required aria-label="Dataset Type" disabled> | ||
<option | ||
value={data.dataset_type}>{getUBKGFullName(data.dataset_type)}</option> | ||
</Form.Select> | ||
) : ( | ||
<Form.Select required aria-label="Dataset Type" | ||
onChange={(e) => onChange(e, 'dataset_type', e.target.value)} | ||
name={'dataset_type'} | ||
defaultValue={data?.dataset_type}> | ||
<option value="">----</option> | ||
{datasetTypes.map(data_type => { | ||
return ( | ||
<option key={data_type} value={data_type.trim()}> | ||
{getUBKGFullName(data_type)} | ||
</option> | ||
); | ||
})} | ||
</Form.Select> | ||
)} | ||
|
||
</Form.Group> | ||
</> | ||
) | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.