Skip to content

Commit 6fa0289

Browse files
hide remove all and download all for non pcse
1 parent 8c190f8 commit 6fa0289

File tree

3 files changed

+12
-9
lines changed

3 files changed

+12
-9
lines changed

app/src/components/blocks/_patientDocuments/documentSearchResults/DocumentSearchResults.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ const DocumentSearchResults = (props: Props) => {
2323
Records and documents stored for this patient
2424
</h3>
2525
<Table.Panel>
26-
<Table id="available-files-table-title">
26+
<Table id="available-files-table-title" responsive={true}>
2727
<Table.Head>
2828
<Table.Row>
2929
<Table.Cell className='table-column-header'>Document type</Table.Cell>

app/src/pages/documentSearchResultsPage/DocumentSearchResultsPage.test.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ describe('<DocumentSearchResultsPage />', () => {
119119
},
120120
};
121121

122-
renderPage(history);
122+
renderPage(history, REPOSITORY_ROLE.PCSE);
123123

124124
mockedAxios.get.mockImplementationOnce(() => Promise.reject(errorResponse));
125125

@@ -149,7 +149,7 @@ describe('<DocumentSearchResultsPage />', () => {
149149
},
150150
};
151151

152-
renderPage(history);
152+
renderPage(history, REPOSITORY_ROLE.PCSE);
153153

154154
mockedAxios.get.mockImplementationOnce(() => Promise.reject(errorResponse));
155155

@@ -199,7 +199,7 @@ describe('<DocumentSearchResultsPage />', () => {
199199
data: { message: 'An error occurred', err_code: 'SP_1001' },
200200
},
201201
};
202-
renderPage(history);
202+
renderPage(history, REPOSITORY_ROLE.PCSE);
203203

204204
const downloadButton = await screen.findByRole('button', {
205205
name: 'Download all documents',

app/src/pages/documentSearchResultsPage/DocumentSearchResultsPage.tsx

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -261,11 +261,14 @@ const DocumentSearchResultsPageIndex = ({
261261
searchResults={searchResults}
262262
onViewDocument={onViewDocument}
263263
/>
264-
<DocumentSearchResultsOptions
265-
nhsNumber={nhsNumber}
266-
downloadState={downloadState}
267-
updateDownloadState={setDownloadState}
268-
/>
264+
265+
{role === REPOSITORY_ROLE.PCSE &&
266+
<DocumentSearchResultsOptions
267+
nhsNumber={nhsNumber}
268+
downloadState={downloadState}
269+
updateDownloadState={setDownloadState}
270+
/>
271+
}
269272
</>
270273
) : (
271274
<p>

0 commit comments

Comments
 (0)