Skip to content

Commit 167b364

Browse files
authored
Merge pull request #214 from bcgsc/release/v6.11.0
6.11.0
2 parents 5afdd36 + 91800f5 commit 167b364

File tree

23 files changed

+414
-243
lines changed

23 files changed

+414
-243
lines changed

app/common.d.ts

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,16 @@ declare global {
2525
PUBLIC_PATH: string;
2626
};
2727
}
28+
let CONFIG: {
29+
ATTRS: {
30+
NAME: string;
31+
},
32+
STORAGE: {
33+
REFERRER: string;
34+
KEYCLOAK: string;
35+
DATABASE_TYPE: string;
36+
},
37+
};
2838
}
2939

3040
type RecordDefaults = {
@@ -190,9 +200,12 @@ type ExpOutliersType = {
190200
} & RecordDefaults;
191201

192202
type TemplateType = {
193-
ident: string;
194203
name: string;
195-
};
204+
headerImage: ImageType;
205+
logoImage: ImageType;
206+
organization: string;
207+
sections: string[];
208+
} & RecordDefaults;
196209

197210
type AppendixType = RecordDefaults & {
198211
text: string;

app/components/DataTable/components/ActionCellRenderer/index.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,8 @@ const ActionCellRenderer = ({
8282
setAnchorEl(null);
8383
};
8484

85+
const hasImageData = Array.isArray(data.image) ? data.image.length > 0 : data.image;
86+
8587
return (
8688
<>
8789
{canViewDetails && (
@@ -191,7 +193,7 @@ const ActionCellRenderer = ({
191193
onClose={handleSvgViewerClose}
192194
/>
193195
)}
194-
{data.image && (
196+
{hasImageData && (
195197
<IconButton
196198
aria-label="View Image"
197199
data-testid="image"

app/components/DataTable/index.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ const DataTable = ({
156156
const rowNode = gridApi.getDisplayedRowAtIndex(highlightRow);
157157
const pageSize = gridApi.paginationGetPageSize();
158158
const navigateToPage = Math.floor((highlightRow) / pageSize);
159-
159+
160160
if (navigateToPage !== gridApi.paginationGetCurrentPage()) {
161161
gridApi.paginationGoToPage(navigateToPage);
162162
}
@@ -278,7 +278,7 @@ const DataTable = ({
278278
colApi.setColumnsVisible(returnedHiddenCols, false);
279279

280280
colApi.autoSizeColumns(returnedVisibleCols);
281-
281+
282282
if (syncVisibleColumns) {
283283
syncVisibleColumns(returnedVisibleCols);
284284
}
@@ -424,7 +424,7 @@ const DataTable = ({
424424
pagination={isPaginated}
425425
paginationAutoPageSize={isFullLength}
426426
paginationPageSize={MAX_VISIBLE_ROWS}
427-
autoSizePadding={0}
427+
autoSizePadding={1}
428428
deltaRowDataMode={canReorder}
429429
getRowNodeId={(data) => data.ident}
430430
onRowDragEnd={canReorder ? onRowDragEnd : null}
Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ const PatientEdit = ({
3535
}: PatientEditProps): JSX.Element => {
3636
const { isSigned } = useContext(ConfirmContext);
3737

38-
const [newPatientData, setNewPatientData] = useState();
39-
const [newReportData, setNewReportData] = useState();
38+
const [newPatientData, setNewPatientData] = useState<PatientEditProps['patientInformation']>();
39+
const [newReportData, setNewReportData] = useState(null);
4040
const [patientDirty, setPatientDirty] = useState(false);
4141
const [reportDirty, setReportDirty] = useState(false);
4242
const [isApiCalling, setIsApiCalling] = useState(false);
@@ -51,6 +51,7 @@ const PatientEdit = ({
5151
if (report) {
5252
setNewReportData({
5353
alternateIdentifier: report.alternateIdentifier,
54+
pediatricIds: report.pediatricIds,
5455
biopsyName: report.biopsyName,
5556
});
5657
}
@@ -80,7 +81,12 @@ const PatientEdit = ({
8081
const apiCalls = [];
8182

8283
if (newPatientData) {
83-
apiCalls.push(api.put(`/reports/${report.ident}/patient-information`, newPatientData, {}));
84+
const {
85+
caseType, biopsySite, physician, gender,
86+
} = newPatientData;
87+
apiCalls.push(api.put(`/reports/${report.ident}/patient-information`, {
88+
caseType, biopsySite, physician, gender,
89+
}, {}));
8490
}
8591

8692
if (newReportData) {
@@ -115,6 +121,16 @@ const PatientEdit = ({
115121
multiline
116122
fullWidth
117123
/>
124+
<TextField
125+
className="patient-dialog__text-field"
126+
label="Pediatric Patient IDs"
127+
value={newReportData.pediatricIds}
128+
name="pediatricIds"
129+
onChange={handleReportChange}
130+
variant="outlined"
131+
multiline
132+
fullWidth
133+
/>
118134
<TextField
119135
className="patient-dialog__text-field"
120136
label="Case Type"

app/context/ReportContext/types.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ type UserRoleType = {
3232

3333
type ReportType = {
3434
alternateIdentifier?: string;
35+
pediatricIds?: string;
3536
analysisStartedAt: string | null;
3637
biopsyName?: string;
3738
expression_matrix: string;

0 commit comments

Comments
 (0)