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

Display assignee on PV cards and details #1815

Merged
merged 3 commits into from
Oct 25, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 2 additions & 0 deletions src/Components/PositionDetailsItem/PositionDetailsItem.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ const PositionDetailsItem = (props) => {
const differentials = <Differentials {...diffProps} />;

const incumbent = get(position, 'current_assignment.user') || NO_USER_LISTED;
const assignee = get(position, 'assignee') || NO_USER_LISTED;
const cycle = get(position, 'latest_bidcycle.name', 'None Listed');

const getPostedDate = () => {
Expand Down Expand Up @@ -152,6 +153,7 @@ const PositionDetailsItem = (props) => {
<CondensedCardDataPoint title={isProjectedVacancy ? 'Bid Season' : 'Bid Cycle'} content={cycle} />
<CondensedCardDataPoint title="TED" content={formattedTourEndDate} />
<CondensedCardDataPoint title="Incumbent" content={incumbent} />
{ isProjectedVacancy && <CondensedCardDataPoint title="Assignee" content={assignee} /> }
{ !isProjectedVacancy && <CondensedCardDataPoint title="Posted" content={postedDate} />}
</div>
</div>
Expand Down
8 changes: 7 additions & 1 deletion src/Components/ResultsCard/ResultsCard.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,13 @@ class ResultsCard extends Component {
/* eslint-enable quote-props */
];

if (isProjectedVacancy) { delete sections[2].Posted; }
if (isProjectedVacancy) {
delete sections[2].Posted;
sections[1] = {
...sections[1],
Assignee: getResult(pos, 'assignee', NO_USER_LISTED),
};
}

options.favorite = {
compareArray: [],
Expand Down