Skip to content
This repository was archived by the owner on Mar 13, 2025. It is now read-only.

Commit aa7fb53

Browse files
author
Sean
authored
Merge pull request #519 from GSA/ss-parsec
wip
2 parents 0fbb386 + a97b17d commit aa7fb53

File tree

6 files changed

+56
-732
lines changed

6 files changed

+56
-732
lines changed

config/site/agency_list.json

Lines changed: 36 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
"overall": "yellow"
1515
},
1616
"complianceDashboard": true,
17+
"agencyDashboard": true,
1718
"orgs": [
1819
"GrainGenes",
1920
"usda",
@@ -38,6 +39,7 @@
3839
"codeUrl": "https://www.commerce.gov/code.json",
3940
"fallback_file": "DOC.json",
4041
"complianceDashboard": true,
42+
"agencyDashboard": true,
4143
"logo": "/assets/img/logos/agencies/DOC-50x50.png",
4244
"metrics": {
4345
"policy": "green",
@@ -79,6 +81,7 @@
7981
"overall": "red"
8082
},
8183
"complianceDashboard": true,
84+
"agencyDashboard": true,
8285
"score": 8,
8386
"orgs": [
8487
"adl-aicc",
@@ -120,6 +123,7 @@
120123
"overall": "yellow"
121124
},
122125
"complianceDashboard": true,
126+
"agencyDashboard": true,
123127
"score": 8,
124128
"orgs": ["Federal-Aviation-Administration", "IMDProjects", "usdot-fhwa-stol", "usdot-jpo-ode"]
125129
},
@@ -138,6 +142,7 @@
138142
"overall": "green"
139143
},
140144
"complianceDashboard": true,
145+
"agencyDashboard": true,
141146
"score": 8,
142147
"orgs": ["doecode", "energyapps", "llnl", "ngds", "petsc"]
143148
},
@@ -156,6 +161,7 @@
156161
"overall": "yellow"
157162
},
158163
"complianceDashboard": true,
164+
"agencyDashboard": true,
159165
"orgs": [
160166
"blue-button",
161167
"CDCgov",
@@ -187,6 +193,7 @@
187193
"overall": "yellow"
188194
},
189195
"complianceDashboard": true,
196+
"agencyDashboard": true,
190197
"score": 8,
191198
"orgs": ["hudgov"]
192199
},
@@ -205,6 +212,7 @@
205212
"overall": "yellow"
206213
},
207214
"complianceDashboard": true,
215+
"agencyDashboard": true,
208216
"score": 8,
209217
"orgs": ["cisagov", "US-CBP", "uscis"]
210218
},
@@ -223,6 +231,7 @@
223231
"overall": "red"
224232
},
225233
"complianceDashboard": true,
234+
"agencyDashboard": true,
226235
"score": 8,
227236
"orgs": [
228237
"arcticlcc",
@@ -257,6 +266,7 @@
257266
"overall": "yellow"
258267
},
259268
"complianceDashboard": true,
269+
"agencyDashboard": true,
260270
"score": 8,
261271
"orgs": ["NIEM", "usdoj"]
262272
},
@@ -275,6 +285,7 @@
275285
"overall": "yellow"
276286
},
277287
"complianceDashboard": true,
288+
"agencyDashboard": true,
278289
"score": 8,
279290
"orgs": ["EEOC", "usdepartmentoflabor"]
280291
},
@@ -293,6 +304,7 @@
293304
"overall": "yellow"
294305
},
295306
"complianceDashboard": true,
307+
"agencyDashboard": true,
296308
"score": 8,
297309
"orgs": [
298310
"CA-CST-Library",
@@ -318,6 +330,7 @@
318330
"overall": "green"
319331
},
320332
"complianceDashboard": true,
333+
"agencyDashboard": true,
321334
"score": 8,
322335
"orgs": [
323336
"CA-CST-Library",
@@ -343,6 +356,7 @@
343356
"overall": "yellow"
344357
},
345358
"complianceDashboard": true,
359+
"agencyDashboard": true,
346360
"score": 8,
347361
"orgs": ["fedspendingtransparency", "IRSgov", "US-Department-of-the-Treasury"]
348362
},
@@ -361,6 +375,7 @@
361375
"overall": "yellow"
362376
},
363377
"complianceDashboard": true,
378+
"agencyDashboard": true,
364379
"score": 8,
365380
"orgs": ["department-of-veterans-affairs", "USDeptVeteransAffairs", "VHAINNOVATIONS"]
366381
},
@@ -379,6 +394,7 @@
379394
"overall": "yellow"
380395
},
381396
"complianceDashboard": true,
397+
"agencyDashboard": true,
382398
"score": 8,
383399
"orgs": ["usedgov", "regulationsgov", "usepa"]
384400
},
@@ -397,6 +413,7 @@
397413
"overall": "green"
398414
},
399415
"complianceDashboard": true,
416+
"agencyDashboard": true,
400417
"score": 8,
401418
"orgs": [
402419
"ccmc",
@@ -430,6 +447,7 @@
430447
"overall": "yellow"
431448
},
432449
"complianceDashboard": true,
450+
"agencyDashboard": true,
433451
"score": 8,
434452
"orgs": ["usaid"]
435453
},
@@ -448,6 +466,7 @@
448466
"overall": "green"
449467
},
450468
"complianceDashboard": true,
469+
"agencyDashboard": true,
451470
"score": 8,
452471
"orgs": [
453472
"18f",
@@ -481,6 +500,7 @@
481500
"overall": "yellow"
482501
},
483502
"complianceDashboard": true,
503+
"agencyDashboard": true,
484504
"score": 8,
485505
"orgs": ["nsf-open"]
486506
},
@@ -492,6 +512,7 @@
492512
"codeUrl": "https://www.nrc.gov/code.json",
493513
"fallback_file": "NRC.json",
494514
"complianceDashboard": true,
515+
"agencyDashboard": true,
495516
"logo": "/assets/img/logos/agencies/NRC-50x50.png",
496517
"metrics": {
497518
"policy": "green",
@@ -517,6 +538,7 @@
517538
"overall": "yellow"
518539
},
519540
"complianceDashboard": true,
541+
"agencyDashboard": true,
520542
"score": 8,
521543
"orgs": ["usajobs"]
522544
},
@@ -535,6 +557,7 @@
535557
"overall": "yellow"
536558
},
537559
"complianceDashboard": true,
560+
"agencyDashboard": true,
538561
"score": 8,
539562
"orgs": ["USSBA"]
540563
},
@@ -552,7 +575,8 @@
552575
"inventory": "red",
553576
"overall": "red"
554577
},
555-
"complianceDashboard": true,
578+
"complianceDashboard": false,
579+
"agencyDashboard": false,
556580
"score": 8,
557581
"orgs": ["usnationalarchives"]
558582
},
@@ -571,6 +595,7 @@
571595
"overall": "yellow"
572596
},
573597
"complianceDashboard": true,
598+
"agencyDashboard": true,
574599
"score": 8,
575600
"orgs": ["SSAgov"]
576601
},
@@ -588,7 +613,8 @@
588613
"inventory": "red",
589614
"overall": "red"
590615
},
591-
"complianceDashboard": true,
616+
"complianceDashboard": false,
617+
"agencyDashboard": false,
592618
"score": 8,
593619
"orgs": ["cfpb"]
594620
},
@@ -606,7 +632,8 @@
606632
"inventory": "red",
607633
"overall": "red"
608634
},
609-
"complianceDashboard": true,
635+
"complianceDashboard": false,
636+
"agencyDashboard": false,
610637
"score": 8,
611638
"orgs": [
612639
"arcticlcc",
@@ -640,7 +667,8 @@
640667
"inventory": "red",
641668
"overall": "red"
642669
},
643-
"complianceDashboard": true,
670+
"complianceDashboard": false,
671+
"agencyDashboard": false,
644672
"score": 8,
645673
"orgs": []
646674
},
@@ -658,7 +686,8 @@
658686
"inventory": "red",
659687
"overall": "red"
660688
},
661-
"complianceDashboard": true,
689+
"complianceDashboard": false,
690+
"agencyDashboard": false,
662691
"score": 8,
663692
"orgs": []
664693
},
@@ -676,7 +705,8 @@
676705
"inventory": "red",
677706
"overall": "red"
678707
},
679-
"complianceDashboard": true,
708+
"complianceDashboard": false,
709+
"agencyDashboard": false,
680710
"orgs": ["fecgov"]
681711
}
682712
]

