Skip to content

Commit f072d85

Browse files
authored
Merge pull request #2055 from fedspendingtransparency/qat
Sprint 213: Qat -> Staging
2 parents 15e815f + 64e415b commit f072d85

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+1991
-2403
lines changed

src/_scss/sharedComponents/_base.scss

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,13 @@ img {
148148
margin-left: 8.33%;
149149
}
150150

151+
.col-sm-6 {
152+
@media(min-width: $small-screen) {
153+
width: 50%;
154+
float: left;
155+
}
156+
}
157+
151158
.col-sm-12 {
152159
@media(min-width: $small-screen) {
153160
width: 100%;
@@ -245,9 +252,9 @@ img {
245252
}
246253
}
247254

248-
.col-xs-1, .col-xs-3, .col-xs-4, .col-xs-6, .col-xs-8, .col-xs-11, .col-xs-12, .col-sm-12, .col-md-1, .col-md-2,
249-
.col-md-3, .col-md-4, .col-md-5, .col-md-6, .col-md-7, .col-md-8, .col-md-9, .col-md-10, .col-md-11, .col-md-12,
250-
.col-lg-8, .col-lg-12 {
255+
.col-xs-1, .col-xs-3, .col-xs-4, .col-xs-6, .col-xs-8, .col-xs-11, .col-xs-12, .col-sm-6, .col-sm-12, .col-md-1,
256+
.col-md-2, .col-md-3, .col-md-4, .col-md-5, .col-md-6, .col-md-7, .col-md-8, .col-md-9, .col-md-10, .col-md-11,
257+
.col-md-12, .col-lg-8, .col-lg-12 {
251258
min-height: rem(1);
252259
padding-left: rem(15);
253260
padding-right: rem(15);

src/help/changelog.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
#### November 12, 2025{section=changelog}
1+
#### December 18, 2025{section=changelog}
22
In this release of the Broker, we:
33

4-
* Updated various aspects of the Broker to handle alphanumeric characters in assistance listing numbers to align with the Grants Data Standards update. Note, no assistance listing numbers have been processed yet with the format change. Only FABS36 (which checks the assistance listing format) has been changed from a fatal error to a warning until the GSDM v1.2 Draft Annual Release can be finalized.
5-
* Resolved a minor frontend bug on the initial DABS upload page.
4+
* Updated publication and certification statements for clarity.
5+
* Added additional checks for `/v1/restart_validation` to prevent revalidation after FABS publication.

src/help/history.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
1-
#### October 21, 2025{section=changelog}
1+
#### November 12, 2025{section=changelog}
2+
In this release of the Broker, we:
3+
4+
* Updated various aspects of the Broker to handle alphanumeric characters in assistance listing numbers to align with the Grants Data Standards update. Note, no assistance listing numbers have been processed yet with the format change. Only FABS36 (which checks the assistance listing format) has been changed from a fatal error to a warning until the GSDM v1.2 Draft Annual Release can be finalized.
5+
* Resolved a minor frontend bug on the initial DABS upload page.
6+
7+
#### October 21, 2025
28
In this release of the Broker, we:
39

410
* Started pulling in several data elements (`genericBoolean`) into the Broker FPDS data via the FPDS loader.

src/help/technical.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1-
#### November 12, 2025{section=technical}
1+
#### December 18, 2025{section=technical}
22

33
In this release, here is a list of technical changes that may require infrastructure or database updates, or represents additional functionality.
44

5-
* Standardized all scripts with date arguments to be of the same format for consistency.
6-
* Resolved minor bug with the initializing script for developers.
7-
* Reworked the frontend code for the DABS Generate E/F page for comprehensiveness.
5+
* Updated several aspects of the frontend code to be functional components.
6+
* Updated comment statement on the DABS review page for clarity and resolved a minor bug with comments files appearing on the Raw Files page.

src/help/technicalHistory.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,12 @@
1-
#### October 21, 2025{section=technical}
1+
#### November 12, 2025{section=technical}
2+
3+
In this release, here is a list of technical changes that may require infrastructure or database updates, or represents additional functionality.
4+
5+
* Standardized all scripts with date arguments to be of the same format for consistency.
6+
* Resolved minor bug with the initializing script for developers.
7+
* Reworked the frontend code for the DABS Generate E/F page for comprehensiveness.
8+
9+
#### October 21, 2025
210

311
In this release, here is a list of technical changes that may require infrastructure or database updates, or represents additional functionality.
412

src/js/components/help/RawFilesItem.jsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,7 @@ export default class RawFilesItem extends React.Component {
2626
}
2727

2828
itemAction() {
29-
this.props.itemAction(this.props.currentLevel, this.props.item.id, this.props.item.label,
30-
this.props.item.filetype);
29+
this.props.itemAction(this.props.currentLevel, this.props.item.id, this.props.item.label);
3130
}
3231

3332
render() {

src/js/components/help/RawFilesPage.jsx

Lines changed: 8 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ import Banner from 'components/SharedComponents/Banner';
1212
import Footer from 'components/SharedComponents/FooterComponent';
1313
import RawFilesContent from 'components/help/RawFilesContent';
1414
import HelpNav from './helpNav';
15-
import { kGlobalConstants } from '../../GlobalConstants';
1615

1716
const propTypes = {
1817
session: PropTypes.object,
@@ -58,21 +57,15 @@ export default class RawFilesPage extends React.Component {
5857
});
5958
}
6059

61-
itemAction(level, id, label, fileType) {
60+
itemAction(level, id, label) {
6261
if (level === 'download') {
63-
if (fileType !== 'comments') {
64-
HelpHelper.downloadPublishedFile(id)
65-
.then((res) => {
66-
window.open(res.data.url);
67-
})
68-
.catch((error) => {
69-
console.error(error);
70-
});
71-
}
72-
else {
73-
const urlType = kGlobalConstants.PROD ? '' : '-nonprod';
74-
window.open(`https://files${urlType}.usaspending.gov/agency_submissions/${label}`);
75-
}
62+
HelpHelper.downloadPublishedFile(id)
63+
.then((res) => {
64+
window.open(res.data.url);
65+
})
66+
.catch((error) => {
67+
console.error(error);
68+
});
7669
}
7770
else {
7871
const tmpState = Object.assign({}, this.state);

src/js/components/login/AuthPage.jsx

Lines changed: 20 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -3,36 +3,35 @@
33
* Created by Kevin Li 10/24/16
44
*/
55

6-
import React from 'react';
76
import AuthContainer from 'containers/login/AuthContainer';
87
import { kGlobalConstants } from '../../GlobalConstants';
98
import LoginWarningTxt from './LoginWarningTxt';
109
import LoginIntro from './LoginIntro';
1110
import TestEnvironmentBanner from '../SharedComponents/banners/TestEnvironmentBanner';
1211

1312

14-
export default class AuthPage extends React.Component {
15-
render() {
16-
let testBanner = null;
17-
if (!kGlobalConstants.PROD) {
18-
testBanner = <TestEnvironmentBanner />;
19-
}
13+
const AuthPage = (props) => {
14+
let testBanner = null;
15+
if (!kGlobalConstants.PROD) {
16+
testBanner = <TestEnvironmentBanner />;
17+
}
2018

21-
return (
22-
<div className="usa-da-login-page">
23-
<div className="flex-wrapper">
24-
<div className="usa-da-login container-fluid">
25-
{testBanner}
26-
<div className="login-banner-wrap">
27-
<div className="usa-da-login-wrap">
28-
<LoginIntro />
29-
<AuthContainer {...this.props} />
30-
</div>
19+
return (
20+
<div className="usa-da-login-page">
21+
<div className="flex-wrapper">
22+
<div className="usa-da-login container-fluid">
23+
{testBanner}
24+
<div className="login-banner-wrap">
25+
<div className="usa-da-login-wrap">
26+
<LoginIntro />
27+
<AuthContainer {...props} />
3128
</div>
32-
<LoginWarningTxt />
3329
</div>
30+
<LoginWarningTxt />
3431
</div>
3532
</div>
36-
);
37-
}
38-
}
33+
</div>
34+
);
35+
};
36+
37+
export default AuthPage;

src/js/components/login/LoginBanner.jsx

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,18 @@
33
* Created by Kyle Fox 2/19/16
44
*/
55

6-
import React from 'react';
76
import LoginIntro from './LoginIntro';
87
import LoginContainer from '../../containers/login/LoginContainer';
98

10-
export default class LoginBanner extends React.Component {
11-
render() {
12-
return (
13-
<div className="login-banner-wrap">
14-
<div className="usa-da-login-wrap">
15-
<LoginIntro />
16-
<LoginContainer {...this.props} />
17-
</div>
9+
const LoginBanner = (props) => {
10+
return (
11+
<div className="login-banner-wrap">
12+
<div className="usa-da-login-wrap">
13+
<LoginIntro />
14+
<LoginContainer {...props} />
1815
</div>
19-
);
20-
}
21-
}
16+
</div>
17+
);
18+
};
19+
20+
export default LoginBanner;

src/js/components/login/LoginCaia.jsx

Lines changed: 44 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,8 @@
33
* Createdd by Kevin Li 10/13/16
44
*/
55

6-
import React from 'react';
6+
import { useState, useEffect } from 'react';
77
import PropTypes from 'prop-types';
8-
import _ from 'lodash';
98
import Cookies from 'js-cookie';
109
import { kGlobalConstants } from '../../GlobalConstants';
1110
import { getRedirectPath } from '../../helpers/loginHelper';
@@ -14,52 +13,41 @@ const propTypes = {
1413
location: PropTypes.object
1514
};
1615

17-
const defaultProps = {
18-
location: null
19-
};
16+
const LoginCaia = ({location = null}) => {
17+
const [loginRedirect, setLoginRedirect] = useState('');
2018

21-
export default class LoginCaia extends React.Component {
22-
constructor(props) {
23-
super(props);
24-
this.state = {
25-
redirect: ''
26-
};
27-
this.handleClick = this.handleClick.bind(this);
28-
}
19+
useEffect(() => {
20+
detectRedirection();
21+
}, []);
2922

30-
componentDidMount() {
31-
this.detectRedirection();
32-
}
23+
useEffect(() => {
24+
detectRedirection();
25+
}, [location]);
3326

34-
componentDidUpdate(prevProps) {
35-
if (!_.isEqual(prevProps.location, this.props.location)) {
36-
this.detectRedirection();
27+
useEffect(() => {
28+
if(loginRedirect === '') {
29+
// remove the redirect destination cookie
30+
Cookies.remove('brokerRedirect');
31+
}
32+
else {
33+
// save the redirect destination as a cookie, expire after 5 min (expressed in units of
34+
// days per library documentation)
35+
Cookies.set('brokerRedirect', loginRedirect, { expires: (5 / (24 * 60)) });
3736
}
38-
}
37+
}, [loginRedirect]);
3938

40-
detectRedirection() {
39+
const detectRedirection = () => {
4140
// check if the URL has a redirect param, save it in the state
42-
const redirectPath = getRedirectPath(this.props.location);
41+
const redirectPath = getRedirectPath(location);
4342
if (redirectPath) {
44-
this.setState({
45-
redirect: redirectPath
46-
}, () => {
47-
// save the redirect destination as a cookie, expire after 5 min (expressed in units of
48-
// days per library documentation)
49-
Cookies.set('brokerRedirect', this.state.redirect, { expires: (5 / (24 * 60)) });
50-
});
43+
setLoginRedirect(redirectPath);
5144
}
5245
else {
53-
this.setState({
54-
redirect: ''
55-
}, () => {
56-
// remove the redirect destination cookie
57-
Cookies.remove('brokerRedirect');
58-
});
46+
setLoginRedirect('');
5947
}
60-
}
48+
};
6149

62-
handleClick(e) {
50+
const handleClick = (e) => {
6351
if (e.keyCode === '13' || !e.keyCode) {
6452
const scope = "openid email profile address phone";
6553
const url = `${kGlobalConstants.CAIA_ROOT}/as/authorization.oauth2?`
@@ -69,28 +57,26 @@ export default class LoginCaia extends React.Component {
6957
+ `&client_id=${encodeURIComponent(kGlobalConstants.CAIA_CLIENT)}`;
7058
window.location.assign(url);
7159
}
72-
}
60+
};
7361

74-
render() {
75-
return (
76-
<div className="row">
77-
<div className="col-xs-12">
78-
<p className="instructions">
79-
Sign in or register for the Data Broker using your CAIA login.
80-
</p>
81-
<button
82-
className="usa-da-button btn-primary btn-lg btn-full bottom-login-button"
83-
tabIndex="0"
84-
role="link"
85-
onKeyDown={this.handleClick}
86-
onClick={this.handleClick}>
87-
Sign In Using CAIA
88-
</button>
89-
</div>
62+
return (
63+
<div className="row">
64+
<div className="col-xs-12">
65+
<p className="instructions">
66+
Sign in or register for the Data Broker using your CAIA login.
67+
</p>
68+
<button
69+
className="usa-da-button btn-primary btn-lg btn-full bottom-login-button"
70+
tabIndex="0"
71+
role="link"
72+
onKeyDown={handleClick}
73+
onClick={handleClick}>
74+
Sign In Using CAIA
75+
</button>
9076
</div>
91-
);
92-
}
93-
}
77+
</div>
78+
);
79+
};
9480

9581
LoginCaia.propTypes = propTypes;
96-
LoginCaia.defaultProps = defaultProps;
82+
export default LoginCaia;

0 commit comments

Comments
 (0)