Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dev -> staging #118

Closed
wants to merge 201 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
201 commits
Select commit Hold shift + click to select a range
e015a7d
chore: remove unnecessary css file from the build output
rtirserio Dec 13, 2018
5c4946b
chore: update docs regarding apache compression config
rtirserio Dec 14, 2018
03ad41d
Update bid list due date to match site-wide format
mjoyce91 Dec 14, 2018
271f265
Use position id instead of position_number to query for position details
mjoyce91 Dec 17, 2018
f600519
chore: remove unused props from components
rtirserio Dec 17, 2018
2dbad86
chore: fix err due to incorrect favicon size in manifest
rtirserio Dec 17, 2018
d129c59
chore: remove unused props from the Home container
rtirserio Dec 17, 2018
1aff270
chore: remove unused props from the HomePagePositionsContainer component
rtirserio Dec 17, 2018
91a7b35
fix: update profile page based on qa
rtirserio Dec 18, 2018
4722823
Update styles and content in Position Details page based on QA feedback
mjoyce91 Dec 18, 2018
cf87dff
fix: add logo to saved search title
rtirserio Dec 18, 2018
c7145d1
fix: search page updates from qa
rtirserio Dec 18, 2018
2475141
chore: linter fix
rtirserio Dec 18, 2018
e73aaf6
chore: fix linter issue
rtirserio Dec 18, 2018
c9dc332
Merge branch 'fix/profile-qa' into fix/saved-search-qa
rtirserio Dec 18, 2018
fcb0837
fix: search page updates from qa
rtirserio Dec 18, 2018
27d656c
chore: linter fix
rtirserio Dec 18, 2018
02f757c
Merge branch 'fix/search-qa' of github.com:MetaPhase-Consulting/State…
rtirserio Dec 18, 2018
1bdf9e9
Remove feedback button site-wide
mjoyce91 Dec 19, 2018
6cbbaff
Use object in state instead of array
mjoyce91 Dec 19, 2018
c3c196a
Minor edits to Homepage based on QA
mjoyce91 Dec 19, 2018
ca9d871
fix: make the pagination link clickable area larger
rtirserio Dec 19, 2018
660df13
Merge pull request #32 from MetaPhase-Consulting/chore/performance
burgwyn Dec 19, 2018
9d0275e
Merge branch 'dev' into hotfix/bid-due-date-format
burgwyn Dec 19, 2018
d88cfde
Merge pull request #34 from MetaPhase-Consulting/hotfix/bid-due-date-…
burgwyn Dec 19, 2018
4e3da2e
Merge branch 'dev' into hotfix/remove-feedback
burgwyn Dec 19, 2018
97e89c7
Merge pull request #42 from MetaPhase-Consulting/hotfix/remove-feedback
burgwyn Dec 19, 2018
5381e40
Merge branch 'dev' into feature/position-id-query
burgwyn Dec 19, 2018
092e343
Merge branch 'dev' into fix/homepage-cleanups
rtirserio Dec 19, 2018
dbb918f
Merge branch 'dev' into fix/profile-qa
rtirserio Dec 19, 2018
b36aea4
Merge branch 'dev' into fix/saved-search-qa
rtirserio Dec 19, 2018
0cf384f
Merge branch 'dev' into fix/search-qa
rtirserio Dec 19, 2018
d3e0a02
Merge branch 'dev' into fix/pagination-link
rtirserio Dec 19, 2018
ef3b696
Merge pull request #33 from MetaPhase-Consulting/feature/position-id-…
burgwyn Dec 19, 2018
8bf2946
Merge branch 'dev' into hotfix/homepage-QA
burgwyn Dec 19, 2018
a96a6a1
Merge branch 'dev' into fix/homepage-cleanups
rtirserio Dec 19, 2018
8c308b5
Merge branch 'dev' into fix/profile-qa
rtirserio Dec 19, 2018
18c060d
Merge branch 'dev' into fix/saved-search-qa
rtirserio Dec 19, 2018
8807ed2
Merge branch 'dev' into fix/search-qa
rtirserio Dec 19, 2018
e098d48
Merge branch 'dev' into fix/pagination-link
rtirserio Dec 19, 2018
c6bd78d
Merge branch 'dev' into hotfix/TM-308-Details-QA
mjoyce91 Dec 19, 2018
27c1ed4
fix: use the correct button style
rtirserio Dec 19, 2018
0351c1b
Merge pull request #39 from MetaPhase-Consulting/fix/saved-search-qa
burgwyn Dec 20, 2018
b2c0632
Merge branch 'dev' into fix/profile-qa
rtirserio Dec 20, 2018
8ecfe2e
Merge branch 'dev' into fix/pagination-link
rtirserio Dec 20, 2018
8f5d6ee
fix: better accessibility for active pagination tab selection
rtirserio Dec 20, 2018
7a18b44
Merge branch 'dev' into fix/search-qa
rtirserio Dec 20, 2018
d684b06
Merge pull request #36 from MetaPhase-Consulting/fix/profile-qa
rtirserio Dec 20, 2018
245a4f0
Merge branch 'dev' into fix/homepage-cleanups
rtirserio Dec 20, 2018
a535130
Merge branch 'dev' into fix/search-qa
rtirserio Dec 20, 2018
6b90ec6
Merge branch 'dev' into fix/pagination-link
rtirserio Dec 20, 2018
cf4a82c
Merge pull request #35 from MetaPhase-Consulting/fix/homepage-cleanups
rtirserio Dec 20, 2018
8cb50ea
Merge branch 'dev' into fix/pagination-link
rtirserio Dec 20, 2018
b701fbc
Merge branch 'dev' into hotfix/homepage-QA
mjoyce91 Dec 20, 2018
063eed3
Merge branch 'dev' into hotfix/TM-308-Details-QA
mjoyce91 Dec 20, 2018
d66064b
Merge pull request #44 from MetaPhase-Consulting/fix/pagination-link
rtirserio Dec 20, 2018
ffeb02d
Merge branch 'dev' into fix/search-qa
rtirserio Dec 20, 2018
8c960c9
fix: use correct button design
rtirserio Dec 20, 2018
656e33b
Merge branch 'dev' into hotfix/TM-308-Details-QA
mjoyce91 Dec 20, 2018
3abf692
Merge pull request #41 from MetaPhase-Consulting/fix/search-qa
burgwyn Dec 21, 2018
48e7e24
Merge branch 'dev' into hotfix/TM-308-Details-QA
burgwyn Dec 21, 2018
d15373e
Merge pull request #38 from MetaPhase-Consulting/hotfix/TM-308-Detail…
burgwyn Dec 21, 2018
ca233d0
Merge branch 'dev' into hotfix/homepage-QA
burgwyn Dec 21, 2018
cd43281
Merge pull request #43 from MetaPhase-Consulting/hotfix/homepage-QA
burgwyn Dec 21, 2018
116df11
fix: use lodash get so that non-existent nested property doesn't thro…
mjoyce91 Dec 21, 2018
76f7bce
Align bid count with data points in ResultsCondensedCard
mjoyce91 Dec 21, 2018
237c74f
Show "Available" filter to all users, not just CDOs (#46)
mjoyce91 Dec 21, 2018
35e9248
Merge branch 'dev' into fix/card-bid-count-style
mjoyce91 Dec 21, 2018
193cde8
Update dashboard styles and content based on QA
mjoyce91 Dec 21, 2018
1790f7f
Fix style for bid list container
mjoyce91 Dec 21, 2018
ad42149
Move Bid Count in-line with data points on ResultsCard
mjoyce91 Dec 21, 2018
402bd13
Merge pull request #47 from MetaPhase-Consulting/fix/card-bid-count-s…
mjoyce91 Dec 26, 2018
53fb4c5
Merge branch 'dev' into fix/dashboard-qa
mjoyce91 Dec 26, 2018
650e304
View More -> View more
mjoyce91 Dec 26, 2018
94c4cac
Add disabled state for BidListButton based on proposed API updates
mjoyce91 Dec 26, 2018
d43ad8a
Use real properties from API PR, combine strings
mjoyce91 Dec 26, 2018
da1e340
Use white for button text color
mjoyce91 Dec 26, 2018
f8cb458
Merge pull request #48 from MetaPhase-Consulting/fix/dashboard-qa
mjoyce91 Dec 27, 2018
3ba63d3
feature: add remove bid to the bid tracker for draft and submitted bids
rtirserio Dec 27, 2018
b6944e3
add additional status to the canDeleteBid function
rtirserio Dec 27, 2018
a9d07a6
Merge branch 'dev' into feature/remove-bid-locations
rtirserio Dec 27, 2018
d776131
Merge branch 'dev' into feature/TM-279-disabled-bid-button
burgwyn Dec 31, 2018
c94fc92
Add react-toastify and use with bid list additions/removals (#51)
mjoyce91 Jan 2, 2019
0a869e9
Merge branch 'dev' into feature/remove-bid-locations
burgwyn Jan 2, 2019
0df9ab1
Check if bid can be deleted and apply disabled status accordingly; up…
mjoyce91 Jan 2, 2019
4663d21
Merge branch 'dev' into feature/TM-279-disabled-bid-button
mjoyce91 Jan 2, 2019
7316200
feature: use the can_delete property from the bid rather than calcula…
rtirserio Jan 3, 2019
3b249d6
Merge pull request #49 from MetaPhase-Consulting/feature/TM-279-disab…
mjoyce91 Jan 7, 2019
d98fc6b
Merge branch 'dev' into feature/remove-bid-locations
rtirserio Jan 7, 2019
024c570
Merge pull request #50 from MetaPhase-Consulting/feature/remove-bid-l…
rtirserio Jan 7, 2019
f487122
Add loading spinner to Bid List button (#52)
mjoyce91 Jan 8, 2019
cd772f8
Compress us-flag.jpg (#53)
mjoyce91 Jan 9, 2019
4bb1ead
Use react-linkify to automatically hyperlink URLs and email addresses…
mjoyce91 Jan 11, 2019
e04c2ff
Authorization -> Authentication (#54)
burgwyn Jan 11, 2019
52e3312
Merge branch 'dev' into feature/TM-400-hyperlinks
burgwyn Jan 11, 2019
b0b17d8
Update pagination and page size defaults in alignment with designs
mjoyce91 Jan 15, 2019
70ca045
Merge branch 'dev' into feature/page-sort-defaults
mjoyce91 Jan 15, 2019
ed1268e
Merge pull request #59 from MetaPhase-Consulting/feature/page-sort-de…
mjoyce91 Jan 16, 2019
44d97c6
Display link, if available, in the glossary
mjoyce91 Jan 16, 2019
372ebc6
Merge branch 'dev' into feature/glossary-links
mjoyce91 Jan 16, 2019
c63b113
Merge branch 'dev' into feature/TM-400-hyperlinks
mjoyce91 Jan 17, 2019
7321aae
Merge pull request #57 from MetaPhase-Consulting/feature/TM-400-hyper…
mjoyce91 Jan 17, 2019
a1e06d8
Merge branch 'dev' into feature/glossary-links
mjoyce91 Jan 17, 2019
f0df381
Add ability to edit links from Glossary editor; update styling for gl…
mjoyce91 Jan 17, 2019
cad4303
Merge pull request #61 from MetaPhase-Consulting/feature/glossary-links
mjoyce91 Jan 17, 2019
597acee
Merge branch 'dev' into feature/glossary-editor-link
mjoyce91 Jan 17, 2019
0548450
Reduce code complexity, fix long link styles
mjoyce91 Jan 25, 2019
6218c6f
Update snapshot
mjoyce91 Jan 28, 2019
d7f10d8
Merge pull request #62 from MetaPhase-Consulting/feature/glossary-edi…
mjoyce91 Jan 28, 2019
a9195e1
Add bundlesize (#69)
burgwyn Jan 30, 2019
cbd0313
Chore/linter (#67)
rtirserio Jan 30, 2019
ce1228c
End of basic auth (#63)
rtirserio Jan 30, 2019
5de9100
Bidder role - TM-371 (#68)
mjoyce91 Jan 31, 2019
7c91ca8
Fix/mock auth (#70)
rtirserio Feb 1, 2019
510a291
Default to true if can_delete property is not found
mjoyce91 Feb 6, 2019
7a5f710
Update snapshots
mjoyce91 Feb 7, 2019
e319608
Merge pull request #72 from MetaPhase-Consulting/hotfix/can-delete-bid
mjoyce91 Feb 8, 2019
004535d
fix: remove the auth redirect loop and clean up reamining references …
rtirserio Feb 11, 2019
fc757c2
TM-410 - display favorites list as 4 across above the large break poi…
rtirserio Feb 11, 2019
fbf4dab
fix: remove the auth redirect loop (#73)
rtirserio Feb 11, 2019
5a6a8e0
dev -> staging (#56) (#75)
mjoyce91 Feb 12, 2019
4349d66
Merge branch 'staging' into dev
burgwyn Feb 12, 2019
4224df2
Remove use of skill cone/code to skill (#76)
mjoyce91 Feb 12, 2019
665ff24
Add Public Profile page - links from CDO portfolio, profile/public/:i…
mjoyce91 Feb 12, 2019
3a0cd3e
Sort bid cycles alphabetically by name (#78)
mjoyce91 Feb 13, 2019
71a330e
feature: download search results in csv format. Resolves TM-439
rtirserio Feb 13, 2019
9a420a5
Merge branch 'dev' into feature/search-csv-export
rtirserio Feb 13, 2019
fe41c42
chore: use default variable for sort
rtirserio Feb 14, 2019
5f71e9b
chore: reformat the date before file creation
rtirserio Feb 15, 2019
eae2f92
Simplified search bar v2 (#81)
mjoyce91 Feb 19, 2019
8cee540
Redesign compare page (#82)
mjoyce91 Feb 19, 2019
c6e68a2
Merge branch 'dev' into feature/search-csv-export
burgwyn Feb 19, 2019
a2651d7
feature: move the download button and use the secondary style. resolv…
rtirserio Feb 19, 2019
cf1848d
Merge pull request #79 from MetaPhase-Consulting/feature/search-csv-e…
rtirserio Feb 19, 2019
e2f57d0
fix: set a width on the cards for the favorite positions profile scre…
rtirserio Feb 20, 2019
752b7d5
Fix search styles from breaking on the bidder portfolio
mjoyce91 Feb 20, 2019
cf87483
Merge pull request #83 from MetaPhase-Consulting/hotfix/search-button…
mjoyce91 Feb 20, 2019
854d0e4
Reverting the changes to the glossary card due to the new term dialog…
mjoyce91 Feb 20, 2019
d780d1a
Merge branch 'dev' into hotfix/new-glossary-term
mjoyce91 Feb 20, 2019
0610089
Add link-container class back in
mjoyce91 Feb 20, 2019
18f45ea
Update snapshots
mjoyce91 Feb 20, 2019
cfcc169
Trigger circleci build
mjoyce91 Feb 20, 2019
485562e
Merge pull request #84 from MetaPhase-Consulting/hotfix/new-glossary-…
mjoyce91 Feb 20, 2019
82d0919
Code smells (#86)
burgwyn Feb 22, 2019
1c0b7ca
Comparison drawer component, add event listeners where needed, remove…
mjoyce91 Feb 22, 2019
b097a6d
Track old compare choices to maintain sorting during an update
mjoyce91 Feb 22, 2019
8b4d806
Add test coverage, use cancel tokens
mjoyce91 Feb 23, 2019
87acc1b
Merge branch 'dev' into feature/comparison-drawer, resolve conflicts
mjoyce91 Feb 23, 2019
8bc2241
Merge pull request #87 from MetaPhase-Consulting/feature/comparison-d…
mjoyce91 Feb 25, 2019
ca472b4
Change dropdown menu link name from "Profile" to "Dashboard"
mjoyce91 Feb 26, 2019
877d0c8
Merge branch 'dev' into fix/profile-to-dashboard
mjoyce91 Feb 26, 2019
d20cc4c
Merge pull request #88 from MetaPhase-Consulting/fix/profile-to-dashb…
mjoyce91 Feb 28, 2019
eeb99f3
Remove How to Bid section from position details (#89)
mjoyce91 Feb 28, 2019
b476e7f
Homepage QA (#90)
mjoyce91 Feb 28, 2019
b12b65e
Conditional rendering of Bid Count on Bid Tracker cards, update Resul…
mjoyce91 Feb 28, 2019
a61b081
Merge branch 'dev' into update/results-cards-and-tracker-QA
mjoyce91 Feb 28, 2019
2b2f377
Merge pull request #91 from MetaPhase-Consulting/update/results-cards…
mjoyce91 Mar 1, 2019
21b55fd
Break out compare elements into their own rows, add Bid List button t…
mjoyce91 Mar 1, 2019
abb91b8
Remove eslint-disable
mjoyce91 Mar 1, 2019
6a5680f
feature: include org info for domestic positions (#92)
rtirserio Mar 1, 2019
a30ce10
Merge branch 'dev' into update/compare-QA
burgwyn Mar 1, 2019
caffad7
Remove bidListToggleIsLoading since that is handled in BidListButton …
mjoyce91 Mar 5, 2019
7af06c2
Display the service needs filter as a pill on the results page (#95)
mjoyce91 Mar 6, 2019
aa27a97
Add error handling for position details screen (#93)
mjoyce91 Mar 6, 2019
fb08f8e
Merge branch 'dev' into update/compare-QA
burgwyn Mar 6, 2019
c86270c
Merge pull request #94 from MetaPhase-Consulting/update/compare-QA
mjoyce91 Mar 6, 2019
3b1a9f5
feature: add bid list button to the favorites cards. TM-512
rtirserio Mar 7, 2019
1de3839
Merge branch 'dev' into staging
mjoyce91 Mar 7, 2019
ea703e2
dev -> staging
mjoyce91 Mar 7, 2019
ab38994
Merge pull request #99 from MetaPhase-Consulting/dev-staging-sprint5
mjoyce91 Mar 7, 2019
8b7a5ca
Make icons consistent throughout profile pages (#102)
mjoyce91 Mar 11, 2019
21c4b24
Service Needs -> Featured (#100)
mjoyce91 Mar 11, 2019
f593997
Add hover to dropdown (#103)
mjoyce91 Mar 11, 2019
bde31ab
Merge branch 'dev' into feature/bid-list-button-favs
rtirserio Mar 11, 2019
d6c5185
Update empty saved search list text (#101)
mjoyce91 Mar 11, 2019
f4a8388
Add custom filter for including null language positions (#104)
mjoyce91 Mar 11, 2019
ec03e77
Remove Status component throughout app (#105)
mjoyce91 Mar 11, 2019
e319f3b
Merge branch 'dev' into feature/bid-list-button-favs
burgwyn Mar 12, 2019
7a060b0
fix: change label. TM-632 (#107)
rtirserio Mar 13, 2019
a7650ed
Adjust elements to grow
mjoyce91 Mar 13, 2019
bee8872
fix: allow export on edge to run
rtirserio Mar 13, 2019
9b45d33
Merge branch 'dev' into feature/bid-list-button-favs
rtirserio Mar 13, 2019
b7d78c1
Merge pull request #97 from MetaPhase-Consulting/feature/bid-list-but…
rtirserio Mar 14, 2019
227ed95
Merge branch 'dev' into fix/edge_export
rtirserio Mar 14, 2019
601d85c
Merge pull request #111 from MetaPhase-Consulting/fix/edge_export
rtirserio Mar 14, 2019
6726399
Styles, add post to top
mjoyce91 Mar 14, 2019
e3492ec
Update ordering for data points on Compare page (#110)
mjoyce91 Mar 14, 2019
46afe37
Merge branch 'dev' into update/card-flex, resolve conflicts
mjoyce91 Mar 14, 2019
228a3f4
Remove post, add grade to bottom section
mjoyce91 Mar 14, 2019
1d6c2d1
Merge branch 'dev' into update/TM-633-card-design
mjoyce91 Mar 15, 2019
51e8714
Merge pull request #109 from MetaPhase-Consulting/update/card-flex
mjoyce91 Mar 18, 2019
3dae1bb
Merge branch 'dev' into update/TM-633-card-design
mjoyce91 Mar 18, 2019
64e780e
Merge pull request #112 from MetaPhase-Consulting/update/TM-633-card-…
mjoyce91 Mar 18, 2019
db78518
Updates to Bid Tracker (#115)
mjoyce91 Mar 20, 2019
d4a15fc
Track favoriting loading state of individual IDs (#108)
mjoyce91 Mar 20, 2019
1f4a631
Handshake ribbon (#113)
mjoyce91 Mar 20, 2019
5b698ad
Test coverage (#117)
mjoyce91 Mar 20, 2019
dd98443
Add toast notifications for favoriting actions (#114)
mjoyce91 Mar 20, 2019
f44479f
Create BoxShadow component and use with various cards (#106)
mjoyce91 Mar 20, 2019
2995ac3
dev -> staging (#98) (#119)
mjoyce91 Mar 21, 2019
b92e781
Sprint 6 merge conflicts (#120)
mjoyce91 Mar 25, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .codeclimate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@ plugins:
enabled: true
exclude_patterns:
- node_modules/
- config/ # build configuration
- build/ # build artifacts
- config/ # build configuration - config/ # build configuration
- coverage/ # test coverage
- scripts/ # build & utility scripts
- src/__mocks__/ # test objects
- src/Constants/PropTypes.js # shape definitions
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"babel-polyfill": "^6.26.0",
"body-parser": "^1.18.2",
"bunyan": "^1.8.12",
"css-box-shadow": "^1.0.0-3",
"date-fns": "^1.29.0",
"draft-js": "^0.10.4",
"draft-js-plugins-editor": "^2.0.4",
Expand All @@ -25,6 +26,7 @@
"rc-steps": "^3.1.0",
"react": "^15.6.2",
"react-autosuggest": "^9.3.2",
"react-csv": "^1.1.1",
"react-dom": "^15.6.2",
"react-fontawesome": "^1.6.1",
"react-helmet": "^5.2.0",
Expand Down
32 changes: 23 additions & 9 deletions src/Components/AccountDropdown/AccountDropdown.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ export class AccountDropdown extends Component {
constructor(props) {
super(props);
this.hideDropdown = this.hideDropdown.bind(this);
this.showDropdown = this.showDropdown.bind(this);
this.logout = this.logout.bind(this);
}

Expand All @@ -23,6 +24,11 @@ export class AccountDropdown extends Component {
this.dropdown.hide();
}

showDropdown() {
// Explicitly show the dropdown using the built-in hide() function from react-simple-dropdown
this.dropdown.show();
}

render() {
const { shouldDisplayName, userProfile } = this.props;
const displayName = userProfile ? userProfile.display_name : '...';
Expand All @@ -38,22 +44,30 @@ export class AccountDropdown extends Component {

return (
isLoading &&
<Dropdown className="account-dropdown" ref={(dropdown) => { this.dropdown = dropdown; }} removeElement>
<Dropdown
className="account-dropdown"
ref={(dropdown) => { this.dropdown = dropdown; }}
removeElement
onMouseEnter={this.showDropdown}
onMouseLeave={this.hideDropdown}
>
<DropdownTrigger href="/#">
<Avatar className="account-dropdown--avatar" {...avatar} />
{
shouldDisplayName &&
<span className="account-dropdown--name" id="account-username">{displayName}</span>
}
</DropdownTrigger>
<DropdownContent>
<div className="account-dropdown--identity account-dropdown--segment">
<div>Signed in as</div>
<strong>{displayName}</strong>
</div>
<Link className="account-dropdown--identity account-dropdown--segment account-dropdown-link" to="/profile/dashboard" onClick={this.hideDropdown}>Profile</Link>
<Link className="account-dropdown--identity account-dropdown--segment account-dropdown-link" to="/logout" onClick={this.logout}>Logout</Link>
</DropdownContent>
<div className="dropdown-content-outer-container">
<DropdownContent onMouseEnter={this.showDropdown}>
<div className="account-dropdown--identity account-dropdown--segment">
<div>Signed in as</div>
<strong>{displayName}</strong>
</div>
<Link className="account-dropdown--identity account-dropdown--segment account-dropdown-link" to="/profile/dashboard" onClick={this.hideDropdown}>Dashboard</Link>
<Link className="account-dropdown--identity account-dropdown--segment account-dropdown-link" to="/logout" onClick={this.logout}>Logout</Link>
</DropdownContent>
</div>
</Dropdown>
);
}
Expand Down
18 changes: 16 additions & 2 deletions src/Components/AccountDropdown/AccountDropdown.test.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,14 +54,28 @@ describe('AccountDropdown', () => {
// define the instance
const instance = accountDropdown.instance();
instance.dropdown = { hide: () => {} };
// spy the logout function
// spy the hideDropdown function
const spy = sinon.spy(instance, 'hideDropdown');
// click to logout
// call function
instance.hideDropdown();
// logout function should have been called once
sinon.assert.calledOnce(spy);
});

it('can call the showDropdown function', () => {
const accountDropdown = shallow(<AccountDropdown />);

// define the instance
const instance = accountDropdown.instance();
instance.dropdown = { show: () => {} };
// spy the showDropdown function
const spy = sinon.spy(instance, 'showDropdown');
// click to logout
instance.showDropdown();
// logout function should have been called once
sinon.assert.calledOnce(spy);
});

it('does not display the name when shouldDisplayName is false', () => {
const accountDropdown = shallow(<AccountDropdown shouldDisplayName={false} />);
expect(accountDropdown.find('#account-username').exists()).toBe(false);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
exports[`AccountDropdown matches snapshot 1`] = `
<Dropdown
className="account-dropdown"
onMouseEnter={[Function]}
onMouseLeave={[Function]}
removeElement={true}
>
<DropdownTrigger
Expand All @@ -19,42 +21,49 @@ exports[`AccountDropdown matches snapshot 1`] = `
small={false}
/>
</DropdownTrigger>
<DropdownContent
className=""
<div
className="dropdown-content-outer-container"
>
<div
className="account-dropdown--identity account-dropdown--segment"
<DropdownContent
className=""
onMouseEnter={[Function]}
>
<div>
Signed in as
<div
className="account-dropdown--identity account-dropdown--segment"
>
<div>
Signed in as
</div>
<strong>
John Doe
</strong>
</div>
<strong>
John Doe
</strong>
</div>
<Link
className="account-dropdown--identity account-dropdown--segment account-dropdown-link"
onClick={[Function]}
replace={false}
to="/profile/dashboard"
>
Profile
</Link>
<Link
className="account-dropdown--identity account-dropdown--segment account-dropdown-link"
onClick={[Function]}
replace={false}
to="/logout"
>
Logout
</Link>
</DropdownContent>
<Link
className="account-dropdown--identity account-dropdown--segment account-dropdown-link"
onClick={[Function]}
replace={false}
to="/profile/dashboard"
>
Dashboard
</Link>
<Link
className="account-dropdown--identity account-dropdown--segment account-dropdown-link"
onClick={[Function]}
replace={false}
to="/logout"
>
Logout
</Link>
</DropdownContent>
</div>
</Dropdown>
`;

exports[`AccountDropdown matches snapshot when shouldDisplayName is true 1`] = `
<Dropdown
className="account-dropdown"
onMouseEnter={[Function]}
onMouseLeave={[Function]}
removeElement={true}
>
<DropdownTrigger
Expand All @@ -77,35 +86,40 @@ exports[`AccountDropdown matches snapshot when shouldDisplayName is true 1`] = `
John Doe
</span>
</DropdownTrigger>
<DropdownContent
className=""
<div
className="dropdown-content-outer-container"
>
<div
className="account-dropdown--identity account-dropdown--segment"
<DropdownContent
className=""
onMouseEnter={[Function]}
>
<div>
Signed in as
<div
className="account-dropdown--identity account-dropdown--segment"
>
<div>
Signed in as
</div>
<strong>
John Doe
</strong>
</div>
<strong>
John Doe
</strong>
</div>
<Link
className="account-dropdown--identity account-dropdown--segment account-dropdown-link"
onClick={[Function]}
replace={false}
to="/profile/dashboard"
>
Profile
</Link>
<Link
className="account-dropdown--identity account-dropdown--segment account-dropdown-link"
onClick={[Function]}
replace={false}
to="/logout"
>
Logout
</Link>
</DropdownContent>
<Link
className="account-dropdown--identity account-dropdown--segment account-dropdown-link"
onClick={[Function]}
replace={false}
to="/profile/dashboard"
>
Dashboard
</Link>
<Link
className="account-dropdown--identity account-dropdown--segment account-dropdown-link"
onClick={[Function]}
replace={false}
to="/logout"
>
Logout
</Link>
</DropdownContent>
</div>
</Dropdown>
`;
15 changes: 12 additions & 3 deletions src/Components/BidTracker/BidTrackerCard/BidTrackerCard.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import BidSteps from '../BidStep';
import BidTrackerCardBottom from '../BidTrackerCardBottom';
import BidTrackerCardTop from '../BidTrackerCardTop';
import OverlayAlert from '../OverlayAlert';
import BoxShadow from '../../BoxShadow';
import { shouldShowAlert } from '../BidHelpers';
import {
APPROVED_PROP,
Expand All @@ -14,7 +15,8 @@ import {
DRAFT_PROP,
} from '../../../Constants/BidData';

const BidTrackerCard = ({ bid, acceptBid, declineBid, submitBid, deleteBid, userProfile }) => {
const BidTrackerCard = ({ bid, acceptBid, declineBid, submitBid, deleteBid, showBidCount,
userProfile }) => {
// determine whether we render an alert on top of the card
const showAlert = shouldShowAlert(bid);
// determine whether we should show the contacts section based on the status
Expand All @@ -23,11 +25,12 @@ const BidTrackerCard = ({ bid, acceptBid, declineBid, submitBid, deleteBid, user
// add class to container for draft since we need to apply an overflow:hidden for drafts only
const draftClass = bid.status === DRAFT_PROP ? 'bid-tracker-bid-steps-container--draft' : '';
return (
<div className="bid-tracker">
<BoxShadow className="bid-tracker">
<div>
<BidTrackerCardTop
bid={bid}
deleteBid={deleteBid}
showBidCount={showBidCount}
/>
<div className={`usa-grid-full padded-container-inner bid-tracker-bid-steps-container ${draftClass}`}>
<BidSteps bid={bid} />
Expand Down Expand Up @@ -55,7 +58,7 @@ const BidTrackerCard = ({ bid, acceptBid, declineBid, submitBid, deleteBid, user
</div>
</div>
}
</div>
</BoxShadow>
);
};

Expand All @@ -66,6 +69,12 @@ BidTrackerCard.propTypes = {
submitBid: PropTypes.func.isRequired,
deleteBid: PropTypes.func.isRequired,
userProfile: USER_PROFILE.isRequired,
showBidCount: PropTypes.bool,
};

BidTrackerCard.defaultProps = {
showBidCount: true,
};


export default BidTrackerCard;
Original file line number Diff line number Diff line change
@@ -1,8 +1,16 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`BidTrackerCardComponent matches snapshot 1`] = `
<div
<BoxShadow
blurRadius={10}
className="bid-tracker"
color="rgba(0,0,0,.15)"
inset={false}
is="div"
offsetX={3}
offsetY={2}
spreadRadius={1}
style={Object {}}
>
<div>
<BidTrackerCardTop
Expand Down Expand Up @@ -56,6 +64,8 @@ exports[`BidTrackerCardComponent matches snapshot 1`] = `
}
}
deleteBid={[Function]}
hideDelete={false}
showBidCount={true}
showQuestion={true}
/>
<div
Expand Down Expand Up @@ -169,5 +179,5 @@ exports[`BidTrackerCardComponent matches snapshot 1`] = `
/>
</div>
</div>
</div>
</BoxShadow>
`;
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,13 @@ const BidTrackerCardBottom = (props) => {
};

BidTrackerCardBottom.propTypes = {
reviewer: BID_REVIEWER_OBJECT.isRequired,
reviewer: BID_REVIEWER_OBJECT,
bureau: PropTypes.string.isRequired,
userProfile: USER_PROFILE.isRequired,
};

BidTrackerCardBottom.defaultProps = {
reviewer: null,
};

export default BidTrackerCardBottom;
Loading