Skip to content

Commit

Permalink
tempfix: disable coalesce on all print tables
Browse files Browse the repository at this point in the history
DEVSU-2540
  • Loading branch information
kttkjl committed Dec 23, 2024
1 parent 69d01a1 commit 040dc6f
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 41 deletions.
43 changes: 21 additions & 22 deletions app/views/ReportView/components/PharmacoGenomicSummary/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -94,11 +94,11 @@ const PharmacoGenomicSummary = ({
loadedDispatch({ type: 'summary-pcp' });
}

if (signatureTypesResp?.length === 0){
if (signatureTypesResp?.length === 0) {
const defaultSigatureTypes = [
{signatureType: 'author'},
{signatureType: 'reviewer'},
{signatureType: 'creator'},
{ signatureType: 'author' },
{ signatureType: 'reviewer' },
{ signatureType: 'creator' },
] as SignatureUserType[];
setSignatureTypes(defaultSigatureTypes);
} else {
Expand Down Expand Up @@ -139,7 +139,8 @@ const PharmacoGenomicSummary = ({
if (isPrint) {
tableComponent = (
<PrintTable
collapseableCols={['gene', 'variant', 'variant.hgvsProtein', 'Alt/Total']}
// DEVSU-2540 - turn off coalescing for now until more permanent solution
// collapseableCols={['gene', 'variant', 'variant.hgvsProtein', 'Alt/Total']}
columnDefs={pharmacoGenomicPrintColumnDefs}
data={pharmacoGenomic}
/>
Expand Down Expand Up @@ -204,23 +205,21 @@ const PharmacoGenomicSummary = ({
return component;
}, [cancerPredisposition, classNamePrefix, isPrint]);

const reviewSignatures = useMemo(() => {
return signatureTypes.map((sigType) => {
let title = sigType.signatureType;
if (sigType.signatureType === 'author') {
title = isPrint ? 'Manual Review' : 'Ready';
}
return (
<SignatureCard
onClick={handleSign}
signatures={signatures}
title={capitalize(title)}
type={sigType.signatureType}
isPrint={isPrint}
/>
);
});
}, [handleSign, isPrint, signatures, signatureTypes]);
const reviewSignatures = useMemo(() => signatureTypes.map((sigType) => {
let title = sigType.signatureType;
if (sigType.signatureType === 'author') {
title = isPrint ? 'Manual Review' : 'Ready';
}
return (
<SignatureCard
onClick={handleSign}
signatures={signatures}
title={capitalize(title)}
type={sigType.signatureType}
isPrint={isPrint}
/>
);
}), [handleSign, isPrint, signatures, signatureTypes]);

const testInformationSection = useMemo(() => {
if (!testInformation) { return null; }
Expand Down
15 changes: 8 additions & 7 deletions app/views/ReportView/components/RapidSummary/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -250,11 +250,11 @@ const RapidSummary = ({
}

if (signatureTypesResp.status === 'fulfilled') {
if (signatureTypesResp.value?.length === 0){
if (signatureTypesResp.value?.length === 0) {
const defaultSigatureTypes = [
{signatureType: 'author'},
{signatureType: 'reviewer'},
{signatureType: 'creator'},
{ signatureType: 'author' },
{ signatureType: 'reviewer' },
{ signatureType: 'creator' },
] as SignatureUserType[];
setSignatureTypes(defaultSigatureTypes);
} else {
Expand All @@ -263,7 +263,6 @@ const RapidSummary = ({
} else if (!isPrint) {
snackbar.error(signatureTypesResp.reason?.content?.error?.message);
}

} catch (err) {
snackbar.error(`Unknown error: ${err}`);
} finally {
Expand Down Expand Up @@ -414,7 +413,8 @@ const RapidSummary = ({
<PrintTable
data={therapeuticAssociationResults}
columnDefs={therapeuticAssociationColDefs.filter((col) => col.headerName !== 'Actions')}
collapseableCols={['genomicEvents', 'Alt/Total (Tumour)', 'tumourAltCount/tumourDepth', 'comments']}
// DEVSU-2540 - turn off coalescing for now until more permanent solution
// collapseableCols={['genomicEvents', 'Alt/Total (Tumour)', 'tumourAltCount/tumourDepth', 'comments']}
fullWidth
/>
);
Expand Down Expand Up @@ -477,7 +477,8 @@ const RapidSummary = ({
<PrintTable
data={cancerRelevanceResults}
columnDefs={cancerRelevanceColDefs.filter((col) => col.headerName !== 'Actions')}
collapseableCols={['genomicEvents', 'Alt/Total (Tumour)', 'tumourAltCount/tumourDepth']}
// DEVSU-2540 - turn off coalescing for now until more permanent solution
// collapseableCols={['genomicEvents', 'Alt/Total (Tumour)', 'tumourAltCount/tumourDepth']}
fullWidth
/>
);
Expand Down
28 changes: 16 additions & 12 deletions app/views/ReportView/components/TherapeuticTargets/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -225,9 +225,10 @@ const Therapeutic = ({
fullWidth
data={therapeuticData}
columnDefs={columnDefs}
collapseableCols={['gene', 'variant']}
outerRowOrderByInternalCol={['evidenceLevel']}
innerRowOrderByInternalCol={['evidenceLevel', 'therapy']}
// DEVSU-2540 - turn off coalescing for now until more permanent solution
// collapseableCols={['gene', 'variant']}
// outerRowOrderByInternalCol={['evidenceLevel']}
// innerRowOrderByInternalCol={['evidenceLevel', 'therapy']}
/>
<Typography
className="therapeutic-print__title"
Expand All @@ -239,9 +240,10 @@ const Therapeutic = ({
fullWidth
data={chemoresistanceData}
columnDefs={columnDefs}
collapseableCols={['gene', 'variant']}
outerRowOrderByInternalCol={['evidenceLevel']}
innerRowOrderByInternalCol={['evidenceLevel']}
// DEVSU-2540 - turn off coalescing for now until more permanent solution
// collapseableCols={['gene', 'variant']}
// outerRowOrderByInternalCol={['evidenceLevel']}
// innerRowOrderByInternalCol={['evidenceLevel']}
/>
</div>
);
Expand All @@ -262,9 +264,10 @@ const Therapeutic = ({
fullWidth
data={therapeuticData}
columnDefs={columnDefs}
collapseableCols={['gene', 'variant']}
outerRowOrderByInternalCol={['evidenceLevel']}
innerRowOrderByInternalCol={['evidenceLevel', 'therapy']}
// DEVSU-2540 - turn off coalescing for now until more permanent solution
// collapseableCols={['gene', 'variant']}
// outerRowOrderByInternalCol={['evidenceLevel']}
// innerRowOrderByInternalCol={['evidenceLevel', 'therapy']}
/>
<br />
<Typography
Expand All @@ -279,9 +282,10 @@ const Therapeutic = ({
fullWidth
data={chemoresistanceData}
columnDefs={columnDefs}
collapseableCols={['gene', 'variant']}
outerRowOrderByInternalCol={['evidenceLevel']}
innerRowOrderByInternalCol={['evidenceLevel']}
// DEVSU-2540 - turn off coalescing for now until more permanent solution
// collapseableCols={['gene', 'variant']}
// outerRowOrderByInternalCol={['evidenceLevel']}
// innerRowOrderByInternalCol={['evidenceLevel']}
/>
</div>
);
Expand Down

0 comments on commit 040dc6f

Please sign in to comment.