Skip to content

Commit 1f463af

Browse files
Merge pull request #445 from bcgsc/feat/DEVSU-2193-print-report-styling
DEVSU-2193 Print Report Styling
2 parents c015908 + 1ed286b commit 1f463af

File tree

8 files changed

+30
-14
lines changed

8 files changed

+30
-14
lines changed

app/components/SummaryPrintTable/index.tsx

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import {
22
Table, TableCell, TableRow, Typography,
33
} from '@mui/material';
4+
import { Dictionary } from 'lodash';
45
import React from 'react';
56

67
type SummaryPrintTableProps = {
@@ -11,6 +12,15 @@ type SummaryPrintTableProps = {
1112
renderValue?: (value: any) => unknown;
1213
};
1314

15+
const variantTypes = ['cnv', 'smallMutation', 'structuralVariant', 'expression'];
16+
17+
const variantToStrings: Dictionary<string> = {
18+
cnv: 'CNV',
19+
smallMutation: 'Small Mutation',
20+
structuralVariant: 'Structural Variant',
21+
expression: 'Expression',
22+
};
23+
1424
const SummaryPrintTable = ({
1525
data,
1626
labelKey,
@@ -20,7 +30,9 @@ const SummaryPrintTable = ({
2030
<Table padding="none" size="small">
2131
{data.filter((key) => (key.value !== null && key.value !== '')).map(({ [labelKey]: label, [valueKey]: value }) => (
2232
<TableRow>
23-
<TableCell><Typography variant="body2" fontWeight="bold">{label}</Typography></TableCell>
33+
<TableCell>
34+
<Typography variant="body2" fontWeight="bold">{variantTypes.includes(String(label)) ? variantToStrings[String(label)] : label}</Typography>
35+
</TableCell>
2436
<TableCell sx={{ paddingLeft: 1 }}>
2537
{renderValue ? renderValue(value) : value}
2638
</TableCell>

app/components/TumourSummaryEdit/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -391,7 +391,7 @@ const TumourSummaryEdit = ({
391391
return (
392392
<TextField
393393
className="tumour-dialog__text-field"
394-
label="Captiv 8 Score"
394+
label="CAPTIV-8 Score"
395395
value={newReportData.captiv8Score}
396396
name="captiv8Score"
397397
onChange={handleReportChange}
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
.variant-edit-dialog {
2-
&__form-control {
3-
min-width: 160px;
4-
margin: 0 0 16px;
5-
}
6-
}
2+
&__form-control {
3+
min-width: 160px;
4+
margin: 0 0 16px;
5+
}
6+
}

app/views/PrintView/components/RunningCenter/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ const RunningCenter = ({
1111
className,
1212
}: RunningCenterProps): JSX.Element => (
1313
<Typography className={className} variant="caption">
14-
BCCA Confidential - For Research Purposes Only
14+
BC Cancer Confidential - For Research Purposes Only
1515
</Typography>
1616
);
1717

app/views/PrintView/index.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@
4646
&__header-left {
4747
display: flex;
4848
align-items: center;
49+
padding-left: 20px;
4950
}
5051

5152
&__header-right {

app/views/PrintView/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ const PrintTitleBar = ({
9494
)}
9595
</div>
9696
<div className="printbeta__header-right">
97-
<Typography variant="body2">{`${title ? `${title} Report: ` : ''} ${subtitle}${subtitleSuffix ? ` - ${subtitleSuffix}` : ''}`}</Typography>
97+
<Typography variant="h2">{`${title ? `${title} Report: ` : ''} ${subtitle}${subtitleSuffix ? ` - ${subtitleSuffix}` : ''}`}</Typography>
9898
<Typography variant="body2">{biopsyText}</Typography>
9999
</div>
100100
</div>

app/views/ReportView/components/GenomicSummary/components/KeyAlterations/index.tsx

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -204,10 +204,13 @@ const KeyAlterations = ({
204204
data={categorizedDataArray}
205205
labelKey="key"
206206
valueKey="value"
207-
renderValue={(val) => val.map(({ geneVariant }) => (
208-
<Box sx={{ paddingLeft: 0.75, display: 'inline-block' }}>
209-
<Typography variant="caption">{geneVariant}</Typography>
210-
</Box>
207+
renderValue={(val) => val.map(({ geneVariant }, index, arr) => (
208+
<>
209+
<Box sx={{ paddingLeft: 0.75, display: 'inline-block' }}>
210+
<Typography variant="caption">{geneVariant}</Typography>
211+
</Box>
212+
{(index < arr.length - 1 ? ', ' : '')}
213+
</>
211214
))}
212215
/>
213216
</div>

app/views/ReportView/components/GenomicSummary/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ const GenomicSummary = ({
279279
value: msiStatus ?? null,
280280
},
281281
{
282-
term: 'Captiv 8 Score',
282+
term: 'CAPTIV-8 Score',
283283
value: report.captiv8Score !== null
284284
? `${report.captiv8Score}`
285285
: null,

0 commit comments

Comments
 (0)