diff --git a/env/qat.js b/env/qat.js index 941705e73..5d8ef4931 100644 --- a/env/qat.js +++ b/env/qat.js @@ -6,21 +6,6 @@ module.exports = { WEB_SOCKET_BASE_URL: 'wss://downloads.fiscaldata.treasury.gov/main', EXPERIMENTAL_WHITELIST: ['experimental-page', 'afg-overview', 'publishedReportsSection'], ADDITIONAL_DATASETS: { - '015-BFS-2014Q3-053': { - slug: '/unemployment-trust-funds-report-selection/', - seoConfig: { - pageTitle: 'Unemployment Trust Funds Report Selection', - description: - 'Unemployment Trust Fund Report Selection offers numerous reports by month, year, state, federal, ' + - 'and report type. The reports represent data supporting the Account Statement, Transaction Statement, ' + - 'and the Federal Activity Statement reports. The Unemployment Trust Fund is made up of 59 U.S. Treasury ' + - 'accounts, including an account for each state and some territories.', - keywords: 'Debt, Financial Summaries', - }, - topics: ['debt', 'financial-summaries'], - relatedDatasets: ['015-BFS-2014Q3-093'], - currentDateButton: 'byFullMonth', - }, '015-BFS-2024Q1-003': { slug: '/fbp-detailed-principal-accrued-interest/', seoConfig: { @@ -36,86 +21,6 @@ module.exports = { }, USE_MOCK_RELEASE_CALENDAR_DATA_ON_API_FAIL: true, ADDITIONAL_ENDPOINTS: { - '305': { - endpoint: 'v1/accounting/od/utf_account_statement', - dateField: 'eff_date', - downloadName: 'UTF_Account_Statement ', - alwaysSortWith: ['acct_desc', '-eff_date', 'memo_nbr'], - apiFilter: { - field: 'acct_desc', - downloadLabel: 'Account', - label: 'Choose a Federal or State Account', - dataUnmatchedHeader: 'There is no data to display based on the current filters selected.', - dataUnmatchedMessage: 'Select a different account description and/or date range in order to preview the data.', - dataDefaultHeader: 'This table requires additional filters.', - dataDefaultMessage: 'Select an account in the filter section above to display the data.', - dataSearchLabel: 'Search account descriptions', - fieldFilter: { - field: 'report_type', - value: ['Federal', 'State'], - }, - }, - selectColumns: [ - 'acct_statement', - 'eff_date', - 'shares_per_par', - 'trans_cd', - 'trans_desc_cd', - 'memo_nbr', - 'location_cd', - 'acct_nbr', - 'acct_desc', - 'report_type', - ], - }, - '306': { - endpoint: 'v1/accounting/od/utf_transaction_statement', - dateField: 'eff_date', - downloadName: 'UTF_Transaction_Statement ', - alwaysSortWith: ['acct_desc', '-eff_date', 'memo_nbr'], - apiFilter: { - field: 'acct_desc', - downloadLabel: 'Account', - label: 'Choose a Federal or State Account', - dataUnmatchedHeader: 'There is no data to display based on the current filters selected.', - dataUnmatchedMessage: 'Select a different account description and/or date range in order to preview the data.', - dataDefaultHeader: 'This table requires additional filters.', - dataDefaultMessage: 'Select an account in the filter section above to display the data.', - dataSearchLabel: 'Search account descriptions', - fieldFilter: { - field: 'report_type', - value: ['Federal', 'State'], - }, - }, - selectColumns: [ - 'trans_statement', - 'eff_date', - 'shares_per_par', - 'trans_desc_cd', - 'memo_nbr', - 'location_cd', - 'acct_nbr', - 'acct_desc', - 'report_type', - ], - }, - '307': { - endpoint: 'v1/accounting/od/utf_federal_activity_statement', - dateField: 'eff_date', - downloadName: 'UTF_Federal_Activity_Statement ', - alwaysSortWith: ['acct_desc', '-eff_date', 'memo_nbr'], - apiFilter: { - field: 'acct_desc', - downloadLabel: 'Account', - label: 'Choose a State Account', - dataUnmatchedHeader: 'There is no data to display based on the current filters selected.', - dataUnmatchedMessage: 'Select a different account description and/or date range in order to preview the data.', - dataDefaultHeader: 'This table requires additional filters.', - dataDefaultMessage: 'Select an account in the filter section above to display the data.', - dataSearchLabel: 'Search account descriptions', - }, - selectColumns: ['fed_act_statement', 'eff_date', 'shares_per_par', 'trans_desc_cd', 'memo_nbr', 'location_cd', 'acct_nbr', 'acct_desc'], - }, //FBP '313': { endpoint: 'v1/accounting/od/fbp_balances', diff --git a/env/uat.js b/env/uat.js index fdc7fa2d9..a435f4022 100644 --- a/env/uat.js +++ b/env/uat.js @@ -34,22 +34,6 @@ module.exports = { relatedDatasets: ['015-BFS-2020Q4-xx', '015-BFS-2014Q1-03', '015-BFS-2014Q1-13', '015-BFS-2017Q2-003'], currentDateButton: 'byMonth', }, - '015-BFS-2014Q3-053': { - slug: '/unemployment-trust-funds-report-selection/', - seoConfig: { - pageTitle: 'Unemployment Trust Funds Report Selection', - description: - 'Unemployment Trust Fund Report Selection offers numerous reports by month, year, state, federal, ' + - 'and report type. The reports represent data supporting the Account Statement, Transaction Statement, ' + - 'and the Federal Activity Statement reports. The Unemployment Trust Fund is made up of 59 U.S. Treasury ' + - 'accounts, including an account for each state and some territories.', - keywords: 'Debt, Financial Summaries', - }, - topics: ['debt', 'financial-summaries'], - relatedDatasets: ['015-BFS-2014Q3-093'], - currentDateButton: 'byFullMonth', - }, - '015-BFS-2024Q1-003': { slug: '/fbp-detailed-principal-accrued-interest/', seoConfig: { @@ -61,6 +45,7 @@ module.exports = { topics: ['debt', 'financial-summaries'], relatedDatasets: ['015-BFS-2014Q3-038', '015-BFS-2014Q3-037'], currentDateButton: 'byMonth', + displayApiFilterForAllTables: true, }, }, ADDITIONAL_ENDPOINTS: { @@ -259,85 +244,5 @@ module.exports = { dataSearchLabel: 'Search account descriptions', }, }, - '305': { - endpoint: 'v1/accounting/od/utf_account_statement', - dateField: 'eff_date', - downloadName: 'UTF_Account_Statement ', - alwaysSortWith: ['acct_desc', '-eff_date', 'memo_nbr'], - apiFilter: { - field: 'acct_desc', - downloadLabel: 'Account', - label: 'Choose a Federal or State Account', - dataUnmatchedHeader: 'There is no data to display based on the current filters selected.', - dataUnmatchedMessage: 'Select a different account description and/or date range in order to preview the data.', - dataDefaultHeader: 'This table requires additional filters.', - dataDefaultMessage: 'Select an account in the filter section above to display the data.', - dataSearchLabel: 'Search account descriptions', - fieldFilter: { - field: 'report_type', - value: ['Federal', 'State'], - }, - }, - selectColumns: [ - 'acct_statement', - 'eff_date', - 'shares_per_par', - 'trans_cd', - 'trans_desc_cd', - 'memo_nbr', - 'location_cd', - 'acct_nbr', - 'acct_desc', - 'report_type', - ], - }, - '306': { - endpoint: 'v1/accounting/od/utf_transaction_statement', - dateField: 'eff_date', - downloadName: 'UTF_Transaction_Statement ', - alwaysSortWith: ['acct_desc', '-eff_date', 'memo_nbr'], - apiFilter: { - field: 'acct_desc', - downloadLabel: 'Account', - label: 'Choose a Federal or State Account', - dataUnmatchedHeader: 'There is no data to display based on the current filters selected.', - dataUnmatchedMessage: 'Select a different account description and/or date range in order to preview the data.', - dataDefaultHeader: 'This table requires additional filters.', - dataDefaultMessage: 'Select an account in the filter section above to display the data.', - dataSearchLabel: 'Search account descriptions', - fieldFilter: { - field: 'report_type', - value: ['Federal', 'State'], - }, - }, - selectColumns: [ - 'trans_statement', - 'eff_date', - 'shares_per_par', - 'trans_desc_cd', - 'memo_nbr', - 'location_cd', - 'acct_nbr', - 'acct_desc', - 'report_type', - ], - }, - '307': { - endpoint: 'v1/accounting/od/utf_federal_activity_statement', - dateField: 'eff_date', - downloadName: 'UTF_Federal_Activity_Statement ', - alwaysSortWith: ['acct_desc', '-eff_date', 'memo_nbr'], - apiFilter: { - field: 'acct_desc', - downloadLabel: 'Account', - label: 'Choose a State Account', - dataUnmatchedHeader: 'There is no data to display based on the current filters selected.', - dataUnmatchedMessage: 'Select a different account description and/or date range in order to preview the data.', - dataDefaultHeader: 'This table requires additional filters.', - dataDefaultMessage: 'Select an account in the filter section above to display the data.', - dataSearchLabel: 'Search account descriptions', - }, - selectColumns: ['fed_act_statement', 'eff_date', 'shares_per_par', 'trans_desc_cd', 'memo_nbr', 'location_cd', 'acct_nbr', 'acct_desc'], - }, }, }; diff --git a/src/components/dataset-data/dataset-data.jsx b/src/components/dataset-data/dataset-data.jsx index 35b24e4c2..1058fc5bd 100644 --- a/src/components/dataset-data/dataset-data.jsx +++ b/src/components/dataset-data/dataset-data.jsx @@ -207,6 +207,7 @@ export const DatasetDataComponent = ({ config, finalDatesNotFound, location, pub useEffect(() => { if (allTablesSelected) { setTableColumnSortData([]); + setUserFilterSelection(null); } }, [allTablesSelected]); diff --git a/src/components/filter-download-container/user-filter/user-filter.tsx b/src/components/filter-download-container/user-filter/user-filter.tsx index 2645a5ec7..ba3ce4e38 100644 --- a/src/components/filter-download-container/user-filter/user-filter.tsx +++ b/src/components/filter-download-container/user-filter/user-filter.tsx @@ -3,8 +3,6 @@ import { userFilterWrapper, filterLabel } from './user-filter.module.scss'; import NotShownMessage from '../../dataset-data/table-section-container/not-shown-message/not-shown-message'; import ComboCurrencySelect from '../../combo-select/combo-currency-select/combo-currency-select'; import DatatableBanner from '../datatable-banner/datatable-banner'; -import { monthFullNames } from '../../../utils/api-utils'; -import { mockSavingsBondLastFiscalYearCurrentMonth } from '../../../layouts/explainer/explainer-test-helper'; import MonthYearFilter from '../month-year-filter/month-year-filter'; type UserFilterProps = { @@ -108,7 +106,7 @@ const UserFilter: FunctionComponent = ({ useEffect(() => { establishOptions(); setSelectedFilterOption(defaultSelection); - }, [selectedTable]); + }, [selectedTable, allTablesSelected]); return ( <> @@ -128,6 +126,7 @@ const UserFilter: FunctionComponent = ({ )} {selectedTable?.userFilter?.notice && } + {selectedTable?.apiFilter?.notice && } ); }; diff --git a/src/transform/endpointConfig.js b/src/transform/endpointConfig.js index cbabd5bf8..444e55f2a 100644 --- a/src/transform/endpointConfig.js +++ b/src/transform/endpointConfig.js @@ -2456,6 +2456,90 @@ const endpointConfig = { alwaysSortWith: ['-record_date', 'src_line_nbr'], selectColumns: [], }, + //UTF + '305': { + endpoint: 'v1/accounting/od/utf_account_statement', + dateField: 'eff_date', + downloadName: 'UTF_Account_Statement ', + alwaysSortWith: ['acct_desc', '-eff_date', 'memo_nbr'], + apiFilter: { + field: 'acct_desc', + downloadLabel: 'Account', + label: 'Choose a Federal or State Account', + dataUnmatchedHeader: 'There is no data to display based on the current filters selected.', + dataUnmatchedMessage: 'Select a different account description and/or date range in order to preview the data.', + dataDefaultHeader: 'This table requires additional filters.', + dataDefaultMessage: 'Select an account in the filter section above to display the data.', + dataSearchLabel: 'Search account descriptions', + notice: `Effective Dates on Fiscal Data may differ from the published effective dates for corresponding reports on TreasuryDirect.`, + fieldFilter: { + field: 'report_type', + value: ['Federal', 'State'], + }, + }, + selectColumns: [ + 'acct_statement', + 'eff_date', + 'shares_per_par', + 'trans_cd', + 'trans_desc_cd', + 'memo_nbr', + 'location_cd', + 'acct_nbr', + 'acct_desc', + 'report_type', + ], + }, + '306': { + endpoint: 'v1/accounting/od/utf_transaction_statement', + dateField: 'eff_date', + downloadName: 'UTF_Transaction_Statement ', + alwaysSortWith: ['acct_desc', '-eff_date', 'memo_nbr'], + apiFilter: { + field: 'acct_desc', + downloadLabel: 'Account', + label: 'Choose a Federal or State Account', + dataUnmatchedHeader: 'There is no data to display based on the current filters selected.', + dataUnmatchedMessage: 'Select a different account description and/or date range in order to preview the data.', + dataDefaultHeader: 'This table requires additional filters.', + dataDefaultMessage: 'Select an account in the filter section above to display the data.', + dataSearchLabel: 'Search account descriptions', + notice: `Effective Dates on Fiscal Data may differ from the published effective dates for corresponding reports on TreasuryDirect.`, + fieldFilter: { + field: 'report_type', + value: ['Federal', 'State'], + }, + }, + selectColumns: [ + 'trans_statement', + 'eff_date', + 'shares_per_par', + 'trans_desc_cd', + 'memo_nbr', + 'location_cd', + 'acct_nbr', + 'acct_desc', + 'report_type', + ], + }, + '307': { + endpoint: 'v1/accounting/od/utf_federal_activity_statement', + dateField: 'eff_date', + downloadName: 'UTF_Federal_Activity_Statement ', + alwaysSortWith: ['acct_desc', '-eff_date', 'memo_nbr'], + apiFilter: { + field: 'acct_desc', + downloadLabel: 'Account', + label: 'Choose a State Account', + dataUnmatchedHeader: 'There is no data to display based on the current filters selected.', + dataUnmatchedMessage: 'Select a different account description and/or date range in order to preview the data.', + dataDefaultHeader: 'This table requires additional filters.', + dataDefaultMessage: 'Select an account in the filter section above to display the data.', + dataSearchLabel: 'Search account descriptions', + notice: `Effective Dates on Fiscal Data may differ from the published effective dates for corresponding reports on TreasuryDirect.`, + }, + selectColumns: ['fed_act_statement', 'eff_date', 'shares_per_par', 'trans_desc_cd', 'memo_nbr', 'location_cd', 'acct_nbr', 'acct_desc'], + }, // FIP '308': { endpoint: 'v1/accounting/od/fip_principal_outstanding_table1', diff --git a/src/transform/static-metadata/datasets.json b/src/transform/static-metadata/datasets.json index 0e8dd30e8..7a93b3c56 100644 --- a/src/transform/static-metadata/datasets.json +++ b/src/transform/static-metadata/datasets.json @@ -599,5 +599,17 @@ "summaryTableFields": ["operation_date", "operation_start_time_est", "operation_close_time_est", "settlement_date"], "selectColumns": ["cusip_nbr", "coupon_rate_pct", "maturity_date", "par_amt_accepted", "weighted_avg_accepted_price"] } + }, + "015-BFS-2014Q3-053": { + "slug": "/unemployment-trust-funds-report-selection/", + "seoConfig": { + "pageTitle": "Unemployment Trust Funds Report Selection", + "description": + "Unemployment Trust Fund Report Selection offers numerous reports by month, year, state, federal, and report type. The reports represent data supporting the Account Statement, Transaction Statement, and the Federal Activity Statement reports. The Unemployment Trust Fund is made up of 59 U.S. Treasury accounts, including an account for each state and some territories.", + "keywords": "Debt, Financial Summaries" + }, + "topics": ["debt", "financial-summaries"], + "relatedDatasets": ["015-BFS-2014Q3-093"], + "currentDateButton": "byFullMonth" } }