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

Fallback for homepage positions to use additional skill codes #1126

Merged
merged 6 commits into from
Sep 29, 2020

Conversation

mjoyce91
Copy link

Use with MetaPhase-Consulting/State-TalentMAP-API#417

Uses skill codes that fall in the skill cones of the user's skill codes as additional search criteria for homepage position fallbacks.

@@ -633,4 +635,3 @@ export const HOME_PAGE_RECOMMENDED_POSITIONS = PropTypes.shape({
positions: PropTypes.arrayOf(POSITION_DETAILS),
name: PropTypes.string,
});

Choose a reason for hiding this comment

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

😢

FEATURED_GRADE_POSITIONS,
FEATURED_POSITIONS } from '../Constants/PropTypes';

const specialNeedsParams = SPECIAL_NEEDS.join(',');

// Export our queries so that we can consistently test them.
export const GET_RECOMMENDED_GRADE_AND_SKILL_CODE_POSITIONS_QUERY = (skillCodes, grade) => `/fsbid/available_positions/?position__skill__code__in=${skillCodes}&position__grade__code__in=${grade}&limit=3`;
export const GET_RECOMMENDED_GRADE_AND_SKILL_CONE_POSITIONS_QUERY = (skillCodes, grade) => `/fsbid/available_positions/?position__skill__code__in=${skillCodes}&position__grade__code__in=${grade}&limit=3`;

Choose a reason for hiding this comment

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

I know technically this doesn't matter, but would it be better for readability to change these, and the ones on line 24&25, from skillCodes to skillCones?

Copy link
Author

Choose a reason for hiding this comment

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

The naming was tricky because we're still technically sending in skillCodes, even though we're referring to it as skillCones. I think I'll leave it as is because of that.

Choose a reason for hiding this comment

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

oh yeaa! Thank makes sense

@@ -93,11 +102,13 @@ export function homePageFeaturedPositionsFetchData(skills = [], grade) {
.then((results) => {
let shouldSkip = false;
// if our query returned no results, we will want to fall to the next arrangement
if (isEmpty(results.data) && queryType.name !== 'featuredPositions') {
if (isEmpty(results.data) && queryType.name !== FEATURED_POSITIONS) {

Choose a reason for hiding this comment

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

👍 noice

Copy link

@elizabeth-jimenez elizabeth-jimenez left a comment

Choose a reason for hiding this comment

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

🍬 🍭 🍰 🥮 👍 it's beautiful!

@mjoyce91 mjoyce91 merged commit 9701791 into dev Sep 29, 2020
@mjoyce91 mjoyce91 deleted the feature/additional-skills branch September 29, 2020 18:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants