-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adapt single dataset view to new model (#227)
- Loading branch information
1 parent
20f5637
commit 04840ec
Showing
18 changed files
with
214 additions
and
237 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,16 +26,9 @@ const DatasetSummary = (props: DataSetDetailsProps) => { | |
const handleClose = () => setShow(false); | ||
|
||
var dacFormLink: string | null = null; | ||
/*if (props.details && props.details.has_data_access_policy.data_request_form) { | ||
dacFormLink = props.details.has_data_access_policy.data_request_form; | ||
}*/ | ||
|
||
const handleOpen = () => { | ||
setCopyEmail( | ||
props.summary !== null && props.summary | ||
? props.summary.dac_email | ||
: "[email protected]" | ||
); | ||
setCopyEmail(props.summary?.dac_email || "[email protected]"); | ||
setShow(true); | ||
}; | ||
|
||
|
@@ -45,7 +38,7 @@ const DatasetSummary = (props: DataSetDetailsProps) => { | |
<div className="fs-7"> | ||
<div className="pe-0 px-0 px-md-2 pt-md-1"> | ||
<div className="float-end ps-0 ps-md-4 ms-1"> | ||
{props.summary !== null && props.summary !== undefined ? ( | ||
{props.summary ? ( | ||
<> | ||
<RequestAccessButton | ||
accession={props.hit.content.accession} | ||
|
@@ -112,11 +105,11 @@ const DatasetSummary = (props: DataSetDetailsProps) => { | |
))} | ||
</p> | ||
</div> | ||
{props.summary !== null && props.summary !== undefined ? ( | ||
{props.summary ? ( | ||
<div> | ||
<Row className="pt-3"> | ||
<Col xs={12} md={6} lg={12} xl={6}> | ||
<DatasetStudies study={props.summary.studies_summary} /> | ||
<DatasetStudies studies={props.summary.studies_summary} /> | ||
<DatasetSamples samples={props.summary.samples_summary} /> | ||
</Col> | ||
<Col> | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -55,9 +55,8 @@ const SingleDatasetView = () => { | |
|
||
const handleOpen = () => { | ||
setCopyEmail( | ||
details !== null && details | ||
? details.data_access_policy.data_access_committee.email | ||
: "[email protected]" | ||
details?.data_access_policy?.data_access_committee?.email || | ||
"[email protected]" | ||
); | ||
setShow(true); | ||
}; | ||
|
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.