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

setup for cn/htf/snd flags #1431

Merged
merged 29 commits into from
Apr 16, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
f422977
initial setup for CN flag
SidelineCory24 Apr 6, 2021
d831abc
Merge branch 'dev' into update/snd-cn-htf-flags
SidelineCory24 Apr 6, 2021
ee4d1d3
initial setup for HTF/SND flag
SidelineCory24 Apr 6, 2021
45962c0
adding flags to condensed cards
SidelineCory24 Apr 6, 2021
f90b4d4
hooking in htf & snd flags
SidelineCory24 Apr 7, 2021
6ea0755
audit/adding flags
SidelineCory24 Apr 7, 2021
b27fc4a
Merge branch 'dev' into update/snd-cn-htf-flags
SidelineCory24 Apr 7, 2021
2faf358
position details ribbon styling
SidelineCory24 Apr 8, 2021
b418276
bureau results card ribbon styling
SidelineCory24 Apr 8, 2021
88089d7
compare list ribbon styling
SidelineCory24 Apr 8, 2021
c41ad07
compare list styling update & condensed styling testing
SidelineCory24 Apr 9, 2021
9194e4f
results card styling
SidelineCory24 Apr 12, 2021
f054814
styling update to show abbreviated name
SidelineCory24 Apr 12, 2021
0a18b28
condensed card styling
SidelineCory24 Apr 12, 2021
95b8a7d
snapshot updates
SidelineCory24 Apr 12, 2021
11180c6
Merge branch 'dev' into update/snd-cn-htf-flags
SidelineCory24 Apr 12, 2021
ceec764
updated condensed card styling for edge cases
SidelineCory24 Apr 13, 2021
a17db09
PR feedback updates
SidelineCory24 Apr 14, 2021
75b9218
PR feedback for box shadow on bureau results card
SidelineCory24 Apr 14, 2021
3edd240
removing trailing semicolon
SidelineCory24 Apr 14, 2021
a3aeded
Merge branch 'dev' into update/snd-cn-htf-flags
SidelineCory24 Apr 14, 2021
131518b
more PR feedback updates
SidelineCory24 Apr 14, 2021
be97041
PR feedback update due to styling changes
SidelineCory24 Apr 15, 2021
55b420c
snapshot update
SidelineCory24 Apr 15, 2021
5aeee06
PR feedback styling update for inbidlist/featured results card
SidelineCory24 Apr 15, 2021
fffee43
Merge branch 'dev' into update/snd-cn-htf-flags
SidelineCory24 Apr 16, 2021
fb81a6d
styling fix for bureau results card
SidelineCory24 Apr 16, 2021
415da5e
Merge branch 'dev' into update/snd-cn-htf-flags
SidelineCory24 Apr 16, 2021
64fc975
bringing shadow back
SidelineCory24 Apr 16, 2021
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
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import { getResult, getBidStatsToUse, getDifferentials, renderBidCountMobile } f
import LanguageList from 'Components/LanguageList';
import { Handshake, CriticalNeed, HardToFill, ServiceNeedDifferential } from 'Components/Ribbon';
import { getPostName, getBidStatisticsObject, propOrDefault, shortenString } from 'utilities';
import StaticDevContent from 'Components/StaticDevContent';
import {
NO_BUREAU, NO_GRADE, NO_POSITION_NUMBER,
NO_POST, NO_SKILL, NO_TOUR_OF_DUTY, NO_UPDATE_DATE, NO_DATE, NO_USER_LISTED,
Expand Down Expand Up @@ -88,8 +89,10 @@ class BureauResultsCard extends Component {
{
get(stats, 'has_handshake_offered', false) && <Handshake isWide cutSide="both" className="ribbon-results-card" />
}
{ // need to verify if this is in the payload
<CriticalNeed isWide cutSide="both" className="ribbon-results-card" />
{
<StaticDevContent>
SidelineCory24 marked this conversation as resolved.
Show resolved Hide resolved
<CriticalNeed isWide cutSide="both" className="ribbon-results-card" />
</StaticDevContent>
}
{
get(result, 'isDifficultToStaff', false) && <HardToFill isWide cutSide="both" className="ribbon-results-card" />
Expand Down
15 changes: 9 additions & 6 deletions src/Components/CompareList/CompareList.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import { BID_LIST, COMPARE_LIST } from 'Constants/PropTypes';
import COMPARE_LIMIT from 'Constants/Compare';
import { NO_POST, NO_TOUR_OF_DUTY, NO_BUREAU, NO_SKILL, NO_DATE, NO_GRADE } from 'Constants/SystemMessages';
import { propOrDefault, formatDate, getPostName, getAccessiblePositionNumber } from 'utilities';
import StaticDevContent from 'Components/StaticDevContent';
import BackButton from '../BackButton';
import Spinner from '../Spinner';
import LanguageList from '../LanguageList/LanguageList';
Expand Down Expand Up @@ -317,12 +318,14 @@ class CompareList extends Component {
showText={matches}
/>
}
{ // need to verify if this is in the payload
<CriticalNeed
shortName
isWide={matches}
showText={matches}
/>
{
<StaticDevContent>
<CriticalNeed
shortName
isWide={matches}
showText={matches}
/>
</StaticDevContent>
}
{
get(c, 'isDifficultToStaff', false) &&
Expand Down
6 changes: 4 additions & 2 deletions src/Components/PositionDetailsItem/PositionDetailsItem.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { get } from 'lodash';
import Differentials from 'Components/Differentials';
import BidCount from 'Components/BidCount';
import PositionSkillCodeList from 'Components/PositionSkillCodeList';
import StaticDevContent from 'Components/StaticDevContent';
import { COMMON_PROPERTIES } from '../../Constants/EndpointParams';
import LanguageList from '../../Components/LanguageList/LanguageList';
import CondensedCardDataPoint from '../CondensedCardData/CondensedCardDataPoint';
Expand Down Expand Up @@ -39,8 +40,9 @@ export const renderHandshake = stats => (
);

export const renderCriticalNeed = () => (
// need to verify if this is in the payload
<CriticalNeed cutSide="both" className="ribbon-position-details" />
<StaticDevContent>
<CriticalNeed cutSide="both" className="ribbon-position-details" />
</StaticDevContent>
);

export const renderHardToFill = details => (
Expand Down
9 changes: 6 additions & 3 deletions src/Components/ResultsCard/ResultsCard.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { get, isNull, isNumber } from 'lodash';
import { Flag } from 'flag';
import Differentials from 'Components/Differentials';
import PositionSkillCodeList from 'Components/PositionSkillCodeList';
import StaticDevContent from 'Components/StaticDevContent';
import { COMMON_PROPERTIES } from '../../Constants/EndpointParams';
import { Row, Column } from '../Layout';
import DefinitionList from '../DefinitionList';
Expand Down Expand Up @@ -300,12 +301,14 @@ class ResultsCard extends Component {
</Column>
}
<Column columns="2">
<div className="ribbon-container-results">
<div className="ribbon-container">
{
get(stats, 'has_handshake_offered', false) && <Handshake className="ribbon-results-card" />
}
{ // need to verify if this is in the payload
<CriticalNeed className="ribbon-results-card" />
{
<StaticDevContent>
<CriticalNeed className="ribbon-results-card" />
</StaticDevContent>
}
{
get(result, 'isDifficultToStaff', false) && <HardToFill className="ribbon-results-card" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import PropTypes from 'prop-types';
import { get } from 'lodash';
import { Link } from 'react-router-dom';
import StaticDevContent from 'Components/StaticDevContent';
import { Featured, Handshake, CriticalNeed, HardToFill, ServiceNeedDifferential } from '../Ribbon';
import { POSITION_DETAILS, HOME_PAGE_CARD_TYPE } from '../../Constants/PropTypes';
import { NO_POST } from '../../Constants/SystemMessages';
Expand All @@ -27,7 +28,6 @@ const ResultsCondensedCardTop = ({
const p = position.position || position;
const stats = getBidStatisticsObject(position.bid_statistics);
const hasHandshake = get(stats, 'has_handshake_offered', false);
// const isCriticalNeed = ???
const isDifficultToStaff = get(position, 'isDifficultToStaff', false);
const isServiceNeedDifferential = get(position, 'isServiceNeedDifferential', false);

Expand Down Expand Up @@ -67,8 +67,10 @@ const ResultsCondensedCardTop = ({
{
hasHandshake && <Handshake showText={false} className="ribbon-condensed-card" />
}
{ // need to verify if this is in the payload
<CriticalNeed showText={false} className="ribbon-condensed-card" />
{
<StaticDevContent>
<CriticalNeed showText={false} className="ribbon-condensed-card" />
</StaticDevContent>
}
{
isDifficultToStaff && <HardToFill showText={false} className="ribbon-condensed-card" />
Expand All @@ -77,7 +79,7 @@ const ResultsCondensedCardTop = ({
isServiceNeedDifferential && <ServiceNeedDifferential showText={false} className="ribbon-condensed-card" />
}
{
get(position, 'position.is_highlighted') && <Featured className="ribbon-results-card" />
get(position, 'position.is_highlighted') && <Featured showText={false} className="ribbon-condensed-card" />
}
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,22 +1,18 @@
import PropTypes from 'prop-types';
import Ribbon from '../Ribbon';

const ServiceNeedDifferential = ({ condensed, compare, shortName, ...props }) => {
const ServiceNeedDifferential = ({ shortName, ...props }) => {
const text = shortName ? 'SND' : 'Service need differential';
return (
<Ribbon icon="line-chart" text={text} type="snd" {...props} />
);
};

ServiceNeedDifferential.propTypes = {
condensed: PropTypes.bool,
compare: PropTypes.bool,
shortName: PropTypes.bool,
};

ServiceNeedDifferential.defaultProps = {
condensed: false,
compare: false,
shortName: false,
};

Expand Down
2 changes: 1 addition & 1 deletion src/sass/_condensedCard.scss
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ $condensed-card-data-padding: 15px 20px 9px;
font-size: 16px;
line-height: 19px;
margin-bottom: $condensed-card-margin-bottom;
width: 360px;
width: 371px;

.bid-count-container {
display: flex;
Expand Down
9 changes: 2 additions & 7 deletions src/sass/_ribbon.scss
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,15 @@ $ribbon-shadow-color: rgba(112, 112, 112, .5);
}

.ribbon-cn {
background-color: $cn-flag;
background-color: $ribbon-cn;

.fa {
margin-right: .5em;
}
}

.ribbon-htf {
background-color: $htf-flag;
background-color: $ribbon-htf;

.fa {
margin-right: .4em;
Expand Down Expand Up @@ -92,11 +92,6 @@ $ribbon-shadow-color: rgba(112, 112, 112, .5);
.ribbon-container {
position: absolute;
right: -1px;
}

.ribbon-container-results {
position: absolute;
right: -1px;
top: calc(100% - 220px);
width: 170px;

Expand Down
6 changes: 4 additions & 2 deletions src/sass/_variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,10 @@ $tm-gray: #AAAAAA;
$tm-navy: #215493;
$tm-navy-dark: $blue-primary-darkest;

$cn-flag: #EDA176 ;
$htf-flag: #89C1F2;
//**
//* Ribbon Colors
$ribbon-cn: #EDA176 ;
$ribbon-htf: #89C1F2;
SidelineCory24 marked this conversation as resolved.
Show resolved Hide resolved

//**
//* DOS Colors
Expand Down