Skip to content

Commit cde85ba

Browse files
fix build
1 parent d1d5955 commit cde85ba

File tree

8 files changed

+59
-41
lines changed

8 files changed

+59
-41
lines changed

app/src/components/blocks/_admin/reviewsPage/ReviewsPage.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ export const ReviewsPage = ({ setReviewData }: ReviewsPageProps): React.JSX.Elem
209209
recordType = getConfigForDocType(dto.documentSnomedCodeType).content
210210
.reviewList as string;
211211
} catch {}
212-
212+
213213
return {
214214
id: dto.id,
215215
version: dto.version,

app/src/components/blocks/_documentUpload/documentSelectOrderStage/DocumentSelectOrderStage.test.tsx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ describe('DocumentSelectOrderStage', () => {
200200
state: DOCUMENT_UPLOAD_STATE.SELECTED,
201201
numPages: 3,
202202
position: 0,
203-
}
203+
},
204204
];
205205

206206
const expectedDocs = [
@@ -230,7 +230,7 @@ describe('DocumentSelectOrderStage', () => {
230230
state: DOCUMENT_UPLOAD_STATE.SELECTED,
231231
numPages: 3,
232232
position: 0,
233-
}
233+
},
234234
];
235235

236236
mockSetDocuments.mockImplementationOnce((arg) => {
@@ -242,7 +242,9 @@ describe('DocumentSelectOrderStage', () => {
242242
multipleDocuments = arg(multipleDocuments);
243243
});
244244

245-
renderSut(multipleDocuments.filter((doc) => doc.docType === DOCUMENT_TYPE.LLOYD_GEORGE));
245+
renderSut(
246+
multipleDocuments.filter((doc) => doc.docType === DOCUMENT_TYPE.LLOYD_GEORGE),
247+
);
246248

247249
const positionSelect = screen.getByTestId('1');
248250
await user.selectOptions(positionSelect, '2');

app/src/components/blocks/_documentUpload/documentUploadConfirmStage/DocumentUploadConfirmStage.test.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,11 @@ describe('DocumentUploadConfirmStage', () => {
205205

206206
return render(
207207
<ReactRouter.Router navigator={history} location={history.location}>
208-
<DocumentUploadConfirmStage documents={documents} confirmFiles={mockConfirmFiles} />
208+
<DocumentUploadConfirmStage
209+
documents={documents}
210+
confirmFiles={mockConfirmFiles}
211+
setDocuments={() => {}}
212+
/>
209213
</ReactRouter.Router>,
210214
);
211215
};

app/src/components/blocks/_documentUpload/documentUploadConfirmStage/DocumentUploadConfirmStage.tsx

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,11 @@ type Props = {
1515
confirmFiles: () => void;
1616
};
1717

18-
const DocumentUploadConfirmStage = ({ documents, setDocuments, confirmFiles }: Props): React.JSX.Element => {
18+
const DocumentUploadConfirmStage = ({
19+
documents,
20+
setDocuments,
21+
confirmFiles,
22+
}: Props): React.JSX.Element => {
1923
const [stitchedBlobLoaded, setStitchedBlobLoaded] = useState(false);
2024
const [currentPreviewDocument, setCurrentPreviewDocument] = useState<
2125
UploadDocument | undefined
@@ -115,7 +119,7 @@ const DocumentUploadConfirmStage = ({ documents, setDocuments, confirmFiles }: P
115119
};
116120

117121
const removeDocument = (docToRemove: UploadDocument): void => {
118-
const updatedDocs = documents.filter(doc => doc.id !== docToRemove.id);
122+
const updatedDocs = documents.filter((doc) => doc.id !== docToRemove.id);
119123

120124
groupDocumentsByType(updatedDocs);
121125

@@ -129,14 +133,13 @@ const DocumentUploadConfirmStage = ({ documents, setDocuments, confirmFiles }: P
129133
const docLists = (): React.JSX.Element[] => {
130134
if (!groupedDocuments) return [];
131135

132-
const canRemoveFiles =
133-
documents.length > 1 &&
134-
hasUnstitchedDocType;
136+
const canRemoveFiles = documents.length > 1 && hasUnstitchedDocType;
135137

136138
return Object.keys(groupedDocuments).map((docType) => {
137139
const documentsForType = groupedDocuments[docType as DOCUMENT_TYPE];
138-
const canPreviewFiles = canRemoveFiles &&
139-
documentsForType.some(doc => doc.file.type === "application/pdf");
140+
const canPreviewFiles =
141+
canRemoveFiles &&
142+
documentsForType.some((doc) => doc.file.type === 'application/pdf');
140143

141144
return (
142145
<DocumentList

app/src/components/blocks/_documentUpload/documentUploadLloydGeorgePreview/DocumentUploadLloydGeorgePreview.tsx

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -72,28 +72,32 @@ const DocumentUploadLloydGeorgePreview = ({
7272
{documentConfig.stitched ? (
7373
<>
7474
<p>
75-
This shows how the final record will look when combined into a single
76-
document.{' '}
75+
This shows how the final record will look when combined into a
76+
single document.{' '}
7777
{journey === 'update' &&
7878
`Any files added will appear after the existing ${documentConfig.displayName}.`}
7979
</p>
8080
<p>
81-
Preview may take longer to load if there are many files or if individual
82-
files are large.
81+
Preview may take longer to load if there are many files or if
82+
individual files are large.
8383
</p>
8484
{showCurrentlyViewingText && (
85-
<p>You are currently viewing the stitched {documentConfig.displayName}</p>
85+
<p>
86+
You are currently viewing the stitched{' '}
87+
{documentConfig.displayName}
88+
</p>
8689
)}
8790
</>
8891
) : (
8992
<>
9093
<p>
91-
You can preview your PDF files to check they are for the correct patient. If
92-
some of your files are not PDFs, you will not see them in this preview.
94+
You can preview your PDF files to check they are for the correct
95+
patient. If some of your files are not PDFs, you will not see them
96+
in this preview.
9397
</p>
9498
<p>
95-
Preview may take longer to load if there are many files or if individual
96-
files are large.
99+
Preview may take longer to load if there are many files or if
100+
individual files are large.
97101
</p>
98102
{showCurrentlyViewingText && (
99103
<p>You are currently viewing: {documents[0]?.file.name}</p>

app/src/helpers/utils/documentType.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,9 @@ export type ContentKey =
2323
| 'previewUploadTitle'
2424
| 'uploadFilesExtraParagraph'
2525
| 'uploadFilesBulletPoints'
26-
| 'skipDocumentLinkText';
26+
| 'skipDocumentLinkText'
27+
| 'confirmFilesTableTitle'
28+
| 'confirmFilesTableParagraph';
2729
export interface IndividualDocumentTypeContent extends Record<ContentKey, string | string[]> {}
2830

2931
// The individual config for each document type

app/src/pages/documentUploadPage/DocumentUploadPage.tsx

Lines changed: 20 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -338,25 +338,28 @@ const DocumentUploadPage = (): React.JSX.Element => {
338338
documentType={documentType}
339339
filesErrorRef={filesErrorPageRef}
340340
documentConfig={documentConfig}
341-
goToNextDocType={hasNextDocType
342-
? () => goToNextDocType(
343-
documentTypeList,
344-
documentType,
345-
setShowSkipLink,
346-
setDocumentType,
347-
documents,
348-
)
349-
: undefined
341+
goToNextDocType={
342+
hasNextDocType
343+
? () =>
344+
goToNextDocType(
345+
documentTypeList,
346+
documentType,
347+
setShowSkipLink,
348+
setDocumentType,
349+
documents,
350+
)
351+
: undefined
350352
}
351353
goToPreviousDocType={
352-
hasPreviousDocType
353-
? () => goToPreviousDocType(
354-
documentTypeList,
355-
documentType,
356-
setShowSkipLink,
357-
setDocumentType,
358-
)
359-
: undefined
354+
hasPreviousDocType
355+
? () =>
356+
goToPreviousDocType(
357+
documentTypeList,
358+
documentType,
359+
setShowSkipLink,
360+
setDocumentType,
361+
)
362+
: undefined
360363
}
361364
showSkiplink={showSkipLink}
362365
/>

app/src/styles/App.scss

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1300,6 +1300,6 @@ progress:not(.continuous-progress-bar) {
13001300
@import '../components/generic/spinnerV2/SpinnerV2.scss';
13011301
@import '../components/blocks/_admin/reviewDetailsNoFilesChoiceStage/ReviewDetailsNoFilesChoiceStage.scss';
13021302
@import '../components/blocks/_admin/reviewDetailsDownloadChoiceStage/ReviewDetailsDownloadChoiceStage.scss';
1303-
@import '../components/blocks/_admin/reviewDetailsNoFilesChoicePage/ReviewDetailsNoFilesChoicePage.scss';
1304-
@import '../components/blocks/_admin/reviewDetailsDownloadChoice/ReviewDetailsDownloadChoice.scss';
1303+
@import '../components/blocks/_admin/reviewDetailsNoFilesChoiceStage/ReviewDetailsNoFilesChoiceStage.scss';
1304+
@import '../components/blocks/_admin/reviewDetailsDownloadChoiceStage/ReviewDetailsDownloadChoiceStage.scss';
13051305
@import '../components/blocks/_documentUpload/documentSelectStage/DocumentSelectStage.scss';

0 commit comments

Comments
 (0)