Skip to content

Commit 78c9340

Browse files
authored
Merge pull request #1474 from fedspendingtransparency/FDG-9705
FDG-9705 Create Documentation on Dataset Configurations
2 parents 2e9e14d + d7368a2 commit 78c9340

File tree

2 files changed

+41
-13
lines changed

2 files changed

+41
-13
lines changed
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Dataset Configurations
2+
3+
### Dataset Configuration Locations
4+
* **datasets.json -** Holds datasets that are present in *all* environments
5+
* **endpointConfig.js -** Holds dataset endpoints that are present in *all* environments
6+
* **uat.js -** Holds datasets (and endpoints) that only appear in the UAT environment
7+
* **qat.js -** Holds datasets (and endpoints) that only appear in the QAT environment
8+
9+
### Dataset Structure
10+
* **IDatasetConfig.ts -** fields that come from datasets.json, endpointConfig, and metadata
11+
12+
13+
14+
15+
16+
17+
18+

src/models/IDatasetConfig.ts

Lines changed: 23 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,32 +3,42 @@ import { IDatasetTechSpecs } from './IDatasetTechSpecs';
33

44
export interface IDatasetConfig {
55
apis: IDatasetApi[];
6-
currentDateButton: string | null;
7-
customNoChartMessage: boolean | null;
6+
currentDateButton: 'byMonth' | 'byDay' | 'byFullMonth' | null; // byFullMonth will gather data from the entire month, byMonth is just looks at the last day of the month
7+
customNoChartMessage: boolean | null; // not used at the moment
88
datePreset: string | null;
9-
customRangePreset: string | null;
9+
customRangePreset: string | null; // *** Currently only used for TRRE
1010
bannerCallout: Record<string, string> | null;
11-
datatableBanner: string | null;
11+
datatableBanner: string | null; // Presented in Preview & Download section *** Currently only used for DTS
1212
selectColumns: string[] | null;
13-
detailView: { apiId: number; field: string; label: string; secondaryField: string; dateRangeLockCopy: string; summaryTableFields: string[] } | null;
13+
14+
// used for secondary/nested tables. Clickable on a column value. Comes from datasets/uat/qat
15+
detailView: {
16+
apiId: number; // api endpoint it ties to
17+
field: string; // field that the tables are linking on
18+
label: string; // name of the Column
19+
secondaryField: string; // second field the tables are linking on. *** Currently only used for Buybacks
20+
dateRangeLockCopy: string; // Message displayed in Preview and Download box
21+
summaryTableFields: string[]; // fields shown in Summary table, and not the nested table itself
22+
selectColumns: string[]; // fields shown in the nested table
23+
} | null;
24+
1425
dataFormats: string[] | Record<string, unknown>[];
1526
dataStartYear: string;
1627
datasetId: string;
1728
dictionary: number | null;
18-
disableAllTables: boolean | null;
19-
sharedApiFilterOptions: boolean | null;
29+
disableAllTables: boolean | null; // removes the "all tables" options from table dropdown *** currently only used for FBP
30+
sharedApiFilterOptions: boolean | null; // api filter options are shared between tables *** Currently only used for FBP
2031
filterTopics: string[];
2132
filters: string[];
2233
name: string;
2334
notesAndKnownLimitations: string;
24-
publishedReports: unknown[];
25-
publishedReportsTip: string;
26-
publisher: string;
35+
publishedReports: unknown[]; // from metadata
36+
publishedReportsTip: string; // from metadata
37+
publisher: string; // from metadata
2738
relatedDatasets: string[];
2839
relatedTopics: string[];
2940
seoConfig: Record<string, string>;
30-
slug: string;
31-
summaryTest: string;
32-
tagLine: string;
41+
slug: string; // the trailing endpoint after "/datasets" Comes from datasets/uat/qat
42+
tagLine: string; // from short_description in metadata
3343
techSpecs: IDatasetTechSpecs;
3444
}

0 commit comments

Comments
 (0)