diff --git a/frontend-react/src/App.tsx b/frontend-react/src/App.tsx
index 80dae676cd3..f230471d0ae 100644
--- a/frontend-react/src/App.tsx
+++ b/frontend-react/src/App.tsx
@@ -26,6 +26,7 @@ import GlobalContextProvider from "./components/GlobalContextProvider";
import { logout } from "./utils/UserUtils";
import TermsOfServiceForm from "./pages/tos-sign/TermsOfServiceForm";
import Spinner from "./components/Spinner";
+import Submissions from "./pages/Submissions";
const OKTA_AUTH = new OktaAuth(oktaAuthConfig);
@@ -128,6 +129,11 @@ const App = () => {
authorize={PERMISSIONS.SENDER}
component={Upload}
/>
+
{
);
}
+
+ if (permissionCheck(PERMISSIONS.PRIME_ADMIN, authState)) {
+ itemsMenu.splice(
+ 1,
+ 0,
+
+ Submissions
+
+ );
+ }
}
return (
diff --git a/frontend-react/src/pages/Submissions.tsx b/frontend-react/src/pages/Submissions.tsx
new file mode 100644
index 00000000000..b24773f95dc
--- /dev/null
+++ b/frontend-react/src/pages/Submissions.tsx
@@ -0,0 +1,103 @@
+import { useState, Suspense } from "react";
+import { Helmet } from "react-helmet";
+import { NetworkErrorBoundary } from "rest-hooks";
+import { useOktaAuth } from "@okta/okta-react";
+import moment from "moment";
+
+import { useOrgName } from "../utils/OrganizationUtils";
+import { GLOBAL_STORAGE_KEYS } from "../components/GlobalContextProvider";
+
+import { ErrorPage } from "./error/ErrorPage";
+
+const OrgName = () => {
+ const orgName: string = useOrgName();
+ return (
+
+ {orgName}
+
+ );
+};
+
+function Submissions() {
+ const { authState } = useOktaAuth();
+ const organization = localStorage.getItem(GLOBAL_STORAGE_KEYS.GLOBAL_ORG);
+ const [submissions, setSubmissions] = useState([]);
+
+ fetch(
+ `${process.env.REACT_APP_BACKEND_URL}/api/history/${organization}/submissions`,
+ {
+ headers: {
+ Authorization: `Bearer ${authState?.accessToken?.accessToken}`,
+ },
+ }
+ )
+ .then((res) => res.json())
+ .then((submissionJson) => {
+ setSubmissions(JSON.parse(submissionJson));
+ });
+
+ return (
+ }
+ >
+
+ Submissions | {process.env.REACT_APP_TITLE}
+
+
+
+
+ Loading Info...
+
+ }
+ >
+
+
+
+ COVID-19
+
+
+
+
Submissions
+
+
+
+ Date/time submitted |
+ File |
+ Records |
+ Report ID |
+ Warnings |
+
+
+
+ {submissions.map((s, i) => {
+ return (
+
+
+ {moment
+ .utc(s["createdAt"])
+ .local()
+ .format("YYYY-MM-DD HH:mm")}
+ |
+ | {/* File name */}
+
+ {s["reportItemCount"]}
+ |
+ {s["id"]} |
+ {s["warningCount"]} |
+
+ );
+ })}
+
+
+
+
+
+ );
+}
+
+export default Submissions;