diff --git a/app/src/components/blocks/deleteDocumentsStage/DeleteDocumentsStage.tsx b/app/src/components/blocks/deleteDocumentsStage/DeleteDocumentsStage.tsx
index 8c0dc4e09..1308a02ec 100644
--- a/app/src/components/blocks/deleteDocumentsStage/DeleteDocumentsStage.tsx
+++ b/app/src/components/blocks/deleteDocumentsStage/DeleteDocumentsStage.tsx
@@ -136,78 +136,67 @@ function DeleteDocumentsStage({
};
useTitle({ pageTitle: 'Delete files' });
+ const PageIndexView = () => (
+ <>
+
+ Back
+
+ {deletionStage === SUBMISSION_STATE.FAILED && }
+ {showNoOptionSelectedMessage && (
+
+ )}
+
+ >
+ );
+
return (
<>
-
-
- Back
-
- {deletionStage === SUBMISSION_STATE.FAILED && }
- {showNoOptionSelectedMessage && (
-
- )}
-
- >
- }
- />
+ } />
(
+ <>
+ {pageHeader}
+
+ {(submissionState === SUBMISSION_STATE.FAILED ||
+ downloadState === SUBMISSION_STATE.FAILED) && }
+
+
+
+ {submissionState === SUBMISSION_STATE.PENDING && (
+
+ )}
+
+ {submissionState === SUBMISSION_STATE.SUCCEEDED && (
+ <>
+ {searchResults.length && patientDetails ? (
+ <>
+
+
+ >
+ ) : (
+
+
+ There are no documents available for this patient.
+
+
+ )}
+ >
+ )}
+
+ {downloadState === SUBMISSION_STATE.FAILED && (
+
+ )}
+
+ {(submissionState === SUBMISSION_STATE.FAILED ||
+ submissionState === SUBMISSION_STATE.SUCCEEDED) && (
+
+ {
+ e.preventDefault();
+ navigate(routes.START);
+ }}
+ >
+ Start Again
+
+
+ )}
+ >
+ );
+
return (
<>
-
- {pageHeader}
-
- {(submissionState === SUBMISSION_STATE.FAILED ||
- downloadState === SUBMISSION_STATE.FAILED) && }
-
-
-
- {submissionState === SUBMISSION_STATE.PENDING && (
-
- )}
-
- {submissionState === SUBMISSION_STATE.SUCCEEDED && (
- <>
- {searchResults.length && patientDetails ? (
- <>
-
-
- >
- ) : (
-
-
- There are no documents available for this
- patient.
-
-
- )}
- >
- )}
-
- {downloadState === SUBMISSION_STATE.FAILED && (
-
- )}
-
- {(submissionState === SUBMISSION_STATE.FAILED ||
- submissionState === SUBMISSION_STATE.SUCCEEDED) && (
-
- {
- e.preventDefault();
- navigate(routes.START);
- }}
- >
- Start Again
-
-
- )}
- >
- }
- />
+ } />
{
const documentMetadata = uploadSession[doc.file.name];
const documentReference = documentMetadata.fields.key;
- // const documentReference = "test123"
return {
...doc,
state: DOCUMENT_UPLOAD_STATE.UPLOADING,
diff --git a/app/src/types/blocks/lloydGeorgeActions.ts b/app/src/types/blocks/lloydGeorgeActions.ts
index 9373b1471..df88e0760 100644
--- a/app/src/types/blocks/lloydGeorgeActions.ts
+++ b/app/src/types/blocks/lloydGeorgeActions.ts
@@ -1,5 +1,5 @@
import { REPOSITORY_ROLE } from '../generic/authRole';
-import { routeChildren } from '../generic/routes';
+import { routeChildren, routes } from '../generic/routes';
import { LG_RECORD_STAGE } from './lloydGeorgeStages';
export enum RECORD_ACTION {
@@ -7,11 +7,13 @@ export enum RECORD_ACTION {
DOWNLOAD = 1,
}
+type ActionRoute = routeChildren | routes;
+
export type LGRecordActionLink = {
label: string;
key: string;
stage?: LG_RECORD_STAGE;
- href?: unknown;
+ href?: ActionRoute;
onClick?: () => void;
type: RECORD_ACTION;
unauthorised?: Array;