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 #56

Merged
merged 92 commits into from
Jan 11, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
92 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
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
1 change: 0 additions & 1 deletion config/webpack.config.prod.js
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,6 @@ module.exports = {
],
},
plugins: [
new ExtractTextPlugin('style.css'),
// Makes some environment variables available in index.html.
// The public URL is available as %PUBLIC_URL% in index.html, e.g.:
// <link rel="shortcut icon" href="%PUBLIC_URL%/favicon.ico">
Expand Down
8 changes: 8 additions & 0 deletions deploy/DEPLOY.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,14 @@ Add a `VirtualHost` entry in `/etc/httpd/conf/httpd.conf`. The web application u
</VirtualHost>
```

It is recommended to add the following to `/etc/httpd/conf/httpd.conf` to enable the compression of files served by Apache

```http
<IfModule mod_deflate.c>
SetOutputFilter DEFLATE
</IfModule>
```

## Clone repository

Use `git` to clone the web app repository
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
"react-select": "^1.1.0",
"react-simple-dropdown": "^3.2.0",
"react-tippy": "^1.2.2",
"react-toastify": "^4.5.1",
"redux": "^3.7.1",
"redux-form": "^7.2.0",
"redux-saga": "^0.15.6",
Expand Down
Binary file modified public/assets/img/us-flag.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion public/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"icons": [
{
"src": "favicon.ico",
"sizes": "192x192",
"sizes": "16x16",
"type": "image/png"
}
],
Expand Down
2 changes: 1 addition & 1 deletion src/Components/BidCount/BidCount.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ BidCount.propTypes = {
BidCount.defaultProps = {
bidStatistics: {},
hideLabel: false,
label: 'Bid Count:',
label: 'Bid count:',
altStyle: false,
};

Expand Down
4 changes: 2 additions & 2 deletions src/Components/BidCount/__snapshots__/BidCount.test.jsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ exports[`BidCountComponent matches snapshot 1`] = `
className="bid-count-label"
id="bid-counts"
>
Bid Count:
Bid count:
</div>
<ul
aria-labelledby="bid-counts"
Expand Down Expand Up @@ -42,7 +42,7 @@ exports[`BidCountComponent matches snapshot when hideLabel is true 1`] = `
className="bid-count-label usa-sr-only"
id="bid-counts"
>
Bid Count:
Bid count:
</div>
<ul
aria-labelledby="bid-counts"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ exports[`BidCycleList Component matches snapshot 1`] = `
columns={12}
>
<ProfileSectionTitle
icon=""
title="Bid Cycles"
/>
<BidCycleCard
Expand Down
36 changes: 25 additions & 11 deletions src/Components/BidListButton/BidListButton.jsx
Original file line number Diff line number Diff line change
@@ -1,42 +1,54 @@
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import FontAwesome from 'react-fontawesome';
import { get } from 'lodash';
import { existsInNestedObject } from '../../utilities';
import { BID_RESULTS } from '../../Constants/PropTypes';

class BidListButton extends Component {

constructor(props) {
super(props);
this.getBidData = this.getBidData.bind(this);
this.toggleSaved = this.toggleSaved.bind(this);
}

getIsSaved() {
// Is the id in the array? If so, return true
getBidData() {
const { compareArray, id } = this.props;
return existsInNestedObject(id, compareArray);
const exists = existsInNestedObject(id, compareArray);
return {
isSaved: exists,
canDelete: get(exists, 'can_delete', false),
};
}

toggleSaved() {
const { toggleBidPosition, id } = this.props;
const { disabled, toggleBidPosition, id, isLoading } = this.props;
const { isSaved } = this.getBidData();
// pass the id and the "remove" param
toggleBidPosition(id, this.getIsSaved());
if (!isLoading && !disabled) {
toggleBidPosition(id, isSaved);
}
}

render() {
// is the bid currently saved?
// save value and avoid interrogating the array more than once
const bidIsSaved = this.getIsSaved();
const text = bidIsSaved ? 'Remove from Bid List' : 'Add to Bid List';
const iconClass = bidIsSaved ? 'minus-circle' : 'plus-circle';
const { isSaved, canDelete } = this.getBidData();
const text = isSaved ? 'Remove from Bid List' : 'Add to Bid List';
const iconClass = isSaved ? 'minus-circle' : 'plus-circle';
const style = {
pointerEvents: this.props.isLoading ? 'none' : 'inherit',
};
const { className } = this.props;
const { className, disabled, isLoading } = this.props;
const disabled$ = disabled || !canDelete;
const disabledClass = disabled$ ? 'usa-button-disabled' : '';
return (
<button className={className} style={style} onClick={this.toggleSaved}>
<button className={`${disabledClass} ${className}`} style={style} onClick={this.toggleSaved} disabled={disabled$}>
<span className="button-icon">
<FontAwesome name={iconClass} />
{isLoading ?
(<span className="ds-c-spinner spinner-white" />) :
(<FontAwesome name={iconClass} />)}
</span>
<span>{text}</span>
</button>
Expand All @@ -50,12 +62,14 @@ BidListButton.propTypes = {
compareArray: BID_RESULTS,
isLoading: PropTypes.bool,
className: PropTypes.string,
disabled: PropTypes.bool,
};

BidListButton.defaultProps = {
compareArray: [],
isLoading: false,
className: 'bid-list-button',
disabled: false,
};

export default BidListButton;
41 changes: 41 additions & 0 deletions src/Components/BidListButton/BidListButton.test.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,47 @@ describe('BidListButtonComponent', () => {
sinon.assert.calledOnce(spy);
});

it('is disabled and correctly styled when disabled === true', () => {
const spy = sinon.spy();
const wrapper = shallow(
<BidListButton
id={1}
toggleBidPosition={spy}
compareArray={bidListFalse}
isLoading={false}
disabled
/>,
);
wrapper.find('.usa-button-disabled').simulate('click');
sinon.assert.notCalled(spy);
});

it('displays the spinner when isLoading is true', () => {
const spy = sinon.spy();
const wrapper = shallow(
<BidListButton
id={1}
toggleBidPosition={spy}
compareArray={bidListFalse}
isLoading
/>,
);
expect(wrapper.find('.ds-c-spinner').exists()).toBe(true);
});

it('hides the spinner when isLoading is false', () => {
const spy = sinon.spy();
const wrapper = shallow(
<BidListButton
id={1}
toggleBidPosition={spy}
compareArray={bidListFalse}
isLoading={false}
/>,
);
expect(wrapper.find('.ds-c-spinner').exists()).toBe(false);
});

it('matches snapshot when the user can add the position', () => {
const wrapper = shallow(
<BidListButton
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@

exports[`BidListButtonComponent matches snapshot when the user can add the position 1`] = `
<button
className="bid-list-button"
className="usa-button-disabled bid-list-button"
disabled={true}
onClick={[Function]}
style={
Object {
Expand All @@ -25,7 +26,8 @@ exports[`BidListButtonComponent matches snapshot when the user can add the posit

exports[`BidListButtonComponent matches snapshot when the user can remove the position 1`] = `
<button
className="bid-list-button"
className="usa-button-disabled bid-list-button"
disabled={true}
onClick={[Function]}
style={
Object {
Expand Down
5 changes: 3 additions & 2 deletions src/Components/BidListResultsCard/BidContent/BidContent.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@ import BidStatus from '../BidStatus';
import BidCount from '../../BidCount';
import { BID_STATISTICS_OBJECT } from '../../../Constants/PropTypes';

const BidContent = ({ status, positionNumber, postName, positionTitle, bidStatistics }) => (
const BidContent = ({ id, status, positionNumber, postName, positionTitle, bidStatistics }) => (
<div className="usa-grid-full bid-content-container">
<BidStatus status={status} positionTitle={positionTitle} />
<span className="bid-stats">
<BidCount bidStatistics={bidStatistics} altStyle label="Bid Count" />
</span>
<div>
<span className="bid-list-card-title-position">Position number </span>
<Link to={`/details/${positionNumber}`}>
<Link to={`/details/${id}`}>
{positionNumber}
</Link>
</div>
Expand All @@ -25,6 +25,7 @@ const BidContent = ({ status, positionNumber, postName, positionTitle, bidStatis
);

BidContent.propTypes = {
id: PropTypes.number.isRequired,
status: PropTypes.string.isRequired,
positionNumber: PropTypes.string.isRequired,
postName: PropTypes.string.isRequired,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ describe('BidContentComponent', () => {
it('is defined', () => {
const wrapper = shallow(
<BidContent
id={100}
status={APPROVED.property}
positionNumber="055A45"
postName="Paris"
Expand All @@ -22,6 +23,7 @@ describe('BidContentComponent', () => {
it('matches snapshot', () => {
const wrapper = shallow(
<BidContent
id={100}
status={APPROVED.property}
positionNumber="055A45"
postName="Paris"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ exports[`BidContentComponent matches snapshot 1`] = `
</span>
<Link
replace={false}
to="/details/055A45"
to="/details/100"
>
055A45
</Link>
Expand Down
1 change: 1 addition & 0 deletions src/Components/BidListResultsCard/BidListResultsCard.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ class BidListResultsCard extends Component {
content={
<div>
<BidContent
id={bid.position.id}
positionTitle={bid.position.title}
status={bid.status}
positionNumber={bid.position.position_number}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ exports[`BidListResultsCardComponent matches snapshot 1`] = `
"user": "Jenny Townpost",
}
}
id={2}
positionNumber="05A"
positionTitle="AO"
postName="Paris"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ const BidTrackerCard = ({ bid, acceptBid, declineBid, submitBid, deleteBid, user
<div>
<BidTrackerCardTop
bid={bid}
deleteBid={deleteBid}
/>
<div className={`usa-grid-full padded-container-inner bid-tracker-bid-steps-container ${draftClass}`}>
<BidSteps bid={bid} />
Expand Down
10 changes: 10 additions & 0 deletions src/Components/BidTracker/BidTrackerCard/BidTrackerCard.test.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,16 @@ describe('BidTrackerCardComponent', () => {
expect(wrapper).toBeDefined();
});

it('draft bid has draft class', () => {
const newProps = { ...props };
newProps.bid.status = 'draft';
const wrapper = shallow(
<BidTrackerCard {...newProps} />,
);
expect(wrapper).toBeDefined();
expect(wrapper.find('bid-tracker-bid-steps-container--draft')).toBeDefined();
});

it('matches snapshot', () => {
const wrapper = shallow(
<BidTrackerCard {...props} />,
Expand Down
Loading