Skip to content

Commit

Permalink
Merge branch 'dev' into feature/projected-vacancy-favoriting, update …
Browse files Browse the repository at this point in the history
…snapshots

* dev:
  Add role to persona links (#196)
  Feature flag for notifications (#191)
  Set uFEFF to false in CSV export to resolve default file format in Excel (#195)
  Make header color readable (#190)
  Add posted date to position details
  • Loading branch information
mjoyce91 committed May 13, 2019
2 parents b611024 + be798c9 commit 120675c
Show file tree
Hide file tree
Showing 13 changed files with 65 additions and 14 deletions.
3 changes: 2 additions & 1 deletion public/config/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"flags": {
"bidding": true,
"projected_vacancy": true,
"static_content": true
"static_content": true,
"notifications": false
}
}
3 changes: 2 additions & 1 deletion public/config/config_dev.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"flags": {
"bidding": false,
"projected_vacancy": true,
"static_content": true
"static_content": true,
"notifications": true
}
}
8 changes: 4 additions & 4 deletions public/login.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,16 @@ <h2>Personas</h2>
<a OnClick="login('admin', 'admin');">Administrator</a>
</li>
<li>
<a OnClick="login('shadtrachl', 'password');">Leah Shadtrach</a>
<a OnClick="login('shadtrachl', 'password');">Leah Shadtrach (CDO)</a>
</li>
<li>
<a OnClick="login('townpostj', 'password');">Jenny Townpost</a>
<a OnClick="login('townpostj', 'password');">Jenny Townpost (Bidder)</a>
</li>
<li>
<a OnClick="login('rehmant', 'password');">Tarek Rehman</a>
<a OnClick="login('rehmant', 'password');">Tarek Rehman (Bidder)</a>
</li>
<li>
<a OnClick="login('woodwardw', 'password');">Wendy Woodward</a>
<a OnClick="login('woodwardw', 'password');">Wendy Woodward (AO)</a>
</li>
</ul>
</div>
Expand Down
10 changes: 9 additions & 1 deletion src/Components/BidderPortfolio/ExportLink/ExportLink.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,15 @@ export class ExportLink extends Component {
return (
<div className="export-button-container">
<ExportButton onClick={this.onClick} isLoading={isLoading} />
<CSVLink tabIndex="-1" ref={this.setCsvRef} target="_blank" filename={this.props.filename} data={data} headers={HEADERS} />
<CSVLink
tabIndex="-1"
ref={this.setCsvRef}
target="_blank"
filename={this.props.filename}
data={data}
headers={HEADERS}
uFEFF={false}
/>
</div>
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ exports[`SearchResultsExportLink matches snapshot 1`] = `
separator=","
tabIndex="-1"
target="_blank"
uFEFF={true}
uFEFF={false}
/>
</div>
`;
5 changes: 4 additions & 1 deletion src/Components/Header/DesktopNav/DesktopNav.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import React from 'react';
import PropTypes from 'prop-types';
import FontAwesome from 'react-fontawesome';
import { Flag } from 'flag';
import { USER_PROFILE } from '../../../Constants/PropTypes';
import Notifications from '../Notifications';
import GlossaryIcon from '../GlossaryIcon';
Expand Down Expand Up @@ -55,7 +56,9 @@ const DesktopNav = ({
{
isLoggedIn &&
<span>
<Notifications />
<Flag name="flags.notifications">
<Notifications />
</Flag>
<GlossaryIcon />
</span>
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,11 @@ exports[`DesktopNav matches snapshot when logged in 1`] = `
className="header-nav-link"
>
<span>
<Connect(withRouter(Notifications)) />
<Flag
name="flags.notifications"
>
<Connect(withRouter(Notifications)) />
</Flag>
<Connect(GlossaryIcon) />
</span>
</div>
Expand Down
12 changes: 12 additions & 0 deletions src/Components/PositionDetailsItem/PositionDetailsItem.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import React from 'react';
import PropTypes from 'prop-types';
import { get } from 'lodash';
import { Flag } from 'flag';
import { COMMON_PROPERTIES } from '../../Constants/EndpointParams';
import LanguageList from '../../Components/LanguageList/LanguageList';
import CondensedCardDataPoint from '../CondensedCardData/CondensedCardDataPoint';
import OBCUrl from '../OBCUrl';
Expand Down Expand Up @@ -33,6 +34,7 @@ import {
NO_POST_DIFFERENTIAL,
NO_DANGER_PAY,
NO_USER_LISTED,
NO_UPDATE_DATE,
} from '../../Constants/SystemMessages';

export const renderHandshake = stats => (
Expand Down Expand Up @@ -76,6 +78,15 @@ const PositionDetailsItem = (props) => {

const incumbent = propOrDefault(details, 'current_assignment.user', NO_USER_LISTED);

const getPostedDate = () => {
const posted = get(details, COMMON_PROPERTIES.posted);
if (posted) {
return formatDate(posted);
}
return NO_UPDATE_DATE;
};
const postedDate = getPostedDate();

const stats = getBidStatisticsObject(details.bid_statistics);
return (
<div className="usa-grid-full padded-main-content position-details-outer-container">
Expand All @@ -102,6 +113,7 @@ const PositionDetailsItem = (props) => {
<CondensedCardDataPoint title="Danger pay" content={getFormattedObcData(dangerPay)} />
<CondensedCardDataPoint title="TED" content={formattedTourEndDate} />
<CondensedCardDataPoint title="Incumbent" content={incumbent} />
<CondensedCardDataPoint title="Posted" content={postedDate} />
</div>
</div>
<div className="usa-width-one-third position-details-contact-container">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,11 @@ exports[`PositionDetailsItem matches snapshot 1`] = `
hasFixedTitleWidth={false}
title="Incumbent"
/>
<CondensedCardDataPoint
content="Unknown"
hasFixedTitleWidth={false}
title="Posted"
/>
</div>
</div>
<div
Expand Down Expand Up @@ -334,6 +339,11 @@ exports[`PositionDetailsItem matches snapshot when there is an obc id 1`] = `
hasFixedTitleWidth={false}
title="Incumbent"
/>
<CondensedCardDataPoint
content="Unknown"
hasFixedTitleWidth={false}
title="Posted"
/>
</div>
</div>
<div
Expand Down Expand Up @@ -536,6 +546,11 @@ exports[`PositionDetailsItem matches snapshot when various data is missing from
hasFixedTitleWidth={false}
title="Incumbent"
/>
<CondensedCardDataPoint
content="Unknown"
hasFixedTitleWidth={false}
title="Posted"
/>
</div>
</div>
<div
Expand Down
8 changes: 5 additions & 3 deletions src/Components/ProfileDashboard/ProfileDashboard.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,11 @@ const ProfileDashboard = ({
columns={columns[1]}
className={'user-dashboard-section-container user-dashboard-column-2'}
>
<BoxShadow className="usa-width-one-whole user-dashboard-section notifications-section">
<Notifications notifications={notifications} />
</BoxShadow>
<Flag name="flags.notifications">
<BoxShadow className="usa-width-one-whole user-dashboard-section notifications-section">
<Notifications notifications={notifications} />
</BoxShadow>
</Flag>
<BoxShadow className="usa-width-one-whole user-dashboard-section favorites-section">
<SavedSearches />
</BoxShadow>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ class SearchResultsExportLink extends Component {
filename={this.props.filename}
data={data}
headers={HEADERS}
uFEFF={false}
/>
</div>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ exports[`SearchResultsExportLink matches snapshot 1`] = `
separator=","
tabIndex="-1"
target="_blank"
uFEFF={true}
uFEFF={false}
/>
</div>
`;
4 changes: 4 additions & 0 deletions src/sass/_glossaryEditor.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
.glossary-editor-page {
h2 {
color: initial;
}

.hello-greeting {
float: left;
}
Expand Down

0 comments on commit 120675c

Please sign in to comment.