Skip to content

Commit

Permalink
Merge pull request #1429 from fedspendingtransparency/FDG-8668-hotfix
Browse files Browse the repository at this point in the history
FDG-8668 hotfix
  • Loading branch information
wyattch authored Oct 4, 2024
2 parents 33fc1b3 + acf95ad commit 331a2d6
Show file tree
Hide file tree
Showing 6 changed files with 100 additions and 194 deletions.
95 changes: 0 additions & 95 deletions env/qat.js
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand All @@ -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',
Expand Down
97 changes: 1 addition & 96 deletions env/uat.js
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand All @@ -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: {
Expand Down Expand Up @@ -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'],
},
},
};
1 change: 1 addition & 0 deletions src/components/dataset-data/dataset-data.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,7 @@ export const DatasetDataComponent = ({ config, finalDatesNotFound, location, pub
useEffect(() => {
if (allTablesSelected) {
setTableColumnSortData([]);
setUserFilterSelection(null);
}
}, [allTablesSelected]);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down Expand Up @@ -108,7 +106,7 @@ const UserFilter: FunctionComponent<UserFilterProps> = ({
useEffect(() => {
establishOptions();
setSelectedFilterOption(defaultSelection);
}, [selectedTable]);
}, [selectedTable, allTablesSelected]);

return (
<>
Expand All @@ -128,6 +126,7 @@ const UserFilter: FunctionComponent<UserFilterProps> = ({
</div>
)}
{selectedTable?.userFilter?.notice && <DatatableBanner bannerNotice={selectedTable.userFilter.notice} />}
{selectedTable?.apiFilter?.notice && <DatatableBanner bannerNotice={selectedTable.apiFilter.notice} />}
</>
);
};
Expand Down
84 changes: 84 additions & 0 deletions src/transform/endpointConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
12 changes: 12 additions & 0 deletions src/transform/static-metadata/datasets.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}

0 comments on commit 331a2d6

Please sign in to comment.