Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add readOnly in curation page #481

Open
wants to merge 4 commits into
base: rc
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/main/webapp/app/pages/curation/CurationPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -124,13 +124,13 @@ export const CurationPage = (props: ICurationPageProps) => {
firebaseGeneExists &&
hugoSymbol ? (
<>
{props.readOnly && <ReadOnlyBanner hugoSymbol={hugoSymbol} />}
<div style={{ visibility: mutationListRendered ? 'visible' : 'hidden' }}>
<GeneHeader firebaseGenePath={firebaseGenePath} geneEntity={geneEntity} isReviewing={false} />
<GeneticTypeTabs geneEntity={geneEntity} geneticType={isGermline ? GENETIC_TYPE.GERMLINE : GENETIC_TYPE.SOMATIC} />
<div className="d-flex justify-content-end mt-2 mb-2">
<GeneticTypeTabHeader hugoSymbol={hugoSymbol} isReviewing={false} />
</div>
{props.readOnly && <ReadOnlyBanner hugoSymbol={hugoSymbol} />}
<div className="mb-4">
<Row className={'justify-content-between'}>
<Col className="pb-2">
Expand Down
10 changes: 4 additions & 6 deletions src/main/webapp/app/pages/curation/header/ReadOnlyBanner.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,13 @@ const ReadOnlyBanner = ({ isGermline, hugoSymbol, firebaseDb }: IReadOnlyBanner)
return () => subscribe?.();
}, []);

const handleClose = () => {
setIsVisible(false);
};

return meta && isVisible ? (
<div className="alert alert-primary alert-dismissible fade show d-flex align-items-center" role="alert">
<BiInfoCircle size={25} className="me-2" />
<span>This page is currently in read-only mode because {meta.review.currentReviewer} is currently reviewing.</span>
<button type="button" className="btn-close" aria-label="Close" onClick={handleClose}></button>
<span>
{isGermline ? 'This Germline ' : 'This Somatic '}
is currently in read only mode because {meta.review.currentReviewer} is currently reviewing.
</span>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe The germline section is current in read only mode because {meta.review.currentReviewer} is currently reviewing.

</div>
) : null;
};
Expand Down
Loading