diff --git a/tdrs-backend/tdpservice/parsers/test/test_parse.py b/tdrs-backend/tdpservice/parsers/test/test_parse.py
index f6962b1c4..d75abafeb 100644
--- a/tdrs-backend/tdpservice/parsers/test/test_parse.py
+++ b/tdrs-backend/tdpservice/parsers/test/test_parse.py
@@ -43,7 +43,6 @@ def test_parse_small_correct_file(test_datafile, dfs):
]}
assert dfs.get_status() == DataFileSummary.Status.ACCEPTED
-
assert TANF_T1.objects.count() == 1
# spot check
diff --git a/tdrs-backend/tdpservice/parsers/util.py b/tdrs-backend/tdpservice/parsers/util.py
index e3e13538c..6ed48e44e 100644
--- a/tdrs-backend/tdpservice/parsers/util.py
+++ b/tdrs-backend/tdpservice/parsers/util.py
@@ -276,7 +276,6 @@ def transform_to_months(quarter):
case _:
raise ValueError("Invalid quarter value.")
-
def month_to_int(month):
"""Return the integer value of a month."""
return datetime.strptime(month, '%b').strftime('%m')
diff --git a/tdrs-frontend/src/assets/Reports.scss b/tdrs-frontend/src/assets/Reports.scss
index f515530a6..58b89ce6c 100644
--- a/tdrs-frontend/src/assets/Reports.scss
+++ b/tdrs-frontend/src/assets/Reports.scss
@@ -35,6 +35,7 @@
border: none;
text-decoration: underline;
color: #264A64;
+ text-align: left;
}
.section-download:hover {
diff --git a/tdrs-frontend/src/components/SubmissionHistory/SubmissionHistory.jsx b/tdrs-frontend/src/components/SubmissionHistory/SubmissionHistory.jsx
index d7045e15d..55df49364 100644
--- a/tdrs-frontend/src/components/SubmissionHistory/SubmissionHistory.jsx
+++ b/tdrs-frontend/src/components/SubmissionHistory/SubmissionHistory.jsx
@@ -51,6 +51,63 @@ const SubmissionSummaryStatusIcon = ({ status }) => {
)
}
+const CaseAggregatesHeader = ({ section }) =>
+ section === 1 || section === 2 ? (
+ <>
+
+ Month
+ |
+
+ Cases Without Errors
+ |
+
+ Cases With Errors
+ |
+
+ Records Unable To Process
+ |
+ >
+ ) : (
+ <>
+
+ Month
+ |
+
+ Total
+ |
+
+ Cases With Errors
+ |
+ >
+ )
+
+const CaseAggregatesRow = ({ data, section }) =>
+ section === 1 || section === 2 ? (
+ data ? (
+ <>
+ {data.month} |
+ {data.accepted_without_errors} |
+ {data.accepted_with_errors} |
+ >
+ ) : (
+ <>
+ - |
+ N/A |
+ N/A |
+ >
+ )
+ ) : data ? (
+ <>
+ {data.month} |
+ {data.total} |
+ >
+ ) : (
+ <>
+ - |
+ N/A |
+ >
+ )
+
const SubmissionHistoryRow = ({ file }) => {
const dispatch = useDispatch()
@@ -72,35 +129,96 @@ const SubmissionHistoryRow = ({ file }) => {
}
}
+ const section_index = (element) => file.section.includes(element)
+
+ const section = fileUploadSections.findIndex(section_index) + 1
+
return (
-
- {formatDate(file.createdAt)} |
- {file.submittedBy} |
-
-
- |
-
- {file.summary ? (
- <>
-
- {file.summary && file.summary.status
- ? file.summary.status
- : 'Pending'}
- >
- ) : (
- 'N/A'
- )}
- |
-
- {file.hasError > 0 ? (
- |
+
+
+
+
+
+
+
+ >
)
}
@@ -118,18 +236,33 @@ const SectionSubmissionHistory = ({ section, label, files }) => {
const pageEnd = Math.min(files.length, pageStart + pageSize)
return (
-
+
{`Section ${section} - ${label}`}
{files && files.length > 0 ? (
<>
- Submitted On |
- Submitted By |
- File Name |
- Acceptance Status |
- Error Reports (In development) |
+
+ Submitted On
+ |
+
+ Submitted By
+ |
+
+ File Name
+ |
+
+
+ Status
+ |
+
+ Error Reports (In development)
+ |
diff --git a/tdrs-frontend/src/components/SubmissionHistory/SubmissionHistory.test.js b/tdrs-frontend/src/components/SubmissionHistory/SubmissionHistory.test.js
index 1926cce32..abf370523 100644
--- a/tdrs-frontend/src/components/SubmissionHistory/SubmissionHistory.test.js
+++ b/tdrs-frontend/src/components/SubmissionHistory/SubmissionHistory.test.js
@@ -339,13 +339,25 @@ describe('SubmissionHistory', () => {
})
it.each([
- 'Pending',
- 'Accepted',
- 'Accepted with Errors',
- 'Partially Accepted with Errors',
- 'Rejected',
- null,
- ])('Shows the submission acceptance status', (status) => {
+ ['Pending', 'Active Case Data'],
+ ['Pending', 'Closed Case Data'],
+ ['Pending', 'Aggregate Data'],
+ ['Accepted', 'Active Case Data'],
+ ['Accepted', 'Closed Case Data'],
+ ['Accepted', 'Aggregate Data'],
+ ['Accepted with Errors', 'Active Case Data'],
+ ['Accepted with Errors', 'Closed Case Data'],
+ ['Accepted with Errors', 'Aggregate Data'],
+ ['Partially Accepted with Errors', 'Active Case Data'],
+ ['Partially Accepted with Errors', 'Closed Case Data'],
+ ['Partially Accepted with Errors', 'Aggregate Data'],
+ ['Rejected', 'Active Case Data'],
+ ['Rejected', 'Closed Case Data'],
+ ['Rejected', 'Aggregate Data'],
+ [null, 'Active Case Data'],
+ [null, 'Closed Case Data'],
+ [null, 'Aggregate Data'],
+ ])('Shows the submission acceptance status section 3', (status, section) => {
const state = {
reports: {
files: [
@@ -354,7 +366,7 @@ describe('SubmissionHistory', () => {
fileName: 'test1.txt',
fileType: 'TANF',
quarter: 'Q1',
- section: 'Active Case Data',
+ section: section,
uuid: '123-4-4-321',
year: '2023',
s3_version_id: '321-0-0-123',
@@ -392,8 +404,13 @@ describe('SubmissionHistory', () => {
setup(store)
- expect(screen.queryByText('Acceptance Status')).toBeInTheDocument()
+ expect(screen.queryByText('Status')).toBeInTheDocument()
expect(screen.queryByText('test1.txt')).toBeInTheDocument()
- expect(screen.queryByText(status || 'Pending')).toBeInTheDocument()
+
+ if (status && status !== 'Pending') {
+ expect(screen.queryByText(status)).toBeInTheDocument()
+ } else {
+ expect(screen.queryAllByText('Pending')).toHaveLength(2)
+ }
})
})