-
Notifications
You must be signed in to change notification settings - Fork 3
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 #109 from PDCMFinder/dev
Version 2.0
- Loading branch information
Showing
20 changed files
with
695 additions
and
227 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
Binary file not shown.
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 |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import { FC } from "react"; | ||
|
||
export const AnchorLink: FC<{disabled: boolean, label: string, href?: string}> = ({ disabled, label, href}) => { | ||
return <li className="py-3"> | ||
<a | ||
href={href} | ||
className={ | ||
disabled | ||
? "disabled text-muted text-decoration-none" | ||
: "" | ||
} | ||
> | ||
{label} | ||
</a> | ||
</li> | ||
} |
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,20 @@ | ||
import { FunctionComponent } from "react"; | ||
|
||
export interface MetadataItemProps { | ||
value: string; | ||
label: string; | ||
} | ||
|
||
export const MetadataItem: FunctionComponent<MetadataItemProps> = ({ | ||
value, | ||
label, | ||
}) => { | ||
return ( | ||
<> | ||
<dt style={{ fontWeight: "400" }} className="text-capitalize"> | ||
{value || "N/A"} | ||
</dt> | ||
<dl className="text-muted fw-lighter">{label}</dl> | ||
</> | ||
); | ||
}; |
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 |
---|---|---|
@@ -0,0 +1,43 @@ | ||
import React, { FunctionComponent } from "react"; | ||
import { Card, ListGroup, ListGroupItem, Table } from "react-bootstrap"; | ||
import { Publication, Treatment } from "../../models/PDCModel.model"; | ||
|
||
export interface IPublicationsTableProps { | ||
publications: Array<Publication>; | ||
} | ||
|
||
export const PublicationTable: FunctionComponent<IPublicationsTableProps> = ({ | ||
publications, | ||
}) => { | ||
return ( | ||
<> | ||
{publications.map((publication: Publication) => ( | ||
<Card className="my-4"> | ||
<Card.Body> | ||
<Card.Title>{publication.title}</Card.Title> | ||
<Card.Subtitle className="mb-2 text-muted"> | ||
{publication.authorString} | ||
</Card.Subtitle> | ||
<Card.Text> | ||
{publication.journalTitle} - {publication.pubYear} | ||
</Card.Text> | ||
<Card.Link | ||
href={`https://europepmc.org/article/MED/${publication.pmid}`} | ||
target="_blank" | ||
rel="noreferrer" | ||
> | ||
View at EuropePMC | ||
</Card.Link> | ||
<Card.Link | ||
href={`https://doi.org/${publication.doi}`} | ||
target="_blank" | ||
rel="noreferrer" | ||
> | ||
DOI:{publication.doi} | ||
</Card.Link> | ||
</Card.Body> | ||
</Card> | ||
))} | ||
</> | ||
); | ||
}; |
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,116 @@ | ||
import { | ||
faEnvelope, | ||
faExternalLinkAlt, | ||
} from "@fortawesome/free-solid-svg-icons"; | ||
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; | ||
import { FC } from "react"; | ||
import { Button } from "react-bootstrap"; | ||
import { IDetailsTemplateProps } from "../../templates/DetailsTemplate"; | ||
|
||
export const TableOfContent: FC<IDetailsTemplateProps> = ({ | ||
modelType, | ||
engraftments, | ||
qualityChecks, | ||
molecularCharacterizations, | ||
dosingStudies, | ||
patientTreatments, | ||
contactLink, | ||
sourceDatabaseUrl, | ||
providerId, | ||
}) => { | ||
return ( | ||
<> | ||
<h6 className="text-muted my-4">Data available</h6> | ||
<ul className="list-unstyled"> | ||
{modelType === "xenograft" ? ( | ||
<li className="py-3"> | ||
<a | ||
href="#quality-control" | ||
className={ | ||
engraftments.length > 0 | ||
? "" | ||
: "disabled text-muted text-decoration-none" | ||
} | ||
> | ||
PDX model engraftment | ||
</a> | ||
</li> | ||
) : null} | ||
<li className="py-3"> | ||
<a | ||
href="#quality-control" | ||
className={ | ||
qualityChecks.length > 0 | ||
? "" | ||
: "disabled text-muted text-decoration-none" | ||
} | ||
> | ||
Quality control | ||
</a> | ||
</li> | ||
<li className="py-3"> | ||
<a | ||
href="#molecular-data" | ||
className={ | ||
molecularCharacterizations.length > 0 | ||
? "" | ||
: "disabled text-muted text-decoration-none" | ||
} | ||
> | ||
Molecular data | ||
</a> | ||
</li> | ||
<li className="py-3"> | ||
<a | ||
href="#dosing-studies" | ||
className={ | ||
dosingStudies.length > 0 | ||
? "" | ||
: "disabled text-muted text-decoration-none" | ||
} | ||
> | ||
Dosing studies | ||
</a> | ||
</li> | ||
<li className="py-3"> | ||
<a | ||
href="#patient-treatment" | ||
className={ | ||
patientTreatments.length > 0 | ||
? "" | ||
: "disabled text-muted text-decoration-none" | ||
} | ||
> | ||
Patient treatment | ||
</a> | ||
</li> | ||
{/* <li className="py-3"><a href="#publications" className={qualityChecks.length > 0 ? "" : "disabled text-muted text-decoration-none"}>Publications</a></li> */} | ||
<li className="py-3"> | ||
<Button | ||
variant="outline-primary" | ||
href={contactLink} | ||
target="_blank" | ||
className="w-100" | ||
> | ||
<FontAwesomeIcon icon={faEnvelope} /> | ||
Contact provider | ||
</Button> | ||
</li> | ||
|
||
{sourceDatabaseUrl && ( | ||
<li className="py-3"> | ||
<Button | ||
variant="outline-primary" | ||
href={sourceDatabaseUrl} | ||
target="_blank" | ||
className="w-100" | ||
> | ||
<FontAwesomeIcon icon={faExternalLinkAlt} /> | ||
View data at {providerId} | ||
</Button> | ||
</li> | ||
)} | ||
</ul> | ||
</> | ||
); | ||
}; |
Oops, something went wrong.