From 3357e845a4c74cbb248f23575b7d13cd8dd9574d Mon Sep 17 00:00:00 2001 From: Jan Timpe Date: Fri, 11 Oct 2024 10:49:21 -0400 Subject: [PATCH 01/16] show banner and hide errors if file submitted before 5/31/2024 --- .../SubmissionHistory/CaseAggregatesTable.jsx | 52 ++++++++++++------- .../SubmissionHistory/SubmissionHistory.jsx | 40 +++++++++++++- .../TotalAggregatesTable.jsx | 52 ++++++++++++------- 3 files changed, 104 insertions(+), 40 deletions(-) diff --git a/tdrs-frontend/src/components/SubmissionHistory/CaseAggregatesTable.jsx b/tdrs-frontend/src/components/SubmissionHistory/CaseAggregatesTable.jsx index 3ddfe7365..3ad4e060f 100644 --- a/tdrs-frontend/src/components/SubmissionHistory/CaseAggregatesTable.jsx +++ b/tdrs-frontend/src/components/SubmissionHistory/CaseAggregatesTable.jsx @@ -22,10 +22,35 @@ const MonthSubRow = ({ data }) => ) -const CaseAggregatesRow = ({ file }) => { +const CaseAggregatesRow = ({ file, fileIsOutdated }) => { const dispatch = useDispatch() const errorFileName = `${file.year}-${file.quarter}-${file.section}` + const getErrorReportStatus = () => { + if ( + file.summary && + file.summary.status && + file.summary.status !== 'Pending' + ) { + if (fileIsOutdated) { + return 'Not Available' + } else if (file.hasError) { + return ( + + ) + } else { + return 'No Errors' + } + } else { + return 'Pending' + } + } + return ( <> @@ -64,22 +89,7 @@ const CaseAggregatesRow = ({ file }) => { - {file.summary && - file.summary.status && - file.summary.status !== 'Pending' ? ( - file.hasError > 0 ? ( - - ) : ( - 'No Errors' - ) - ) : ( - 'Pending' - )} + {getErrorReportStatus()} @@ -92,7 +102,7 @@ const CaseAggregatesRow = ({ file }) => { ) } -export const CaseAggregatesTable = ({ files }) => ( +export const CaseAggregatesTable = ({ files, fileIsOutdated }) => ( <> @@ -127,7 +137,11 @@ export const CaseAggregatesTable = ({ files }) => ( {files.map((file) => ( - + ))} diff --git a/tdrs-frontend/src/components/SubmissionHistory/SubmissionHistory.jsx b/tdrs-frontend/src/components/SubmissionHistory/SubmissionHistory.jsx index 654339ed6..ba74685ba 100644 --- a/tdrs-frontend/src/components/SubmissionHistory/SubmissionHistory.jsx +++ b/tdrs-frontend/src/components/SubmissionHistory/SubmissionHistory.jsx @@ -1,5 +1,6 @@ import React from 'react' import PropTypes from 'prop-types' +import classNames from 'classnames' import { useDispatch, useSelector } from 'react-redux' import { fileUploadSections } from '../../reducers/reports' import Paginator from '../Paginator' @@ -9,7 +10,12 @@ import { useState } from 'react' import { CaseAggregatesTable } from './CaseAggregatesTable' import { TotalAggregatesTable } from './TotalAggregatesTable' -const SectionSubmissionHistory = ({ section, label, files }) => { +const SectionSubmissionHistory = ({ + section, + label, + files, + fileIsOutdated, +}) => { const pageSize = 5 const [resultsPage, setResultsPage] = useState(1) @@ -30,7 +36,10 @@ const SectionSubmissionHistory = ({ section, label, files }) => { {files && files.length > 0 ? ( - + ) : ( No data available. )} @@ -57,6 +66,7 @@ SectionSubmissionHistory.propTypes = { year: PropTypes.string, }), files: PropTypes.array, + fileIsOutdated: PropTypes.func, } const SubmissionHistory = ({ filterValues }) => { @@ -71,8 +81,33 @@ const SubmissionHistory = ({ filterValues }) => { } }, [hasFetchedFiles, files, dispatch, filterValues]) + let submissionThreshold = new Date('05-31-2024') + const fileIsOutdated = (f) => { + let created_date = new Date(f.createdAt) + return created_date < submissionThreshold + } + + const hasOutdatedSubmissions = () => + files.some((e, i, a) => fileIsOutdated(e)) + return ( <> + {hasOutdatedSubmissions() && ( +
+
+

+ Please note that error reports and submission history content for + files submitted prior to May 31, 2024 may be outdated. Please + resubmit to get access to updated information. +

+
+
+ )} + diff --git a/tdrs-frontend/src/components/SubmissionHistory/TotalAggregatesTable.jsx b/tdrs-frontend/src/components/SubmissionHistory/TotalAggregatesTable.jsx index 3f4ba24a4..14b56d6ad 100644 --- a/tdrs-frontend/src/components/SubmissionHistory/TotalAggregatesTable.jsx +++ b/tdrs-frontend/src/components/SubmissionHistory/TotalAggregatesTable.jsx @@ -20,10 +20,35 @@ const MonthSubRow = ({ data }) => ) -const TotalAggregatesRow = ({ file }) => { +const TotalAggregatesRow = ({ file, fileIsOutdated }) => { const dispatch = useDispatch() const errorFileName = `${file.year}-${file.quarter}-${file.section}` + const getErrorReportStatus = () => { + if ( + file.summary && + file.summary.status && + file.summary.status !== 'Pending' + ) { + if (fileIsOutdated) { + return 'Not Available' + } else if (file.hasError) { + return ( + + ) + } else { + return 'No Errors' + } + } else { + return 'Pending' + } + } + return ( <>
@@ -58,22 +83,7 @@ const TotalAggregatesRow = ({ file }) => { @@ -86,7 +96,7 @@ const TotalAggregatesRow = ({ file }) => { ) } -export const TotalAggregatesTable = ({ files }) => ( +export const TotalAggregatesTable = ({ files, fileIsOutdated }) => ( <> @@ -115,7 +125,11 @@ export const TotalAggregatesTable = ({ files }) => ( {files.map((file) => ( - + ))} From 14cc1367957f9cc5cfe3768695ece7de97a680c6 Mon Sep 17 00:00:00 2001 From: Jan Timpe Date: Fri, 11 Oct 2024 10:57:09 -0400 Subject: [PATCH 02/16] add tests --- .../SubmissionHistory.test.js | 108 ++++++++++++++++++ 1 file changed, 108 insertions(+) diff --git a/tdrs-frontend/src/components/SubmissionHistory/SubmissionHistory.test.js b/tdrs-frontend/src/components/SubmissionHistory/SubmissionHistory.test.js index 325c7d898..dd306afe9 100644 --- a/tdrs-frontend/src/components/SubmissionHistory/SubmissionHistory.test.js +++ b/tdrs-frontend/src/components/SubmissionHistory/SubmissionHistory.test.js @@ -474,4 +474,112 @@ describe('SubmissionHistory', () => { } } ) + + it('Shows the outdated submission banner for old submissions', () => { + const state = { + reports: { + files: [ + { + id: '123', + fileName: 'test1.txt', + fileType: 'TANF', + quarter: 'Q1', + section: 'Active Case Data', + uuid: '123-4-4-321', + year: '2023', + s3_version_id: '321-0-0-123', + createdAt: '08/08/2024 12:12', + submittedBy: 'test@teamraft.com', + summary: { + status: 'Accepted', + }, + }, + { + id: '333', + fileName: 'test2.txt', + fileType: 'TANF', + quarter: 'Q1', + section: 'Active Case Data', + uuid: '123-4-4-321', + year: '2023', + s3_version_id: '321-0-0-123', + createdAt: '12/12/2012 12:12', + submittedBy: 'test@teamraft.com', + summary: { + status: 'Accepted', + }, + }, + ], + }, + } + + const store = appConfigureStore(state) + const dispatch = jest.fn(store.dispatch) + store.dispatch = dispatch + + setup(store) + + expect(screen.queryByText('test1.txt')).toBeInTheDocument() + expect(screen.queryByText('test2.txt')).toBeInTheDocument() + expect( + screen.queryByText( + 'Please note that error reports and submission history content for files submitted prior to May 31, 2024 may be outdated. Please resubmit to get access to updated information.' + ) + ).toBeInTheDocument() + expect(screen.queryByText('Not Available')).toBeInTheDocument() + }) + + it('Does not show outdated submissions banner if no old submissions', () => { + const state = { + reports: { + files: [ + { + id: '123', + fileName: 'test1.txt', + fileType: 'TANF', + quarter: 'Q1', + section: 'Active Case Data', + uuid: '123-4-4-321', + year: '2023', + s3_version_id: '321-0-0-123', + createdAt: '08/08/2024 12:12', + submittedBy: 'test@teamraft.com', + summary: { + status: 'Accepted', + }, + }, + { + id: '333', + fileName: 'test2.txt', + fileType: 'TANF', + quarter: 'Q1', + section: 'Active Case Data', + uuid: '123-4-4-321', + year: '2023', + s3_version_id: '321-0-0-123', + createdAt: '12/12/2024 12:12', + submittedBy: 'test@teamraft.com', + summary: { + status: 'Accepted', + }, + }, + ], + }, + } + + const store = appConfigureStore(state) + const dispatch = jest.fn(store.dispatch) + store.dispatch = dispatch + + setup(store) + + expect(screen.queryByText('test1.txt')).toBeInTheDocument() + expect(screen.queryByText('test2.txt')).toBeInTheDocument() + expect( + screen.queryByText( + 'Please note that error reports and submission history content for files submitted prior to May 31, 2024 may be outdated. Please resubmit to get access to updated information.' + ) + ).not.toBeInTheDocument() + expect(screen.queryByText('Not Available')).not.toBeInTheDocument() + }) }) From 7ee53a6469d514fb8e040f3c42c140f59e9231e7 Mon Sep 17 00:00:00 2001 From: Jan Timpe Date: Tue, 15 Oct 2024 13:22:11 -0400 Subject: [PATCH 03/16] more descriptive param names --- .../src/components/SubmissionHistory/SubmissionHistory.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tdrs-frontend/src/components/SubmissionHistory/SubmissionHistory.jsx b/tdrs-frontend/src/components/SubmissionHistory/SubmissionHistory.jsx index ba74685ba..02bf858f9 100644 --- a/tdrs-frontend/src/components/SubmissionHistory/SubmissionHistory.jsx +++ b/tdrs-frontend/src/components/SubmissionHistory/SubmissionHistory.jsx @@ -88,7 +88,7 @@ const SubmissionHistory = ({ filterValues }) => { } const hasOutdatedSubmissions = () => - files.some((e, i, a) => fileIsOutdated(e)) + files.some((element, index, array) => fileIsOutdated(element)) return ( <> From b098d05272d2ca0200c84261a72ccaa325e28a98 Mon Sep 17 00:00:00 2001 From: Jan Timpe Date: Thu, 24 Oct 2024 09:45:33 -0400 Subject: [PATCH 04/16] include reparse in data files api response --- .../tdpservice/data_files/serializers.py | 40 ++++++++++++++++++- tdrs-frontend/src/reducers/reports.js | 1 + 2 files changed, 39 insertions(+), 2 deletions(-) diff --git a/tdrs-backend/tdpservice/data_files/serializers.py b/tdrs-backend/tdpservice/data_files/serializers.py index f0ab9eac2..aeb19a7c5 100644 --- a/tdrs-backend/tdpservice/data_files/serializers.py +++ b/tdrs-backend/tdpservice/data_files/serializers.py @@ -3,7 +3,7 @@ from rest_framework import serializers from tdpservice.parsers.models import ParserError from tdpservice.data_files.errors import ImmutabilityError -from tdpservice.data_files.models import DataFile +from tdpservice.data_files.models import DataFile, ReparseFileMeta from tdpservice.data_files.validators import ( validate_file_extension, validate_file_infection, @@ -12,8 +12,37 @@ from tdpservice.stts.models import STT from tdpservice.users.models import User from tdpservice.parsers.serializers import DataFileSummarySerializer +from tdpservice.search_indexes.models.reparse_meta import ReparseMeta logger = logging.getLogger(__name__) + + +# class ReparseMetaSerializer(serializers.ModelSerializer): +# """Serializer for ReparseMeta class.""" + +# class Meta: +# """Meta class.""" + +# model = ReparseMeta +# fields = ['created_at'] + +class ReparseFileMetaSerializer(serializers.ModelSerializer): + """Serializer for ReparseFileMeta class.""" + + # reparse_meta = ReparseMetaSerializer(many=False, read_only=True) + + class Meta: + """Meta class.""" + + model = ReparseFileMeta + fields = [ + 'finished', + 'success', + 'started_at', + 'finished_at', + # 'reparse_meta', + ] + class DataFileSerializer(serializers.ModelSerializer): """Serializer for Data files.""" @@ -23,6 +52,8 @@ class DataFileSerializer(serializers.ModelSerializer): ssp = serializers.BooleanField(write_only=True) has_error = serializers.SerializerMethodField() summary = DataFileSummarySerializer(many=False, read_only=True) + # reparse_file_metas = ReparseFileMetaSerializer(many=True, read_only=True) + reparse_file_metas = serializers.SerializerMethodField() class Meta: """Metadata.""" @@ -46,7 +77,8 @@ class Meta: 's3_location', 's3_versioning_id', 'has_error', - 'summary' + 'summary', + 'reparse_file_metas', ] read_only_fields = ("version",) @@ -56,6 +88,10 @@ def get_has_error(self, obj): parser_errors = ParserError.objects.filter(file=obj.id) return len(parser_errors) > 0 + def get_reparse_file_metas(self, instance): + reparse_file_metas = instance.reparse_file_metas.all().order_by('-finished_at') # .first() ? + return ReparseFileMetaSerializer(reparse_file_metas, many=True, read_only=True).data # many=False + def create(self, validated_data): """Create a new entry with a new version number.""" ssp = validated_data.pop('ssp') diff --git a/tdrs-frontend/src/reducers/reports.js b/tdrs-frontend/src/reducers/reports.js index 8c085bd99..ea4c82c3e 100644 --- a/tdrs-frontend/src/reducers/reports.js +++ b/tdrs-frontend/src/reducers/reports.js @@ -68,6 +68,7 @@ export const serializeApiDataFile = (dataFile) => ({ submittedBy: dataFile.submitted_by, hasError: dataFile.has_error, summary: dataFile.summary, + reparse_file_metas: dataFile.reparse_file_metas, }) const initialState = { From a1ffb0d2415fc9857a072d605bf71e6c5f9a8862 Mon Sep 17 00:00:00 2001 From: Jan Timpe Date: Thu, 24 Oct 2024 09:45:45 -0400 Subject: [PATCH 05/16] check reparse finished_at if submission outdated --- .../SubmissionHistory/SubmissionHistory.jsx | 24 +++- .../SubmissionHistory.test.js | 136 ++++++++++++++++++ 2 files changed, 159 insertions(+), 1 deletion(-) diff --git a/tdrs-frontend/src/components/SubmissionHistory/SubmissionHistory.jsx b/tdrs-frontend/src/components/SubmissionHistory/SubmissionHistory.jsx index 02bf858f9..1e17a2719 100644 --- a/tdrs-frontend/src/components/SubmissionHistory/SubmissionHistory.jsx +++ b/tdrs-frontend/src/components/SubmissionHistory/SubmissionHistory.jsx @@ -84,7 +84,29 @@ const SubmissionHistory = ({ filterValues }) => { let submissionThreshold = new Date('05-31-2024') const fileIsOutdated = (f) => { let created_date = new Date(f.createdAt) - return created_date < submissionThreshold + + console.log('testing1') + + if (created_date < submissionThreshold) { + console.log('testing2') + console.log(f) + + if (f.hasOwnProperty('reparse_file_metas')) { + console.log('testing3') + for (const rpm of f.reparse_file_metas) { + console.log('testing4') + let finished_date = new Date(rpm.finished_at) + if (finished_date > submissionThreshold) { + console.log('testing5') + return false + } + } + } + + return true + } + + return false } const hasOutdatedSubmissions = () => diff --git a/tdrs-frontend/src/components/SubmissionHistory/SubmissionHistory.test.js b/tdrs-frontend/src/components/SubmissionHistory/SubmissionHistory.test.js index dd306afe9..e35b2b1af 100644 --- a/tdrs-frontend/src/components/SubmissionHistory/SubmissionHistory.test.js +++ b/tdrs-frontend/src/components/SubmissionHistory/SubmissionHistory.test.js @@ -529,6 +529,74 @@ describe('SubmissionHistory', () => { expect(screen.queryByText('Not Available')).toBeInTheDocument() }) + it('Shows the outdated submission banner for old submissions with old reparses', () => { + const state = { + reports: { + files: [ + { + id: '123', + fileName: 'test1.txt', + fileType: 'TANF', + quarter: 'Q1', + section: 'Active Case Data', + uuid: '123-4-4-321', + year: '2023', + s3_version_id: '321-0-0-123', + createdAt: '08/08/2024 12:12', + submittedBy: 'test@teamraft.com', + summary: { + status: 'Accepted', + }, + reparse_file_metas: [ + { + finished: true, + success: true, + started_at: '2024-10-24T12:39:21+0000', + finished_at: '2023-10-11T00:00:00+0000', + }, + { + finished: true, + success: true, + started_at: '2024-10-24T13:09:15+0000', + finished_at: '2023-10-11T00:00:00+0000', + }, + ], + }, + { + id: '333', + fileName: 'test2.txt', + fileType: 'TANF', + quarter: 'Q1', + section: 'Active Case Data', + uuid: '123-4-4-321', + year: '2023', + s3_version_id: '321-0-0-123', + createdAt: '12/12/2012 12:12', + submittedBy: 'test@teamraft.com', + summary: { + status: 'Accepted', + }, + }, + ], + }, + } + + const store = appConfigureStore(state) + const dispatch = jest.fn(store.dispatch) + store.dispatch = dispatch + + setup(store) + + expect(screen.queryByText('test1.txt')).toBeInTheDocument() + expect(screen.queryByText('test2.txt')).toBeInTheDocument() + expect( + screen.queryByText( + 'Please note that error reports and submission history content for files submitted prior to May 31, 2024 may be outdated. Please resubmit to get access to updated information.' + ) + ).toBeInTheDocument() + expect(screen.queryByText('Not Available')).toBeInTheDocument() + }) + it('Does not show outdated submissions banner if no old submissions', () => { const state = { reports: { @@ -582,4 +650,72 @@ describe('SubmissionHistory', () => { ).not.toBeInTheDocument() expect(screen.queryByText('Not Available')).not.toBeInTheDocument() }) + + it('Does not show the outdated submission banner for old submissions with new reparses', () => { + const state = { + reports: { + files: [ + { + id: '123', + fileName: 'test1.txt', + fileType: 'TANF', + quarter: 'Q1', + section: 'Active Case Data', + uuid: '123-4-4-321', + year: '2023', + s3_version_id: '321-0-0-123', + createdAt: '08/08/2024 12:12', + submittedBy: 'test@teamraft.com', + summary: { + status: 'Accepted', + }, + reparse_file_metas: [ + { + finished: true, + success: true, + started_at: '2024-10-24T12:39:21+0000', + finished_at: '2024-10-11T00:00:00+0000', + }, + { + finished: true, + success: true, + started_at: '2024-10-24T13:09:15+0000', + finished_at: '2023-10-11T00:00:00+0000', + }, + ], + }, + { + id: '333', + fileName: 'test2.txt', + fileType: 'TANF', + quarter: 'Q1', + section: 'Active Case Data', + uuid: '123-4-4-321', + year: '2023', + s3_version_id: '321-0-0-123', + createdAt: '12/12/2012 12:12', + submittedBy: 'test@teamraft.com', + summary: { + status: 'Accepted', + }, + }, + ], + }, + } + + const store = appConfigureStore(state) + const dispatch = jest.fn(store.dispatch) + store.dispatch = dispatch + + setup(store) + + expect(screen.queryByText('test1.txt')).toBeInTheDocument() + expect(screen.queryByText('test2.txt')).toBeInTheDocument() + expect( + screen.queryByText( + 'Please note that error reports and submission history content for files submitted prior to May 31, 2024 may be outdated. Please resubmit to get access to updated information.' + ) + ).toBeInTheDocument() + expect(screen.queryByText('Not Available')).toBeInTheDocument() + }) }) From 82d0bb654a5dea0946d3bc8b2883627120208f9a Mon Sep 17 00:00:00 2001 From: Jan Timpe Date: Thu, 24 Oct 2024 10:05:30 -0400 Subject: [PATCH 06/16] lint, clean up comments --- .../tdpservice/data_files/serializers.py | 17 +++-------------- .../SubmissionHistory/SubmissionHistory.jsx | 8 -------- 2 files changed, 3 insertions(+), 22 deletions(-) diff --git a/tdrs-backend/tdpservice/data_files/serializers.py b/tdrs-backend/tdpservice/data_files/serializers.py index aeb19a7c5..c1f0fb92b 100644 --- a/tdrs-backend/tdpservice/data_files/serializers.py +++ b/tdrs-backend/tdpservice/data_files/serializers.py @@ -12,25 +12,14 @@ from tdpservice.stts.models import STT from tdpservice.users.models import User from tdpservice.parsers.serializers import DataFileSummarySerializer -from tdpservice.search_indexes.models.reparse_meta import ReparseMeta -logger = logging.getLogger(__name__) - - -# class ReparseMetaSerializer(serializers.ModelSerializer): -# """Serializer for ReparseMeta class.""" -# class Meta: -# """Meta class.""" +logger = logging.getLogger(__name__) -# model = ReparseMeta -# fields = ['created_at'] class ReparseFileMetaSerializer(serializers.ModelSerializer): """Serializer for ReparseFileMeta class.""" - # reparse_meta = ReparseMetaSerializer(many=False, read_only=True) - class Meta: """Meta class.""" @@ -40,9 +29,9 @@ class Meta: 'success', 'started_at', 'finished_at', - # 'reparse_meta', ] + class DataFileSerializer(serializers.ModelSerializer): """Serializer for Data files.""" @@ -52,7 +41,6 @@ class DataFileSerializer(serializers.ModelSerializer): ssp = serializers.BooleanField(write_only=True) has_error = serializers.SerializerMethodField() summary = DataFileSummarySerializer(many=False, read_only=True) - # reparse_file_metas = ReparseFileMetaSerializer(many=True, read_only=True) reparse_file_metas = serializers.SerializerMethodField() class Meta: @@ -89,6 +77,7 @@ def get_has_error(self, obj): return len(parser_errors) > 0 def get_reparse_file_metas(self, instance): + """Return related reparse_file_metas, ordered by finished_at decending.""" reparse_file_metas = instance.reparse_file_metas.all().order_by('-finished_at') # .first() ? return ReparseFileMetaSerializer(reparse_file_metas, many=True, read_only=True).data # many=False diff --git a/tdrs-frontend/src/components/SubmissionHistory/SubmissionHistory.jsx b/tdrs-frontend/src/components/SubmissionHistory/SubmissionHistory.jsx index 1e17a2719..253478f62 100644 --- a/tdrs-frontend/src/components/SubmissionHistory/SubmissionHistory.jsx +++ b/tdrs-frontend/src/components/SubmissionHistory/SubmissionHistory.jsx @@ -85,19 +85,11 @@ const SubmissionHistory = ({ filterValues }) => { const fileIsOutdated = (f) => { let created_date = new Date(f.createdAt) - console.log('testing1') - if (created_date < submissionThreshold) { - console.log('testing2') - console.log(f) - if (f.hasOwnProperty('reparse_file_metas')) { - console.log('testing3') for (const rpm of f.reparse_file_metas) { - console.log('testing4') let finished_date = new Date(rpm.finished_at) if (finished_date > submissionThreshold) { - console.log('testing5') return false } } From eb8f66105139468cdf8286758344302440c1a4ca Mon Sep 17 00:00:00 2001 From: Jan Timpe Date: Tue, 29 Oct 2024 16:30:14 -0400 Subject: [PATCH 07/16] move outdated submission processing to backend, make configurable --- .../tdpservice/data_files/serializers.py | 26 ++++++++++++-- tdrs-backend/tdpservice/settings/common.py | 5 +++ .../SubmissionHistory/CaseAggregatesTable.jsx | 12 +++---- .../SubmissionHistory/SubmissionHistory.jsx | 35 ++----------------- .../SubmissionHistory.test.js | 12 +++++-- .../TotalAggregatesTable.jsx | 12 +++---- tdrs-frontend/src/reducers/reports.js | 1 + 7 files changed, 51 insertions(+), 52 deletions(-) diff --git a/tdrs-backend/tdpservice/data_files/serializers.py b/tdrs-backend/tdpservice/data_files/serializers.py index c1f0fb92b..2573577c6 100644 --- a/tdrs-backend/tdpservice/data_files/serializers.py +++ b/tdrs-backend/tdpservice/data_files/serializers.py @@ -1,5 +1,7 @@ """Serialize stt data.""" import logging +from django.conf import settings +from django.utils.timezone import make_aware from rest_framework import serializers from tdpservice.parsers.models import ParserError from tdpservice.data_files.errors import ImmutabilityError @@ -42,6 +44,7 @@ class DataFileSerializer(serializers.ModelSerializer): has_error = serializers.SerializerMethodField() summary = DataFileSummarySerializer(many=False, read_only=True) reparse_file_metas = serializers.SerializerMethodField() + has_outdated_error_report = serializers.SerializerMethodField() class Meta: """Metadata.""" @@ -67,6 +70,7 @@ class Meta: 'has_error', 'summary', 'reparse_file_metas', + 'has_outdated_error_report', ] read_only_fields = ("version",) @@ -78,8 +82,26 @@ def get_has_error(self, obj): def get_reparse_file_metas(self, instance): """Return related reparse_file_metas, ordered by finished_at decending.""" - reparse_file_metas = instance.reparse_file_metas.all().order_by('-finished_at') # .first() ? - return ReparseFileMetaSerializer(reparse_file_metas, many=True, read_only=True).data # many=False + reparse_file_metas = instance.reparse_file_metas.all().order_by('-finished_at') + return ReparseFileMetaSerializer(reparse_file_metas.first(), many=False, read_only=True).data + + def get_has_outdated_error_report(self, instance): + """Return a boolean indicating whether the file's error report is outdated.""" + original_submission_date = instance.created_at + + cutoff_date = make_aware(settings.OUTDATED_SUBMISSION_CUTOFF) + + if original_submission_date < cutoff_date: + reparse_file_metas = instance.reparse_file_metas.all().order_by('-finished_at') + + if reparse_file_metas.count() > 0: + last_reparse_date = reparse_file_metas.first().finished_at + if last_reparse_date < cutoff_date: + return True + + return True + + return False def create(self, validated_data): """Create a new entry with a new version number.""" diff --git a/tdrs-backend/tdpservice/settings/common.py b/tdrs-backend/tdpservice/settings/common.py index 6f4e35353..bdbc81568 100644 --- a/tdrs-backend/tdpservice/settings/common.py +++ b/tdrs-backend/tdpservice/settings/common.py @@ -3,6 +3,7 @@ import logging import logging.handlers import os +from django.utils.dateparse import parse_datetime from distutils.util import strtobool from os.path import join from typing import Any, Optional @@ -557,3 +558,7 @@ class Common(Configuration): BULK_CREATE_BATCH_SIZE = os.getenv("BULK_CREATE_BATCH_SIZE", 10000) MEDIAN_LINE_PARSE_TIME = os.getenv("MEDIAN_LINE_PARSE_TIME", 0.0005574226379394531) BYPASS_OFA_AUTH = os.getenv("BYPASS_OFA_AUTH", False) + + OUTDATED_SUBMISSION_CUTOFF = parse_datetime( + os.getenv('OUTDATED_SUBMISSION_CUTOFF', '2024-05-31T00:00:00') + ) diff --git a/tdrs-frontend/src/components/SubmissionHistory/CaseAggregatesTable.jsx b/tdrs-frontend/src/components/SubmissionHistory/CaseAggregatesTable.jsx index 3ad4e060f..20e6def36 100644 --- a/tdrs-frontend/src/components/SubmissionHistory/CaseAggregatesTable.jsx +++ b/tdrs-frontend/src/components/SubmissionHistory/CaseAggregatesTable.jsx @@ -22,7 +22,7 @@ const MonthSubRow = ({ data }) => ) -const CaseAggregatesRow = ({ file, fileIsOutdated }) => { +const CaseAggregatesRow = ({ file }) => { const dispatch = useDispatch() const errorFileName = `${file.year}-${file.quarter}-${file.section}` @@ -32,7 +32,7 @@ const CaseAggregatesRow = ({ file, fileIsOutdated }) => { file.summary.status && file.summary.status !== 'Pending' ) { - if (fileIsOutdated) { + if (file.has_outdated_error_report) { return 'Not Available' } else if (file.hasError) { return ( @@ -102,7 +102,7 @@ const CaseAggregatesRow = ({ file, fileIsOutdated }) => { ) } -export const CaseAggregatesTable = ({ files, fileIsOutdated }) => ( +export const CaseAggregatesTable = ({ files }) => ( <> @@ -137,11 +137,7 @@ export const CaseAggregatesTable = ({ files, fileIsOutdated }) => ( {files.map((file) => ( - + ))} diff --git a/tdrs-frontend/src/components/SubmissionHistory/SubmissionHistory.jsx b/tdrs-frontend/src/components/SubmissionHistory/SubmissionHistory.jsx index 253478f62..78c3b0663 100644 --- a/tdrs-frontend/src/components/SubmissionHistory/SubmissionHistory.jsx +++ b/tdrs-frontend/src/components/SubmissionHistory/SubmissionHistory.jsx @@ -10,12 +10,7 @@ import { useState } from 'react' import { CaseAggregatesTable } from './CaseAggregatesTable' import { TotalAggregatesTable } from './TotalAggregatesTable' -const SectionSubmissionHistory = ({ - section, - label, - files, - fileIsOutdated, -}) => { +const SectionSubmissionHistory = ({ section, label, files }) => { const pageSize = 5 const [resultsPage, setResultsPage] = useState(1) @@ -36,10 +31,7 @@ const SectionSubmissionHistory = ({
{`Section ${section} - ${label}`}
- {file.summary && - file.summary.status && - file.summary.status !== 'Pending' ? ( - file.hasError > 0 ? ( - - ) : ( - 'No Errors' - ) - ) : ( - 'Pending' - )} + {getErrorReportStatus()}
{files && files.length > 0 ? ( - + ) : ( No data available. )} @@ -81,28 +73,8 @@ const SubmissionHistory = ({ filterValues }) => { } }, [hasFetchedFiles, files, dispatch, filterValues]) - let submissionThreshold = new Date('05-31-2024') - const fileIsOutdated = (f) => { - let created_date = new Date(f.createdAt) - - if (created_date < submissionThreshold) { - if (f.hasOwnProperty('reparse_file_metas')) { - for (const rpm of f.reparse_file_metas) { - let finished_date = new Date(rpm.finished_at) - if (finished_date > submissionThreshold) { - return false - } - } - } - - return true - } - - return false - } - const hasOutdatedSubmissions = () => - files.some((element, index, array) => fileIsOutdated(element)) + files.some((element, index, array) => element.has_outdated_error_report) return ( <> @@ -142,7 +114,6 @@ const SubmissionHistory = ({ filterValues }) => { label={section} filterValues={filterValues} files={files.filter((f) => f.section.includes(section))} - fileIsOutdated={fileIsOutdated} /> ))} diff --git a/tdrs-frontend/src/components/SubmissionHistory/SubmissionHistory.test.js b/tdrs-frontend/src/components/SubmissionHistory/SubmissionHistory.test.js index e35b2b1af..351daf416 100644 --- a/tdrs-frontend/src/components/SubmissionHistory/SubmissionHistory.test.js +++ b/tdrs-frontend/src/components/SubmissionHistory/SubmissionHistory.test.js @@ -493,6 +493,7 @@ describe('SubmissionHistory', () => { summary: { status: 'Accepted', }, + has_outdated_error_report: false, }, { id: '333', @@ -508,6 +509,7 @@ describe('SubmissionHistory', () => { summary: { status: 'Accepted', }, + has_outdated_error_report: true, }, ], }, @@ -561,6 +563,7 @@ describe('SubmissionHistory', () => { finished_at: '2023-10-11T00:00:00+0000', }, ], + has_outdated_error_report: true, }, { id: '333', @@ -576,6 +579,7 @@ describe('SubmissionHistory', () => { summary: { status: 'Accepted', }, + has_outdated_error_report: false, }, ], }, @@ -615,6 +619,7 @@ describe('SubmissionHistory', () => { summary: { status: 'Accepted', }, + has_outdated_error_report: false, }, { id: '333', @@ -630,6 +635,7 @@ describe('SubmissionHistory', () => { summary: { status: 'Accepted', }, + has_outdated_error_report: false, }, ], }, @@ -683,6 +689,7 @@ describe('SubmissionHistory', () => { finished_at: '2023-10-11T00:00:00+0000', }, ], + has_outdated_error_report: false, }, { id: '333', @@ -698,6 +705,7 @@ describe('SubmissionHistory', () => { summary: { status: 'Accepted', }, + has_outdated_error_report: false, }, ], }, @@ -715,7 +723,7 @@ describe('SubmissionHistory', () => { screen.queryByText( 'Please note that error reports and submission history content for files submitted prior to May 31, 2024 may be outdated. Please resubmit to get access to updated information.' ) - ).toBeInTheDocument() - expect(screen.queryByText('Not Available')).toBeInTheDocument() + ).not.toBeInTheDocument() + expect(screen.queryByText('Not Available')).not.toBeInTheDocument() }) }) diff --git a/tdrs-frontend/src/components/SubmissionHistory/TotalAggregatesTable.jsx b/tdrs-frontend/src/components/SubmissionHistory/TotalAggregatesTable.jsx index 14b56d6ad..76562b1f7 100644 --- a/tdrs-frontend/src/components/SubmissionHistory/TotalAggregatesTable.jsx +++ b/tdrs-frontend/src/components/SubmissionHistory/TotalAggregatesTable.jsx @@ -20,7 +20,7 @@ const MonthSubRow = ({ data }) => ) -const TotalAggregatesRow = ({ file, fileIsOutdated }) => { +const TotalAggregatesRow = ({ file }) => { const dispatch = useDispatch() const errorFileName = `${file.year}-${file.quarter}-${file.section}` @@ -30,7 +30,7 @@ const TotalAggregatesRow = ({ file, fileIsOutdated }) => { file.summary.status && file.summary.status !== 'Pending' ) { - if (fileIsOutdated) { + if (file.has_outdated_error_report) { return 'Not Available' } else if (file.hasError) { return ( @@ -96,7 +96,7 @@ const TotalAggregatesRow = ({ file, fileIsOutdated }) => { ) } -export const TotalAggregatesTable = ({ files, fileIsOutdated }) => ( +export const TotalAggregatesTable = ({ files }) => ( <> @@ -125,11 +125,7 @@ export const TotalAggregatesTable = ({ files, fileIsOutdated }) => ( {files.map((file) => ( - + ))} diff --git a/tdrs-frontend/src/reducers/reports.js b/tdrs-frontend/src/reducers/reports.js index ea4c82c3e..f26f4f418 100644 --- a/tdrs-frontend/src/reducers/reports.js +++ b/tdrs-frontend/src/reducers/reports.js @@ -69,6 +69,7 @@ export const serializeApiDataFile = (dataFile) => ({ hasError: dataFile.has_error, summary: dataFile.summary, reparse_file_metas: dataFile.reparse_file_metas, + has_outdated_error_report: dataFile.has_outdated_error_report, }) const initialState = { From cc6378101953a19735d28b9159e929ef58af868a Mon Sep 17 00:00:00 2001 From: Jan Timpe Date: Tue, 29 Oct 2024 16:45:34 -0400 Subject: [PATCH 08/16] revert reparse_file_metas change --- tdrs-backend/tdpservice/data_files/serializers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tdrs-backend/tdpservice/data_files/serializers.py b/tdrs-backend/tdpservice/data_files/serializers.py index 2573577c6..a50078fa4 100644 --- a/tdrs-backend/tdpservice/data_files/serializers.py +++ b/tdrs-backend/tdpservice/data_files/serializers.py @@ -83,7 +83,7 @@ def get_has_error(self, obj): def get_reparse_file_metas(self, instance): """Return related reparse_file_metas, ordered by finished_at decending.""" reparse_file_metas = instance.reparse_file_metas.all().order_by('-finished_at') - return ReparseFileMetaSerializer(reparse_file_metas.first(), many=False, read_only=True).data + return ReparseFileMetaSerializer(reparse_file_metas, many=True, read_only=True).data def get_has_outdated_error_report(self, instance): """Return a boolean indicating whether the file's error report is outdated.""" From 11fc44755e9b64cdd439a78de227c55be272fc8c Mon Sep 17 00:00:00 2001 From: Jan Timpe Date: Tue, 29 Oct 2024 17:03:25 -0400 Subject: [PATCH 09/16] add reprocessed indicators to submission history tables --- .../SubmissionHistory/CaseAggregatesTable.jsx | 16 ++++++++++++++++ .../SubmissionHistory/TotalAggregatesTable.jsx | 16 ++++++++++++++++ .../src/components/SubmissionHistory/helpers.jsx | 4 ++++ 3 files changed, 36 insertions(+) diff --git a/tdrs-frontend/src/components/SubmissionHistory/CaseAggregatesTable.jsx b/tdrs-frontend/src/components/SubmissionHistory/CaseAggregatesTable.jsx index 20e6def36..6ac3d27e7 100644 --- a/tdrs-frontend/src/components/SubmissionHistory/CaseAggregatesTable.jsx +++ b/tdrs-frontend/src/components/SubmissionHistory/CaseAggregatesTable.jsx @@ -3,6 +3,8 @@ import { useDispatch } from 'react-redux' import { SubmissionSummaryStatusIcon, formatDate, + hasReparsed, + getReprocessedDate, downloadFile, downloadErrorReport, } from './helpers' @@ -56,6 +58,17 @@ const CaseAggregatesRow = ({ file }) => { + + + diff --git a/tdrs-frontend/src/components/SubmissionHistory/TotalAggregatesTable.jsx b/tdrs-frontend/src/components/SubmissionHistory/TotalAggregatesTable.jsx index 76562b1f7..def81e17f 100644 --- a/tdrs-frontend/src/components/SubmissionHistory/TotalAggregatesTable.jsx +++ b/tdrs-frontend/src/components/SubmissionHistory/TotalAggregatesTable.jsx @@ -3,6 +3,8 @@ import { useDispatch } from 'react-redux' import { SubmissionSummaryStatusIcon, formatDate, + hasReparsed, + getReprocessedDate, downloadFile, downloadErrorReport, } from './helpers' @@ -54,6 +56,17 @@ const TotalAggregatesRow = ({ file }) => { + + + diff --git a/tdrs-frontend/src/components/SubmissionHistory/helpers.jsx b/tdrs-frontend/src/components/SubmissionHistory/helpers.jsx index e0663636f..c4ea58a71 100644 --- a/tdrs-frontend/src/components/SubmissionHistory/helpers.jsx +++ b/tdrs-frontend/src/components/SubmissionHistory/helpers.jsx @@ -26,6 +26,10 @@ export const downloadErrorReport = async (file, reportName) => { console.log(error) } } +export const hasReparsed = (f) => + f.reparse_file_metas && f.reparse_file_metas.length > 0 + +export const getReprocessedDate = (f) => f.reparse_file_metas[0].finished_at export const SubmissionSummaryStatusIcon = ({ status }) => { let icon = null From caf1c8a248ff872afe02440f600fc53f974d820f Mon Sep 17 00:00:00 2001 From: Jan Timpe Date: Tue, 5 Nov 2024 17:29:26 -0500 Subject: [PATCH 10/16] update outdated error report language --- .../SubmissionHistory/CaseAggregatesTable.jsx | 37 +------------------ .../TotalAggregatesTable.jsx | 37 +------------------ .../components/SubmissionHistory/helpers.jsx | 26 +++++++++++++ 3 files changed, 30 insertions(+), 70 deletions(-) diff --git a/tdrs-frontend/src/components/SubmissionHistory/CaseAggregatesTable.jsx b/tdrs-frontend/src/components/SubmissionHistory/CaseAggregatesTable.jsx index 6ac3d27e7..12f53d327 100644 --- a/tdrs-frontend/src/components/SubmissionHistory/CaseAggregatesTable.jsx +++ b/tdrs-frontend/src/components/SubmissionHistory/CaseAggregatesTable.jsx @@ -6,7 +6,7 @@ import { hasReparsed, getReprocessedDate, downloadFile, - downloadErrorReport, + getErrorReportStatus, } from './helpers' const MonthSubRow = ({ data }) => @@ -26,32 +26,6 @@ const MonthSubRow = ({ data }) => const CaseAggregatesRow = ({ file }) => { const dispatch = useDispatch() - const errorFileName = `${file.year}-${file.quarter}-${file.section}` - - const getErrorReportStatus = () => { - if ( - file.summary && - file.summary.status && - file.summary.status !== 'Pending' - ) { - if (file.has_outdated_error_report) { - return 'Not Available' - } else if (file.hasError) { - return ( - - ) - } else { - return 'No Errors' - } - } else { - return 'Pending' - } - } return ( <> @@ -67,10 +41,6 @@ const CaseAggregatesRow = ({ file }) => { )} - - @@ -102,7 +72,7 @@ const CaseAggregatesRow = ({ file }) => { @@ -122,9 +92,6 @@ export const CaseAggregatesTable = ({ files }) => ( - diff --git a/tdrs-frontend/src/components/SubmissionHistory/TotalAggregatesTable.jsx b/tdrs-frontend/src/components/SubmissionHistory/TotalAggregatesTable.jsx index def81e17f..73463ca9e 100644 --- a/tdrs-frontend/src/components/SubmissionHistory/TotalAggregatesTable.jsx +++ b/tdrs-frontend/src/components/SubmissionHistory/TotalAggregatesTable.jsx @@ -6,7 +6,7 @@ import { hasReparsed, getReprocessedDate, downloadFile, - downloadErrorReport, + getErrorReportStatus, } from './helpers' const MonthSubRow = ({ data }) => @@ -24,32 +24,6 @@ const MonthSubRow = ({ data }) => const TotalAggregatesRow = ({ file }) => { const dispatch = useDispatch() - const errorFileName = `${file.year}-${file.quarter}-${file.section}` - - const getErrorReportStatus = () => { - if ( - file.summary && - file.summary.status && - file.summary.status !== 'Pending' - ) { - if (file.has_outdated_error_report) { - return 'Not Available' - } else if (file.hasError) { - return ( - - ) - } else { - return 'No Errors' - } - } else { - return 'Pending' - } - } return ( <> @@ -65,10 +39,6 @@ const TotalAggregatesRow = ({ file }) => { )} - - @@ -96,7 +66,7 @@ const TotalAggregatesRow = ({ file }) => { @@ -116,9 +86,6 @@ export const TotalAggregatesTable = ({ files }) => ( - diff --git a/tdrs-frontend/src/components/SubmissionHistory/helpers.jsx b/tdrs-frontend/src/components/SubmissionHistory/helpers.jsx index c4ea58a71..ca0d75dbf 100644 --- a/tdrs-frontend/src/components/SubmissionHistory/helpers.jsx +++ b/tdrs-frontend/src/components/SubmissionHistory/helpers.jsx @@ -31,6 +31,32 @@ export const hasReparsed = (f) => export const getReprocessedDate = (f) => f.reparse_file_metas[0].finished_at +export const getErrorReportStatus = (file) => { + if ( + file.summary && + file.summary.status && + file.summary.status !== 'Pending' + ) { + const errorFileName = `${file.year}-${file.quarter}-${file.section}` + if (file.has_outdated_error_report) { + return 'Unavailable, resubmit to view' + } else if (file.hasError) { + return ( + + ) + } else { + return 'No Errors' + } + } else { + return 'Pending' + } +} + export const SubmissionSummaryStatusIcon = ({ status }) => { let icon = null let color = null From b0d3232550295bfff88ba42152c616e7942dad03 Mon Sep 17 00:00:00 2001 From: Jan Timpe Date: Tue, 5 Nov 2024 17:36:28 -0500 Subject: [PATCH 11/16] update language --- .../SubmissionHistory.test.js | 24 +++++++++++++++---- .../components/SubmissionHistory/helpers.jsx | 2 +- 2 files changed, 21 insertions(+), 5 deletions(-) diff --git a/tdrs-frontend/src/components/SubmissionHistory/SubmissionHistory.test.js b/tdrs-frontend/src/components/SubmissionHistory/SubmissionHistory.test.js index 351daf416..05a4a9879 100644 --- a/tdrs-frontend/src/components/SubmissionHistory/SubmissionHistory.test.js +++ b/tdrs-frontend/src/components/SubmissionHistory/SubmissionHistory.test.js @@ -528,7 +528,11 @@ describe('SubmissionHistory', () => { 'Please note that error reports and submission history content for files submitted prior to May 31, 2024 may be outdated. Please resubmit to get access to updated information.' ) ).toBeInTheDocument() - expect(screen.queryByText('Not Available')).toBeInTheDocument() + expect( + screen.queryByText( + 'This file was submitted prior to May 31, 2024. Please resubmit to get access to updated information.' + ) + ).toBeInTheDocument() }) it('Shows the outdated submission banner for old submissions with old reparses', () => { @@ -598,7 +602,11 @@ describe('SubmissionHistory', () => { 'Please note that error reports and submission history content for files submitted prior to May 31, 2024 may be outdated. Please resubmit to get access to updated information.' ) ).toBeInTheDocument() - expect(screen.queryByText('Not Available')).toBeInTheDocument() + expect( + screen.queryByText( + 'This file was submitted prior to May 31, 2024. Please resubmit to get access to updated information.' + ) + ).toBeInTheDocument() }) it('Does not show outdated submissions banner if no old submissions', () => { @@ -654,7 +662,11 @@ describe('SubmissionHistory', () => { 'Please note that error reports and submission history content for files submitted prior to May 31, 2024 may be outdated. Please resubmit to get access to updated information.' ) ).not.toBeInTheDocument() - expect(screen.queryByText('Not Available')).not.toBeInTheDocument() + expect( + screen.queryByText( + 'This file was submitted prior to May 31, 2024. Please resubmit to get access to updated information.' + ) + ).not.toBeInTheDocument() }) it('Does not show the outdated submission banner for old submissions with new reparses', () => { @@ -724,6 +736,10 @@ describe('SubmissionHistory', () => { 'Please note that error reports and submission history content for files submitted prior to May 31, 2024 may be outdated. Please resubmit to get access to updated information.' ) ).not.toBeInTheDocument() - expect(screen.queryByText('Not Available')).not.toBeInTheDocument() + expect( + screen.queryByText( + 'This file was submitted prior to May 31, 2024. Please resubmit to get access to updated information.' + ) + ).not.toBeInTheDocument() }) }) diff --git a/tdrs-frontend/src/components/SubmissionHistory/helpers.jsx b/tdrs-frontend/src/components/SubmissionHistory/helpers.jsx index ca0d75dbf..26aaaf179 100644 --- a/tdrs-frontend/src/components/SubmissionHistory/helpers.jsx +++ b/tdrs-frontend/src/components/SubmissionHistory/helpers.jsx @@ -39,7 +39,7 @@ export const getErrorReportStatus = (file) => { ) { const errorFileName = `${file.year}-${file.quarter}-${file.section}` if (file.has_outdated_error_report) { - return 'Unavailable, resubmit to view' + return 'This file was submitted prior to May 31, 2024. Please resubmit to get access to updated information.' } else if (file.hasError) { return ( - - - diff --git a/tdrs-frontend/src/components/SubmissionHistory/SubmissionHistory.jsx b/tdrs-frontend/src/components/SubmissionHistory/SubmissionHistory.jsx index 78c3b0663..3b245a754 100644 --- a/tdrs-frontend/src/components/SubmissionHistory/SubmissionHistory.jsx +++ b/tdrs-frontend/src/components/SubmissionHistory/SubmissionHistory.jsx @@ -73,27 +73,8 @@ const SubmissionHistory = ({ filterValues }) => { } }, [hasFetchedFiles, files, dispatch, filterValues]) - const hasOutdatedSubmissions = () => - files.some((element, index, array) => element.has_outdated_error_report) - return ( <> - {hasOutdatedSubmissions() && ( -
-
-

- Please note that error reports and submission history content for - files submitted prior to May 31, 2024 may be outdated. Please - resubmit to get access to updated information. -

-
-
- )} -
{ <>
- - - diff --git a/tdrs-frontend/src/components/SubmissionHistory/helpers.jsx b/tdrs-frontend/src/components/SubmissionHistory/helpers.jsx index 26aaaf179..3b7bb183c 100644 --- a/tdrs-frontend/src/components/SubmissionHistory/helpers.jsx +++ b/tdrs-frontend/src/components/SubmissionHistory/helpers.jsx @@ -38,9 +38,7 @@ export const getErrorReportStatus = (file) => { file.summary.status !== 'Pending' ) { const errorFileName = `${file.year}-${file.quarter}-${file.section}` - if (file.has_outdated_error_report) { - return 'This file was submitted prior to May 31, 2024. Please resubmit to get access to updated information.' - } else if (file.hasError) { + if (file.hasError) { return (
{`Section ${section} - ${label}`}
{formatDate(file.createdAt)} + {hasReparsed(file) && ( + <> +
+
+ {'Reprocessed: ' + formatDate(getReprocessedDate(file))} + + )} +
+ {hasReparsed(file) && formatDate(getReprocessedDate(file))} @@ -109,6 +122,9 @@ export const CaseAggregatesTable = ({ files }) => ( Submitted On + Reprocessed On + Submitted By
{formatDate(file.createdAt)} + {hasReparsed(file) && ( + <> +
+
+ {'Reprocessed: ' + formatDate(getReprocessedDate(file))} + + )} +
+ {hasReparsed(file) && formatDate(getReprocessedDate(file))} @@ -103,6 +116,9 @@ export const TotalAggregatesTable = ({ files }) => ( Submitted On + Reprocessed On + Submitted By - {hasReparsed(file) && formatDate(getReprocessedDate(file))} - {file.submittedBy} - {getErrorReportStatus()} + {getErrorReportStatus(file)}
Submitted On - Reprocessed On - Submitted By - {hasReparsed(file) && formatDate(getReprocessedDate(file))} - {file.submittedBy} - {getErrorReportStatus()} + {getErrorReportStatus(file)}
Submitted On - Reprocessed On - Submitted By
- {formatDate(file.createdAt)} - {hasReparsed(file) && ( - <> -
-
- {'Reprocessed: ' + formatDate(getReprocessedDate(file))} - - )} -
- {file.submittedBy} + {formatDate(file.createdAt) + ' by ' + file.submittedBy} + {hasReparsed(file) && <>} @@ -92,9 +82,6 @@ export const CaseAggregatesTable = ({ files }) => ( Submitted On - Submitted By - File Name
- {formatDate(file.createdAt)} - {hasReparsed(file) && ( - <> -
-
- {'Reprocessed: ' + formatDate(getReprocessedDate(file))} - - )} -
- {file.submittedBy} + {formatDate(file.createdAt) + ' by ' + file.submittedBy} + {hasReparsed(file) && <>} @@ -86,9 +76,6 @@ export const TotalAggregatesTable = ({ files }) => ( Submitted On - Submitted By - File Name