src/components/agencies/agencies.component.js

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,10 @@ import { getReposCount } from '../../utils/repos-count'
1919
class Agencies extends React.Component {
2020
componentDidMount() {
2121
refreshView()
22-
if (!this.props.filterData) this.props.saveFilterData()
22+
if (!this.props.filterData) {
23+
this.props.saveFilterData()
24+
console.log('this.props.filterData',this.props.filterData)
25+
}
2326
}
2427

2528
onFilterBoxChange(category, values) {
@@ -39,6 +42,7 @@ class Agencies extends React.Component {
3942
}
4043
if (some(this.props.AgencyList)) {
4144
try {
45+
const filters = this.props.filterTags
4246
return (
4347
<div>
4448
<FilterTags filters={this.props.filterTags} onClick={::this.props.onFilterTagClick} />
@@ -49,10 +53,11 @@ class Agencies extends React.Component {
4953
if (filt.indexOf(agency.acronym) !== -1) {
5054
return <AgencyCard key={agency.id} agency={agency} />
5155
}
52-
} else {
53-
return <AgencyCard key={agency.id} agency={agency} />
54-
}
55-
return
56+
57+
return
58+
}
59+
return <AgencyCard key={agency.id} agency={agency} />
60+
5661
})}
5762
</ul>
5863
</div>
@@ -72,6 +77,7 @@ class Agencies extends React.Component {
7277

7378
render() {
7479
// const numPages = Math.ceil(this.props.total / this.props.selectedPageSize)
80+
console.log('props.boxes', this.props.boxes)
7581
return (
7682
<main className="search-results-content" id="main-content">
7783
<SiteBanner title="Agencies" />

src/components/agencies/agencies.container.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,14 @@ import updateAgenciesFilters from 'actions/update-agencies-filters'
77
import { sortByBestMatch, sortByDataQuality, sortByDate, sortByName } from 'utils/repo-sorting'
88
import updateAgenciesParams from 'actions/update-agencies-params'
99
import AgenciesComponent from './agencies.component'
10-
import AgencyList from '../../../config/site/agency_list'
10+
import Agencies from '../../../config/site/agency_list'
11+
12+
const AgencyList = Agencies.filter(agency => agency.agencyDashboard === true)
1113

1214
export const mapStateToProps = ({ agenciesParams, agenciesResults, filters }) => {
1315
const categories = ['agencies']
1416

17+
console.log({ filters, agenciesParams, agenciesResults })
1518
const selections = categories.reduce((accumulator, key) => {
1619
accumulator[key] = getFilterValuesFromParamsByCategory(agenciesParams, key)
1720
return accumulator

0 commit comments

Comments
 (0)