diff --git a/CHANGELOG.md b/CHANGELOG.md index f1517b27..5dd2155c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,8 @@ V1.0.3 saved. This will simply return them to that place in the process. * Fixed bug which prevented adding new relationships to existing entities * Fixed bugs with the next step button not enabling/disabling at the correct times +* Now shows the revised date (and labels it as such) on the admin list view for + revised disclosures. Un-revised disclosures still show the submitted date. V1.0.2 diff --git a/client/scripts/components/Admin/ListView/DisclosureTable.jsx b/client/scripts/components/Admin/ListView/DisclosureTable.jsx index e97eba93..934dfa96 100644 --- a/client/scripts/components/Admin/ListView/DisclosureTable.jsx +++ b/client/scripts/components/Admin/ListView/DisclosureTable.jsx @@ -16,7 +16,7 @@ along with this program. If not, see */ -import React from 'react'; //eslint-disable-line no-unused-vars +import React from 'react'; import {merge} from '../../../merge'; import {DisclosureTableRow} from './DisclosureTableRow'; import {TableHeading} from './TableHeading'; @@ -83,6 +83,7 @@ export class DisclosureTable extends React.Component { type={disclosure.type} statusCd={disclosure.statusCd} submittedDate={disclosure.submitted_date} + revisedDate={disclosure.revised_date} searchTerm={this.props.searchTerm} /> ); diff --git a/client/scripts/components/Admin/ListView/DisclosureTableRow.jsx b/client/scripts/components/Admin/ListView/DisclosureTableRow.jsx index a72a913e..8e0a2627 100644 --- a/client/scripts/components/Admin/ListView/DisclosureTableRow.jsx +++ b/client/scripts/components/Admin/ListView/DisclosureTableRow.jsx @@ -62,6 +62,14 @@ export class DisclosureTableRow extends React.Component { } }; + let dateToShow; + if (this.props.revisedDate !== null) { + dateToShow = `${formatDate(this.props.revisedDate)} (revised)`; + } + else { + dateToShow = formatDate(this.props.submittedDate); + } + return (
@@ -76,7 +84,7 @@ export class DisclosureTableRow extends React.Component { {ConfigStore.getAdminDisclosureStatusString(this.props.statusCd)} - {formatDate(this.props.submittedDate)} + {dateToShow}
); diff --git a/server/db/DisclosureDB.js b/server/db/DisclosureDB.js index d58efc5e..b1207b83 100644 --- a/server/db/DisclosureDB.js +++ b/server/db/DisclosureDB.js @@ -746,8 +746,20 @@ const SUMMARY_PAGE_SIZE = 40; export const getSummariesForReview = (dbInfo, sortColumn, sortDirection, start, filters) => { const knex = getKnex(dbInfo); - const query = knex('disclosure').select('submitted_by', 'revised_date', 'disclosure.status_cd as statusCd', 'disclosure_type.description as type', 'id', 'submitted_date') - .innerJoin('disclosure_type', 'disclosure_type.type_cd', 'disclosure.type_cd'); + const query = knex('disclosure') + .select( + 'submitted_by', + 'revised_date', + 'disclosure.status_cd as statusCd', + 'disclosure_type.description as type', + 'id', + 'submitted_date' + ) + .innerJoin( + 'disclosure_type', + 'disclosure_type.type_cd', + 'disclosure.type_cd' + ); if (filters.date) { if (filters.date.start && !isNaN(filters.date.start)) {