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

Update/bid tracker remaining bids message #715

Merged
merged 9 commits into from
Feb 26, 2020
66 changes: 33 additions & 33 deletions src/Components/BidTracker/BidTracker.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -62,16 +62,16 @@ class BidTracker extends Component {
render() {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm trying to tell - was anything actually updated in this file, or did the line spacing just change?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the end, after being further explained the intention of the ticket, no. Before, when I added a whole alert and was counting approved bids and non-approved, yes. I guess when I removed the unnecessary code, the spacing updated.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool, see if you can revert the changes so that the spacing is back to normal

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok, i'll try

const { sortValue } = this.state;
const { bidList, bidListIsLoading, acceptBid, declineBid, submitBid, deleteBid,
notifications, notificationsIsLoading, markBidTrackerNotification, userProfile,
userProfileIsLoading, isPublic, useCDOView } = this.props;
notifications, notificationsIsLoading, markBidTrackerNotification, userProfile,
userProfileIsLoading, isPublic, useCDOView } = this.props;
const isLoading = bidListIsLoading || userProfileIsLoading;
const title = isPublic && get(userProfile, 'name') && !userProfileIsLoading ?
`${userProfile.name}'s Bid Tracker` : 'Bid Tracker';
`${userProfile.name}'s Bid Tracker` : 'Bid Tracker';

const emptyBidListText = isPublic ?
'This user does not have any bids in their bid list.'
:
'You do not have any bids in your bid list.';
'This user does not have any bids in their bid list.'
:
'You do not have any bids in your bid list.';

const cdoEmail = get(userProfile, 'cdo.email');

Expand All @@ -82,13 +82,13 @@ class BidTracker extends Component {
<BackButton />
{ isPublic && <SearchAsClientButton user={userProfile} /> }
{
!isPublic &&
<NotificationsSection
notifications={notifications}
notificationsIsLoading={notificationsIsLoading}
markBidTrackerNotification={markBidTrackerNotification}
/>
}
!isPublic &&
<NotificationsSection
notifications={notifications}
notificationsIsLoading={notificationsIsLoading}
markBidTrackerNotification={markBidTrackerNotification}
/>
}
<div className="usa-grid-full">
<div className="usa-width-one-half bid-tracker-greeting-container">
<div className="usa-grid-full">
Expand All @@ -98,9 +98,9 @@ class BidTracker extends Component {
<div className="usa-width-one-half bid-tracker-cdo-email-container">
<div className="bid-tracker-cdo-email">
{
cdoEmail && !userProfileIsLoading &&
<ContactCDOButton email={cdoEmail} />
}
cdoEmail && !userProfileIsLoading &&
<ContactCDOButton email={cdoEmail} />
}
</div>
</div>
</div>
Expand All @@ -117,24 +117,24 @@ class BidTracker extends Component {
</div>
<div className="bid-tracker-content-container">
{
isLoading ?
<Spinner type="homepage-position-results" size="big" /> :
<div className="usa-grid-full">
<BidTrackerCardList
bids={sortedBids}
acceptBid={acceptBid}
declineBid={declineBid}
submitBid={submitBid}
deleteBid={deleteBid}
userProfile={userProfile}
useCDOView={useCDOView}
/>
</div>
}
isLoading ?
<Spinner type="homepage-position-results" size="big" /> :
<div className="usa-grid-full">
<BidTrackerCardList
bids={sortedBids}
acceptBid={acceptBid}
declineBid={declineBid}
submitBid={submitBid}
deleteBid={deleteBid}
userProfile={userProfile}
useCDOView={useCDOView}
/>
</div>
}
{
!isLoading && !get(bidList, 'results', []).length &&
<Alert type="info" title="Bid list empty" messages={[{ body: emptyBidListText }]} />
}
!isLoading && !get(bidList, 'results', []).length &&
<Alert type="info" title="Bid list empty" messages={[{ body: emptyBidListText }]} />
}
</div>
</div>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import LinkButton from '../../../LinkButton';
const ClosedAlert = ({ title, date, id }, { condensedView }) => (
<div className="bid-tracker-alert-container bid-tracker-alert-container--closed">
<div className="top-text">
{title} has been filled
Your bid on {title} is no longer applicable.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

</div>
{
date &&
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@ exports[`ClosedAlertComponent matches snapshot 1`] = `
<div
className="top-text"
>
Your bid on
title
has been filled
is no longer applicable.
</div>
<div
className="date-text"
Expand Down