From e4ab935c0e7dc12ff1dc8ba6fdd89a58c8e15a92 Mon Sep 17 00:00:00 2001 From: Mike Joyce Date: Thu, 16 May 2019 11:42:34 -0400 Subject: [PATCH] sprint-10 -> staging (#201) * fix: use correct button design * fix: use lodash get so that non-existent nested property doesn't throw error (#45) * Use lodash get so that non-existent nested property doesn't throw error * Check for details.id so that components don't render with an empty object * Align bid count with data points in ResultsCondensedCard * Show "Available" filter to all users, not just CDOs (#46) * Update dashboard styles and content based on QA * Fix style for bid list container * Move Bid Count in-line with data points on ResultsCard * View More -> View more * Add disabled state for BidListButton based on proposed API updates * Use real properties from API PR, combine strings * Use white for button text color * feature: add remove bid to the bid tracker for draft and submitted bids * add additional status to the canDeleteBid function * Add react-toastify and use with bid list additions/removals (#51) * Add react-toastify and use with bid list additions/removals * More tests for toast-related functionality * Check if bid can be deleted and apply disabled status accordingly; update and optimize utility function * feature: use the can_delete property from the bid rather than calculate client side * Add loading spinner to Bid List button (#52) * Compress us-flag.jpg (#53) * Use react-linkify to automatically hyperlink URLs and email addresses in position capsule descriptions * Authorization -> Authentication (#54) * Authorization -> Authentication * Rename import * Update pagination and page size defaults in alignment with designs * Display link, if available, in the glossary * Add ability to edit links from Glossary editor; update styling for glossary links * Reduce code complexity, fix long link styles * Update snapshot * Add bundlesize (#69) * Add bundlsize and command * Refine glob * Refine maxSize target * Chore/linter (#67) * chore: fix linter is scss file * fix: linter issue * End of basic auth (#63) * Delete login form * Update actions * Clean up sagas * Remove isSAML checks * Refactor sagas, CodeClimate fixes * CodeClimate linting * Upate login screen * Simplify index * Change to force external login * get new custom auth working * remove rest of the basic auth refs from server * use env vars for env specific paths * Bidder role - TM-371 (#68) * Create permissions wrapper and conditionally render content based on bidder role * remove default fallback prop * Fix/mock auth (#70) * fix: override some routes for the webpack dev server so auth works for local development * fix: fix the conf so we can use the login.html when running the server in prod mode * Default to true if can_delete property is not found * Update snapshots * fix: remove the auth redirect loop and clean up reamining references to the LOGIN_MODE * TM-410 - display favorites list as 4 across above the large break point (#66) * fix: display favorites list as 4 across above the large break point * fix: display favorites list as 4 across above the large break point * fix: remove the auth redirect loop (#73) * fix: remove the auth redirect loop and clean up reamining references to the LOGIN_MODE * no conditional about url * dev -> staging (#56) (#75) * chore: remove unnecessary css file from the build output * chore: update docs regarding apache compression config * Update bid list due date to match site-wide format * Use position id instead of position_number to query for position details * chore: remove unused props from components * chore: fix err due to incorrect favicon size in manifest * chore: remove unused props from the Home container * chore: remove unused props from the HomePagePositionsContainer component * fix: update profile page based on qa * Update styles and content in Position Details page based on QA feedback * fix: add logo to saved search title * fix: search page updates from qa * chore: linter fix * chore: fix linter issue * fix: search page updates from qa * chore: linter fix * Remove feedback button site-wide * Use object in state instead of array * Minor edits to Homepage based on QA * fix: make the pagination link clickable area larger * fix: use the correct button style * fix: better accessibility for active pagination tab selection * fix: use correct button design * fix: use lodash get so that non-existent nested property doesn't throw error (#45) * Use lodash get so that non-existent nested property doesn't throw error * Check for details.id so that components don't render with an empty object * Align bid count with data points in ResultsCondensedCard * Show "Available" filter to all users, not just CDOs (#46) * Update dashboard styles and content based on QA * Fix style for bid list container * Move Bid Count in-line with data points on ResultsCard * View More -> View more * Add disabled state for BidListButton based on proposed API updates * Use real properties from API PR, combine strings * Use white for button text color * feature: add remove bid to the bid tracker for draft and submitted bids * add additional status to the canDeleteBid function * Add react-toastify and use with bid list additions/removals (#51) * Add react-toastify and use with bid list additions/removals * More tests for toast-related functionality * Check if bid can be deleted and apply disabled status accordingly; update and optimize utility function * feature: use the can_delete property from the bid rather than calculate client side * Add loading spinner to Bid List button (#52) * Compress us-flag.jpg (#53) * Remove use of skill cone/code to skill (#76) * Add Public Profile page - links from CDO portfolio, profile/public/:id route, add Assignments section to public profile, re-use of Profile Dashboard (#71) ## Relies on https://github.com/MetaPhase-Consulting/State-TalentMAP-API/pull/24 * Sort bid cycles alphabetically by name (#78) * feature: download search results in csv format. Resolves TM-439 * chore: use default variable for sort * chore: reformat the date before file creation * Simplified search bar v2 (#81) * Make use of the existing simple search bar throughout site * Offsets for homepage * Redesign compare page (#82) * Redesign compare page * Remove old table styles; handle zero comparisons with route to catch it * feature: move the download button and use the secondary style. resolves TM-511 * fix: set a width on the cards for the favorite positions profile screen (#80) * fix: set a width on the cards for the favorite positions profile screen. resolves TM-410 * fix: no responsiveness for bid count and favorite buttons on position card displays * feature: fixed width for all position cards (homepage, favorites, similar positions). Resolves TM-510 * fix: remove unnecessary class and fix padding on grid for correct wrapping * chore: fixing the wrapping for the larger width * Fix search styles from breaking on the bidder portfolio * Reverting the changes to the glossary card due to the new term dialog breaking * Add link-container class back in * Update snapshots * Trigger circleci build * Code smells (#86) * Update CodeClimate exclusions for local dev * Reduce complexity * Comparison drawer component, add event listeners where needed, remove old comparison UI from results page * Track old compare choices to maintain sorting during an update * Add test coverage, use cancel tokens * Change dropdown menu link name from "Profile" to "Dashboard" * Remove How to Bid section from position details (#89) * Homepage QA (#90) * Remove Inbox icon * Fetch notifications from any screen, since we no longer use a /login route * Remove the BetaHeader * Conditional rendering of Bid Count on Bid Tracker cards, update Results cards data order and style * Break out compare elements into their own rows, add Bid List button to comparisons, use Set() for bidListToggleIsLoading * Remove eslint-disable * feature: include org info for domestic positions (#92) * Remove bidListToggleIsLoading since that is handled in BidListButton container * Display the service needs filter as a pill on the results page (#95) * Add error handling for position details screen (#93) * Add error handling for position details screen * Update call to action * Update based on design feedback * feature: add bid list button to the favorites cards. TM-512 * dev -> staging * Make icons consistent throughout profile pages (#102) * Service Needs -> Featured (#100) * Add hover to dropdown (#103) * Update empty saved search list text (#101) * Add custom filter for including null language positions (#104) * Remove Status component throughout app (#105) * fix: change label. TM-632 (#107) * Adjust elements to grow * fix: allow export on edge to run * Styles, add post to top * Update ordering for data points on Compare page (#110) * Remove post, add grade to bottom section * Updates to Bid Tracker (#115) * Add opacity to on-hold bids * "priority" -> "pending" * Prop to hide the delete button for standby bids * Track favoriting loading state of individual IDs (#108) * Track favoriting loading state of individual IDs * Fix proptypes * Handshake ribbon (#113) * Re-usable Ribbon component, use Ribbon component to display if handshake has been offered on position * Display handshake in condensed card, tests and snapshots * Test coverage (#117) * Test coverage for AccountDropdown, CompareDrawer, Compare * Add tests for SetType * Add toast notifications for favoriting actions (#114) * Create BoxShadow component and use with various cards (#106) * dev -> staging (#98) (#119) * chore: remove unnecessary css file from the build output * chore: update docs regarding apache compression config * Update bid list due date to match site-wide format * Use position id instead of position_number to query for position details * chore: remove unused props from components * chore: fix err due to incorrect favicon size in manifest * chore: remove unused props from the Home container * chore: remove unused props from the HomePagePositionsContainer component * fix: update profile page based on qa * Update styles and content in Position Details page based on QA feedback * fix: add logo to saved search title * fix: search page updates from qa * chore: linter fix * chore: fix linter issue * fix: search page updates from qa * chore: linter fix * Remove feedback button site-wide * Use object in state instead of array * Minor edits to Homepage based on QA * fix: make the pagination link clickable area larger * fix: use the correct button style * fix: better accessibility for active pagination tab selection * fix: use correct button design * fix: use lodash get so that non-existent nested property doesn't throw error (#45) * Use lodash get so that non-existent nested property doesn't throw error * Check for details.id so that components don't render with an empty object * Align bid count with data points in ResultsCondensedCard * Show "Available" filter to all users, not just CDOs (#46) * Update dashboard styles and content based on QA * Fix style for bid list container * Move Bid Count in-line with data points on ResultsCard * View More -> View more * Add disabled state for BidListButton based on proposed API updates * Use real properties from API PR, combine strings * Use white for button text color * feature: add remove bid to the bid tracker for draft and submitted bids * add additional status to the canDeleteBid function * Add react-toastify and use with bid list additions/removals (#51) * Add react-toastify and use with bid list additions/removals * More tests for toast-related functionality * Check if bid can be deleted and apply disabled status accordingly; update and optimize utility function * feature: use the can_delete property from the bid rather than calculate client side * Add loading spinner to Bid List button (#52) * Compress us-flag.jpg (#53) * Use react-linkify to automatically hyperlink URLs and email addresses in position capsule descriptions * Authorization -> Authentication (#54) * Authorization -> Authentication * Rename import * Update pagination and page size defaults in alignment with designs * Display link, if available, in the glossary * Add ability to edit links from Glossary editor; update styling for glossary links * Reduce code complexity, fix long link styles * Update snapshot * Add bundlesize (#69) * Add bundlsize and command * Refine glob * Refine maxSize target * Chore/linter (#67) * chore: fix linter is scss file * fix: linter issue * End of basic auth (#63) * Delete login form * Update actions * Clean up sagas * Remove isSAML checks * Refactor sagas, CodeClimate fixes * CodeClimate linting * Upate login screen * Simplify index * Change to force external login * get new custom auth working * remove rest of the basic auth refs from server * use env vars for env specific paths * Bidder role - TM-371 (#68) * Create permissions wrapper and conditionally render content based on bidder role * remove default fallback prop * Fix/mock auth (#70) * fix: override some routes for the webpack dev server so auth works for local development * fix: fix the conf so we can use the login.html when running the server in prod mode * Default to true if can_delete property is not found * Update snapshots * fix: remove the auth redirect loop and clean up reamining references to the LOGIN_MODE * TM-410 - display favorites list as 4 across above the large break point (#66) * fix: display favorites list as 4 across above the large break point * fix: display favorites list as 4 across above the large break point * fix: remove the auth redirect loop (#73) * fix: remove the auth redirect loop and clean up reamining references to the LOGIN_MODE * no conditional about url * dev -> staging (#56) (#75) * chore: remove unnecessary css file from the build output * chore: update docs regarding apache compression config * Update bid list due date to match site-wide format * Use position id instead of position_number to query for position details * chore: remove unused props from components * chore: fix err due to incorrect favicon size in manifest * chore: remove unused props from the Home container * chore: remove unused props from the HomePagePositionsContainer component * fix: update profile page based on qa * Update styles and content in Position Details page based on QA feedback * fix: add logo to saved search title * fix: search page updates from qa * chore: linter fix * chore: fix linter issue * fix: search page updates from qa * chore: linter fix * Remove feedback button site-wide * Use object in state instead of array * Minor edits to Homepage based on QA * fix: make the pagination link clickable area larger * fix: use the correct button style * fix: better accessibility for active pagination tab selection * fix: use correct button design * fix: use lodash get so that non-existent nested property doesn't throw error (#45) * Use lodash get so that non-existent nested property doesn't throw error * Check for details.id so that components don't render with an empty object * Align bid count with data points in ResultsCondensedCard * Show "Available" filter to all users, not just CDOs (#46) * Update dashboard styles and content based on QA * Fix style for bid list container * Move Bid Count in-line with data points on ResultsCard * View More -> View more * Add disabled state for BidListButton based on proposed API updates * Use real properties from API PR, combine strings * Use white for button text color * feature: add remove bid to the bid tracker for draft and submitted bids * add additional status to the canDeleteBid function * Add react-toastify and use with bid list additions/removals (#51) * Add react-toastify and use with bid list additions/removals * More tests for toast-related functionality * Check if bid can be deleted and apply disabled status accordingly; update and optimize utility function * feature: use the can_delete property from the bid rather than calculate client side * Add loading spinner to Bid List button (#52) * Compress us-flag.jpg (#53) * Remove use of skill cone/code to skill (#76) * Add Public Profile page - links from CDO portfolio, profile/public/:id route, add Assignments section to public profile, re-use of Profile Dashboard (#71) ## Relies on https://github.com/MetaPhase-Consulting/State-TalentMAP-API/pull/24 * Sort bid cycles alphabetically by name (#78) * feature: download search results in csv format. Resolves TM-439 * chore: use default variable for sort * chore: reformat the date before file creation * Simplified search bar v2 (#81) * Make use of the existing simple search bar throughout site * Offsets for homepage * Redesign compare page (#82) * Redesign compare page * Remove old table styles; handle zero comparisons with route to catch it * feature: move the download button and use the secondary style. resolves TM-511 * fix: set a width on the cards for the favorite positions profile screen (#80) * fix: set a width on the cards for the favorite positions profile screen. resolves TM-410 * fix: no responsiveness for bid count and favorite buttons on position card displays * feature: fixed width for all position cards (homepage, favorites, similar positions). Resolves TM-510 * fix: remove unnecessary class and fix padding on grid for correct wrapping * chore: fixing the wrapping for the larger width * Fix search styles from breaking on the bidder portfolio * Reverting the changes to the glossary card due to the new term dialog breaking * Add link-container class back in * Update snapshots * Trigger circleci build * Code smells (#86) * Update CodeClimate exclusions for local dev * Reduce complexity * Comparison drawer component, add event listeners where needed, remove old comparison UI from results page * Track old compare choices to maintain sorting during an update * Add test coverage, use cancel tokens * Change dropdown menu link name from "Profile" to "Dashboard" * Remove How to Bid section from position details (#89) * Homepage QA (#90) * Remove Inbox icon * Fetch notifications from any screen, since we no longer use a /login route * Remove the BetaHeader * Conditional rendering of Bid Count on Bid Tracker cards, update Results cards data order and style * Break out compare elements into their own rows, add Bid List button to comparisons, use Set() for bidListToggleIsLoading * Remove eslint-disable * feature: include org info for domestic positions (#92) * Remove bidListToggleIsLoading since that is handled in BidListButton container * Display the service needs filter as a pill on the results page (#95) * Add error handling for position details screen (#93) * Add error handling for position details screen * Update call to action * Update based on design feedback * dev -> staging * Make icons consistent throughout profile pages (#102) * Service Needs -> Featured (#100) * Add hover to dropdown (#103) * Sprint 6 merge conflicts (#120) * dev -> staging (#98) * chore: remove unnecessary css file from the build output * chore: update docs regarding apache compression config * Update bid list due date to match site-wide format * Use position id instead of position_number to query for position details * chore: remove unused props from components * chore: fix err due to incorrect favicon size in manifest * chore: remove unused props from the Home container * chore: remove unused props from the HomePagePositionsContainer component * fix: update profile page based on qa * Update styles and content in Position Details page based on QA feedback * fix: add logo to saved search title * fix: search page updates from qa * chore: linter fix * chore: fix linter issue * fix: search page updates from qa * chore: linter fix * Remove feedback button site-wide * Use object in state instead of array * Minor edits to Homepage based on QA * fix: make the pagination link clickable area larger * fix: use the correct button style * fix: better accessibility for active pagination tab selection * fix: use correct button design * fix: use lodash get so that non-existent nested property doesn't throw error (#45) * Use lodash get so that non-existent nested property doesn't throw error * Check for details.id so that components don't render with an empty object * Align bid count with data points in ResultsCondensedCard * Show "Available" filter to all users, not just CDOs (#46) * Update dashboard styles and content based on QA * Fix style for bid list container * Move Bid Count in-line with data points on ResultsCard * View More -> View more * Add disabled state for BidListButton based on proposed API updates * Use real properties from API PR, combine strings * Use white for button text color * feature: add remove bid to the bid tracker for draft and submitted bids * add additional status to the canDeleteBid function * Add react-toastify and use with bid list additions/removals (#51) * Add react-toastify and use with bid list additions/removals * More tests for toast-related functionality * Check if bid can be deleted and apply disabled status accordingly; update and optimize utility function * feature: use the can_delete property from the bid rather than calculate client side * Add loading spinner to Bid List button (#52) * Compress us-flag.jpg (#53) * Use react-linkify to automatically hyperlink URLs and email addresses in position capsule descriptions * Authorization -> Authentication (#54) * Authorization -> Authentication * Rename import * Update pagination and page size defaults in alignment with designs * Display link, if available, in the glossary * Add ability to edit links from Glossary editor; update styling for glossary links * Reduce code complexity, fix long link styles * Update snapshot * Add bundlesize (#69) * Add bundlsize and command * Refine glob * Refine maxSize target * Chore/linter (#67) * chore: fix linter is scss file * fix: linter issue * End of basic auth (#63) * Delete login form * Update actions * Clean up sagas * Remove isSAML checks * Refactor sagas, CodeClimate fixes * CodeClimate linting * Upate login screen * Simplify index * Change to force external login * get new custom auth working * remove rest of the basic auth refs from server * use env vars for env specific paths * Bidder role - TM-371 (#68) * Create permissions wrapper and conditionally render content based on bidder role * remove default fallback prop * Fix/mock auth (#70) * fix: override some routes for the webpack dev server so auth works for local development * fix: fix the conf so we can use the login.html when running the server in prod mode * Default to true if can_delete property is not found * Update snapshots * fix: remove the auth redirect loop and clean up reamining references to the LOGIN_MODE * TM-410 - display favorites list as 4 across above the large break point (#66) * fix: display favorites list as 4 across above the large break point * fix: display favorites list as 4 across above the large break point * fix: remove the auth redirect loop (#73) * fix: remove the auth redirect loop and clean up reamining references to the LOGIN_MODE * no conditional about url * dev -> staging (#56) (#75) * chore: remove unnecessary css file from the build output * chore: update docs regarding apache compression config * Update bid list due date to match site-wide format * Use position id instead of position_number to query for position details * chore: remove unused props from components * chore: fix err due to incorrect favicon size in manifest * chore: remove unused props from the Home container * chore: remove unused props from the HomePagePositionsContainer component * fix: update profile page based on qa * Update styles and content in Position Details page based on QA feedback * fix: add logo to saved search title * fix: search page updates from qa * chore: linter fix * chore: fix linter issue * fix: search page updates from qa * chore: linter fix * Remove feedback button site-wide * Use object in state instead of array * Minor edits to Homepage based on QA * fix: make the pagination link clickable area larger * fix: use the correct button style * fix: better accessibility for active pagination tab selection * fix: use correct button design * fix: use lodash get so that non-existent nested property doesn't throw error (#45) * Use lodash get so that non-existent nested property doesn't throw error * Check for details.id so that components don't render with an empty object * Align bid count with data points in ResultsCondensedCard * Show "Available" filter to all users, not just CDOs (#46) * Update dashboard styles and content based on QA * Fix style for bid list container * Move Bid Count in-line with data points on ResultsCard * View More -> View more * Add disabled state for BidListButton based on proposed API updates * Use real properties from API PR, combine strings * Use white for button text color * feature: add remove bid to the bid tracker for draft and submitted bids * add additional status to the canDeleteBid function * Add react-toastify and use with bid list additions/removals (#51) * Add react-toastify and use with bid list additions/removals * More tests for toast-related functionality * Check if bid can be deleted and apply disabled status accordingly; update and optimize utility function * feature: use the can_delete property from the bid rather than calculate client side * Add loading spinner to Bid List button (#52) * Compress us-flag.jpg (#53) * Remove use of skill cone/code to skill (#76) * Add Public Profile page - links from CDO portfolio, profile/public/:id route, add Assignments section to public profile, re-use of Profile Dashboard (#71) ## Relies on https://github.com/MetaPhase-Consulting/State-TalentMAP-API/pull/24 * Sort bid cycles alphabetically by name (#78) * feature: download search results in csv format. Resolves TM-439 * chore: use default variable for sort * chore: reformat the date before file creation * Simplified search bar v2 (#81) * Make use of the existing simple search bar throughout site * Offsets for homepage * Redesign compare page (#82) * Redesign compare page * Remove old table styles; handle zero comparisons with route to catch it * feature: move the download button and use the secondary style. resolves TM-511 * fix: set a width on the cards for the favorite positions profile screen (#80) * fix: set a width on the cards for the favorite positions profile screen. resolves TM-410 * fix: no responsiveness for bid count and favorite buttons on position card displays * feature: fixed width for all position cards (homepage, favorites, similar positions). Resolves TM-510 * fix: remove unnecessary class and fix padding on grid for correct wrapping * chore: fixing the wrapping for the larger width * Fix search styles from breaking on the bidder portfolio * Reverting the changes to the glossary card due to the new term dialog breaking * Add link-container class back in * Update snapshots * Trigger circleci build * Code smells (#86) * Update CodeClimate exclusions for local dev * Reduce complexity * Comparison drawer component, add event listeners where needed, remove old comparison UI from results page * Track old compare choices to maintain sorting during an update * Add test coverage, use cancel tokens * Change dropdown menu link name from "Profile" to "Dashboard" * Remove How to Bid section from position details (#89) * Homepage QA (#90) * Remove Inbox icon * Fetch notifications from any screen, since we no longer use a /login route * Remove the BetaHeader * Conditional rendering of Bid Count on Bid Tracker cards, update Results cards data order and style * Break out compare elements into their own rows, add Bid List button to comparisons, use Set() for bidListToggleIsLoading * Remove eslint-disable * feature: include org info for domestic positions (#92) * Remove bidListToggleIsLoading since that is handled in BidListButton container * Display the service needs filter as a pill on the results page (#95) * Add error handling for position details screen (#93) * Add error handling for position details screen * Update call to action * Update based on design feedback * dev -> staging * Make icons consistent throughout profile pages (#102) * Service Needs -> Featured (#100) * Add hover to dropdown (#103) * Remove duplicates * Add toggle component, use static toggle filter in search results (#121) * Add condensed card layouts for projected vacancy and recently available (#122) * dev -> staging (#98) (#127) * chore: remove unnecessary css file from the build output * chore: update docs regarding apache compression config * Update bid list due date to match site-wide format * Use position id instead of position_number to query for position details * chore: remove unused props from components * chore: fix err due to incorrect favicon size in manifest * chore: remove unused props from the Home container * chore: remove unused props from the HomePagePositionsContainer component * fix: update profile page based on qa * Update styles and content in Position Details page based on QA feedback * fix: add logo to saved search title * fix: search page updates from qa * chore: linter fix * chore: fix linter issue * fix: search page updates from qa * chore: linter fix * Remove feedback button site-wide * Use object in state instead of array * Minor edits to Homepage based on QA * fix: make the pagination link clickable area larger * fix: use the correct button style * fix: better accessibility for active pagination tab selection * fix: use correct button design * fix: use lodash get so that non-existent nested property doesn't throw error (#45) * Use lodash get so that non-existent nested property doesn't throw error * Check for details.id so that components don't render with an empty object * Align bid count with data points in ResultsCondensedCard * Show "Available" filter to all users, not just CDOs (#46) * Update dashboard styles and content based on QA * Fix style for bid list container * Move Bid Count in-line with data points on ResultsCard * View More -> View more * Add disabled state for BidListButton based on proposed API updates * Use real properties from API PR, combine strings * Use white for button text color * feature: add remove bid to the bid tracker for draft and submitted bids * add additional status to the canDeleteBid function * Add react-toastify and use with bid list additions/removals (#51) * Add react-toastify and use with bid list additions/removals * More tests for toast-related functionality * Check if bid can be deleted and apply disabled status accordingly; update and optimize utility function * feature: use the can_delete property from the bid rather than calculate client side * Add loading spinner to Bid List button (#52) * Compress us-flag.jpg (#53) * Use react-linkify to automatically hyperlink URLs and email addresses in position capsule descriptions * Authorization -> Authentication (#54) * Authorization -> Authentication * Rename import * Update pagination and page size defaults in alignment with designs * Display link, if available, in the glossary * Add ability to edit links from Glossary editor; update styling for glossary links * Reduce code complexity, fix long link styles * Update snapshot * Add bundlesize (#69) * Add bundlsize and command * Refine glob * Refine maxSize target * Chore/linter (#67) * chore: fix linter is scss file * fix: linter issue * End of basic auth (#63) * Delete login form * Update actions * Clean up sagas * Remove isSAML checks * Refactor sagas, CodeClimate fixes * CodeClimate linting * Upate login screen * Simplify index * Change to force external login * get new custom auth working * remove rest of the basic auth refs from server * use env vars for env specific paths * Bidder role - TM-371 (#68) * Create permissions wrapper and conditionally render content based on bidder role * remove default fallback prop * Fix/mock auth (#70) * fix: override some routes for the webpack dev server so auth works for local development * fix: fix the conf so we can use the login.html when running the server in prod mode * Default to true if can_delete property is not found * Update snapshots * fix: remove the auth redirect loop and clean up reamining references to the LOGIN_MODE * TM-410 - display favorites list as 4 across above the large break point (#66) * fix: display favorites list as 4 across above the large break point * fix: display favorites list as 4 across above the large break point * fix: remove the auth redirect loop (#73) * fix: remove the auth redirect loop and clean up reamining references to the LOGIN_MODE * no conditional about url * dev -> staging (#56) (#75) * chore: remove unnecessary css file from the build output * chore: update docs regarding apache compression config * Update bid list due date to match site-wide format * Use position id instead of position_number to query for position details * chore: remove unused props from components * chore: fix err due to incorrect favicon size in manifest * chore: remove unused props from the Home container * chore: remove unused props from the HomePagePositionsContainer component * fix: update profile page based on qa * Update styles and content in Position Details page based on QA feedback * fix: add logo to saved search title * fix: search page updates from qa * chore: linter fix * chore: fix linter issue * fix: search page updates from qa * chore: linter fix * Remove feedback button site-wide * Use object in state instead of array * Minor edits to Homepage based on QA * fix: make the pagination link clickable area larger * fix: use the correct button style * fix: better accessibility for active pagination tab selection * fix: use correct button design * fix: use lodash get so that non-existent nested property doesn't throw error (#45) * Use lodash get so that non-existent nested property doesn't throw error * Check for details.id so that components don't render with an empty object * Align bid count with data points in ResultsCondensedCard * Show "Available" filter to all users, not just CDOs (#46) * Update dashboard styles and content based on QA * Fix style for bid list container * Move Bid Count in-line with data points on ResultsCard * View More -> View more * Add disabled state for BidListButton based on proposed API updates * Use real properties from API PR, combine strings * Use white for button text color * feature: add remove bid to the bid tracker for draft and submitted bids * add additional status to the canDeleteBid function * Add react-toastify and use with bid list additions/removals (#51) * Add react-toastify and use with bid list additions/removals * More tests for toast-related functionality * Check if bid can be deleted and apply disabled status accordingly; update and optimize utility function * feature: use the can_delete property from the bid rather than calculate client side * Add loading spinner to Bid List button (#52) * Compress us-flag.jpg (#53) * Remove use of skill cone/code to skill (#76) * Add Public Profile page - links from CDO portfolio, profile/public/:id route, add Assignments section to public profile, re-use of Profile Dashboard (#71) ## Relies on https://github.com/MetaPhase-Consulting/State-TalentMAP-API/pull/24 * Sort bid cycles alphabetically by name (#78) * feature: download search results in csv format. Resolves TM-439 * chore: use default variable for sort * chore: reformat the date before file creation * Simplified search bar v2 (#81) * Make use of the existing simple search bar throughout site * Offsets for homepage * Redesign compare page (#82) * Redesign compare page * Remove old table styles; handle zero comparisons with route to catch it * feature: move the download button and use the secondary style. resolves TM-511 * fix: set a width on the cards for the favorite positions profile screen (#80) * fix: set a width on the cards for the favorite positions profile screen. resolves TM-410 * fix: no responsiveness for bid count and favorite buttons on position card displays * feature: fixed width for all position cards (homepage, favorites, similar positions). Resolves TM-510 * fix: remove unnecessary class and fix padding on grid for correct wrapping * chore: fixing the wrapping for the larger width * Fix search styles from breaking on the bidder portfolio * Reverting the changes to the glossary card due to the new term dialog breaking * Add link-container class back in * Update snapshots * Trigger circleci build * Code smells (#86) * Update CodeClimate exclusions for local dev * Reduce complexity * Comparison drawer component, add event listeners where needed, remove old comparison UI from results page * Track old compare choices to maintain sorting during an update * Add test coverage, use cancel tokens * Change dropdown menu link name from "Profile" to "Dashboard" * Remove How to Bid section from position details (#89) * Homepage QA (#90) * Remove Inbox icon * Fetch notifications from any screen, since we no longer use a /login route * Remove the BetaHeader * Conditional rendering of Bid Count on Bid Tracker cards, update Results cards data order and style * Break out compare elements into their own rows, add Bid List button to comparisons, use Set() for bidListToggleIsLoading * Remove eslint-disable * feature: include org info for domestic positions (#92) * Remove bidListToggleIsLoading since that is handled in BidListButton container * Display the service needs filter as a pill on the results page (#95) * Add error handling for position details screen (#93) * Add error handling for position details screen * Update call to action * Update based on design feedback * dev -> staging * Make icons consistent throughout profile pages (#102) * Service Needs -> Featured (#100) * Add hover to dropdown (#103) * Move "No Language" filter to top of list (#129) * Projected Vacancy - Saved Search + Results cards (#123) * Projected vacancy in Saved Searches * PV in results cards * Fix typo, increase font size * Increase filter container width, increase toggle font-size * Refactor section headers in profile, static UI for projected vacancy notifications for favorites and bid list (#126) * Pull css-box-shadow repo into app to force es6 to compile * Chore/autodeploy config (#132) * chore: update deploy config * chore: update deploy config * chore: update deploy config * chore: update deploy config * chore: update deploy config * chore: update deploy config * chore: use dev branch * fix: update deploy script * Compare from Favorites (#124) * Add condensed card layouts for projected vacancy and recently available * Add comparison buttons and comparison drawer to Favorites page * Condensed Bid Tracker (#128) * Alternate styles for condensed bid tracker, check for condensedView with Context API * Additional styles/conditional rendering, scroll to bid on Bid Tracker with route id, snapshots * Show Closed alert, style tweaks * Style tweak to hide overlay alert for prepanel state * Feature flags (#130) * Feature flag implementation * Feature flags for API * fix: check for and remove if present the backup dir (#136) * Remove jQuery and replace with XHR (#137) * Different text and colors for Approved bids (#139) * Hide Featured Positions section if positions length is zero (#138) * Hide Featured Positions section if positions length is zero * Update snapshot * Set config.json to preferred defaults in dev environment * Update index.html to reference API URL from config * Update deploy.sh to use alternate config * fix: include the bid count in the sections toggled by the bidding flag * Add the Beta banner back in * Use defaultSort prop instead of entire object; refresh state value on componentWillReceiveProps() (#148) * New card design for Bidder Portfolio (#140) * New card design for Bidder Portfolio, including badges (static for now) * Fallback for no grade * Update name format * Make disabled badge color accessible * Use aria-label to describe the meaning of the icon (#149) * New row design for Bidder Portfolio (#141) * New card design for Bidder Portfolio, including badges (static for now) * Fallback for no grade * New UI for Bidder Portfolio row view * Update name format * Add Export button to Bidder Portfolio (#142) * Add auto-complete dropdown to display CDO list in Bidder Portfolio (#150) * Increase test coverage (#151) * Remove ABOUT_URL (#152) * Update Jest (#153) * Update Jest * Update coverageReporters * Bidder Portfolio Edit View (#144) * New card design for Bidder Portfolio, including badges (static for now) * Fallback for no grade * New UI for Bidder Portfolio row view * Update name format * Add Export button to Bidder Portfolio * Add Edit view for Bidder Portfolio rows * UI For Bid Portfolio Edit View * Public Profile "Updates" and Edit UI (#147) * New card design for Bidder Portfolio, including badges (static for now) * Fallback for no grade * New UI for Bidder Portfolio row view * Update name format * Add Export button to Bidder Portfolio * Add Edit view for Bidder Portfolio rows * UI For Bid Portfolio Edit View * Add "Updates" section, static edit UI to Public Profile * Use react-picky to create a multi-select checkbox dropdown to use as a static UI Bid Cycle filter * Improved test coverage * Additional tests for SearchResultsExportLink and utilities * More test coverage (#156) * More test coverage * Add test coverage to ListItem * Add active filter (#158) * staging -> sprint-8 (#160) * Set min-width on compare drawer cards in IE11 (#161) * Redirect standard error, for when file does not exist in CI (#162) * Use common Export Button component for re-use (#163) * Handle for when current_assignment is null (#165) * "Service need" -> "Featured positions" sort name (#167) * dev -> staging (#166) (#168) * chore: remove unused props from the Home container * chore: remove unused props from the HomePagePositionsContainer component * fix: update profile page based on qa * Update styles and content in Position Details page based on QA feedback * fix: add logo to saved search title * fix: search page updates from qa * chore: linter fix * chore: fix linter issue * fix: search page updates from qa * chore: linter fix * Remove feedback button site-wide * Use object in state instead of array * Minor edits to Homepage based on QA * fix: make the pagination link clickable area larger * fix: use the correct button style * fix: better accessibility for active pagination tab selection * fix: use correct button design * fix: use lodash get so that non-existent nested property doesn't throw error (#45) * Use lodash get so that non-existent nested property doesn't throw error * Check for details.id so that components don't render with an empty object * Align bid count with data points in ResultsCondensedCard * Show "Available" filter to all users, not just CDOs (#46) * Update dashboard styles and content based on QA * Fix style for bid list container * Move Bid Count in-line with data points on ResultsCard * View More -> View more * Add disabled state for BidListButton based on proposed API updates * Use real properties from API PR, combine strings * Use white for button text color * feature: add remove bid to the bid tracker for draft and submitted bids * add additional status to the canDeleteBid function * Add react-toastify and use with bid list additions/removals (#51) * Add react-toastify and use with bid list additions/removals * More tests for toast-related functionality * Check if bid can be deleted and apply disabled status accordingly; update and optimize utility function * feature: use the can_delete property from the bid rather than calculate client side * Add loading spinner to Bid List button (#52) * Compress us-flag.jpg (#53) * Use react-linkify to automatically hyperlink URLs and email addresses in position capsule descriptions * Authorization -> Authentication (#54) * Authorization -> Authentication * Rename import * Update pagination and page size defaults in alignment with designs * Display link, if available, in the glossary * Add ability to edit links from Glossary editor; update styling for glossary links * Reduce code complexity, fix long link styles * Update snapshot * Add bundlesize (#69) * Add bundlsize and command * Refine glob * Refine maxSize target * Chore/linter (#67) * chore: fix linter is scss file * fix: linter issue * End of basic auth (#63) * Delete login form * Update actions * Clean up sagas * Remove isSAML checks * Refactor sagas, CodeClimate fixes * CodeClimate linting * Upate login screen * Simplify index * Change to force external login * get new custom auth working * remove rest of the basic auth refs from server * use env vars for env specific paths * Bidder role - TM-371 (#68) * Create permissions wrapper and conditionally render content based on bidder role * remove default fallback prop * Fix/mock auth (#70) * fix: override some routes for the webpack dev server so auth works for local development * fix: fix the conf so we can use the login.html when running the server in prod mode * Default to true if can_delete property is not found * Update snapshots * fix: remove the auth redirect loop and clean up reamining references to the LOGIN_MODE * TM-410 - display favorites list as 4 across above the large break point (#66) * fix: display favorites list as 4 across above the large break point * fix: display favorites list as 4 across above the large break point * fix: remove the auth redirect loop (#73) * fix: remove the auth redirect loop and clean up reamining references to the LOGIN_MODE * no conditional about url * dev -> staging (#56) (#75) * chore: remove unnecessary css file from the build output * chore: update docs regarding apache compression config * Update bid list due date to match site-wide format * Use position id instead of position_number to query for position details * chore: remove unused props from components * chore: fix err due to incorrect favicon size in manifest * chore: remove unused props from the Home container * chore: remove unused props from the HomePagePositionsContainer component * fix: update profile page based on qa * Update styles and content in Position Details page based on QA feedback * fix: add logo to saved search title * fix: search page updates from qa * chore: linter fix * chore: fix linter issue * fix: search page updates from qa * chore: linter fix * Remove feedback button site-wide * Use object in state instead of array * Minor edits to Homepage based on QA * fix: make the pagination link clickable area larger * fix: use the correct button style * fix: better accessibility for active pagination tab selection * fix: use correct button design * fix: use lodash get so that non-existent nested property doesn't throw error (#45) * Use lodash get so that non-existent nested property doesn't throw error * Check for details.id so that components don't render with an empty object * Align bid count with data points in ResultsCondensedCard * Show "Available" filter to all users, not just CDOs (#46) * Update dashboard styles and content based on QA * Fix style for bid list container * Move Bid Count in-line with data points on ResultsCard * View More -> View more * Add disabled state for BidListButton based on proposed API updates * Use real properties from API PR, combine strings * Use white for button text color * feature: add remove bid to the bid tracker for draft and submitted bids * add additional status to the canDeleteBid function * Add react-toastify and use with bid list additions/removals (#51) * Add react-toastify and use with bid list additions/removals * More tests for toast-related functionality * Check if bid can be deleted and apply disabled status accordingly; update and optimize utility function * feature: use the can_delete property from the bid rather than calculate client side * Add loading spinner to Bid List button (#52) * Compress us-flag.jpg (#53) * Remove use of skill cone/code to skill (#76) * Add Public Profile page - links from CDO portfolio, profile/public/:id route, add Assignments section to public profile, re-use of Profile Dashboard (#71) ## Relies on https://github.com/MetaPhase-Consulting/State-TalentMAP-API/pull/24 * Sort bid cycles alphabetically by name (#78) * feature: download search results in csv format. Resolves TM-439 * chore: use default variable for sort * chore: reformat the date before file creation * Simplified search bar v2 (#81) * Make use of the existing simple search bar throughout site * Offsets for homepage * Redesign compare page (#82) * Redesign compare page * Remove old table styles; handle zero comparisons with route to catch it * feature: move the download button and use the secondary style. resolves TM-511 * fix: set a width on the cards for the favorite positions profile screen (#80) * fix: set a width on the cards for the favorite positions profile screen. resolves TM-410 * fix: no responsiveness for bid count and favorite buttons on position card displays * feature: fixed width for all position cards (homepage, favorites, similar positions). Resolves TM-510 * fix: remove unnecessary class and fix padding on grid for correct wrapping * chore: fixing the wrapping for the larger width * Fix search styles from breaking on the bidder portfolio * Reverting the changes to the glossary card due to the new term dialog breaking * Add link-container class back in * Update snapshots * Trigger circleci build * Code smells (#86) * Update CodeClimate exclusions for local dev * Reduce complexity * Comparison drawer component, add event listeners where needed, remove old comparison UI from results page * Track old compare choices to maintain sorting during an update * Add test coverage, use cancel tokens * Change dropdown menu link name from "Profile" to "Dashboard" * Remove How to Bid section from position details (#89) * Homepage QA (#90) * Remove Inbox icon * Fetch notifications from any screen, since we no longer use a /login route * Remove the BetaHeader * Conditional rendering of Bid Count on Bid Tracker cards, update Results cards data order and style * Break out compare elements into their own rows, add Bid List button to comparisons, use Set() for bidListToggleIsLoading * Remove eslint-disable * feature: include org info for domestic positions (#92) * Remove bidListToggleIsLoading since that is handled in BidListButton container * Display the service needs filter as a pill on the results page (#95) * Add error handling for position details screen (#93) * Add error handling for position details screen * Update call to action * Update based on design feedback * feature: add bid list button to the favorites cards. TM-512 * dev -> staging * Make icons consistent throughout profile pages (#102) * Service Needs -> Featured (#100) * Add hover to dropdown (#103) * Update empty saved search list text (#101) * Add custom filter for including null language positions (#104) * Remove Status component throughout app (#105) * fix: change label. TM-632 (#107) * Adjust elements to grow * fix: allow export on edge to run * Styles, add post to top * Update ordering for data points on Compare page (#110) * Remove post, add grade to bottom section * Updates to Bid Tracker (#115) * Add opacity to on-hold bids * "priority" -> "pending" * Prop to hide the delete button for standby bids * Track favoriting loading state of individual IDs (#108) * Track favoriting loading state of individual IDs * Fix proptypes * Handshake ribbon (#113) * Re-usable Ribbon component, use Ribbon component to display if handshake has been offered on position * Display handshake in condensed card, tests and snapshots * Test coverage (#117) * Test coverage for AccountDropdown, CompareDrawer, Compare * Add tests for SetType * Add toast notifications for favoriting actions (#114) * Create BoxShadow component and use with various cards (#106) * dev -> staging (#98) (#119) * chore: remove unnecessary css file from the build output * chore: update docs regarding apache compression config * Update bid list due date to match site-wide format * Use position id instead of position_number to query for position details * chore: remove unused props from components * chore: fix err due to incorrect favicon size in manifest * chore: remove unused props from the Home container * chore: remove unused props from the HomePagePositionsContainer component * fix: update profile page based on qa * Update styles and content in Position Details page based on QA feedback * fix: add logo to saved search title * fix: search page updates from qa * chore: linter fix * chore: fix linter issue * fix: search page updates from qa * chore: linter fix * Remove feedback button site-wide * Use object in state instead of array * Minor edits to Homepage based on QA * fix: make the pagination link clickable area larger * fix: use the correct button style * fix: better accessibility for active pagination tab selection * fix: use correct button design * fix: use lodash get so that non-existent nested property doesn't throw error (#45) * Use lodash get so that non-existent nested property doesn't throw error * Check for details.id so that components don't render with an empty object * Align bid count with data points in ResultsCondensedCard * Show "Available" filter to all users, not just CDOs (#46) * Update dashboard styles and content based on QA * Fix style for bid list container * Move Bid Count in-line with data points on ResultsCard * View More -> View more * Add disabled state for BidListButton based on proposed API updates * Use real properties from API PR, combine strings * Use white for button text color * feature: add remove bid to the bid tracker for draft and submitted bids * add additional status to the canDeleteBid function * Add react-toastify and use with bid list additions/removals (#51) * Add react-toastify and use with bid list additions/removals * More tests for toast-related functionality * Check if bid can be deleted and apply disabled status accordingly; update and optimize utility function * feature: use the can_delete property from the bid rather than calculate client side * Add loading spinner to Bid List button (#52) * Compress us-flag.jpg (#53) * Use react-linkify to automatically hyperlink URLs and email addresses in position capsule descriptions * Authorization -> Authentication (#54) * Authorization -> Authentication * Rename import * Update pagination and page size defaults in alignment with designs * Display link, if available, in the glossary * Add ability to edit links from Glossary editor; update styling for glossary links * Reduce code complexity, fix long link styles * Update snapshot * Add bundlesize (#69) * Add bundlsize and command * Refine glob * Refine maxSize target * Chore/linter (#67) * chore: fix linter is scss file * fix: linter issue * End of basic auth (#63) * Delete login form * Update actions * Clean up sagas * Remove isSAML checks * Refactor sagas, CodeClimate fixes * CodeClimate linting * Upate login screen * Simplify index * Change to force external login * get new custom auth working * remove rest of the basic auth refs from server * use env vars for env specific paths * Bidder role - TM-371 (#68) * Create permissions wrapper and conditionally render content based on bidder role * remove default fallback prop * Fix/mock auth (#70) * fix: override some routes for the webpack dev server so auth works for local development * fix: fix the conf so we can use the login.html when running the server in prod mode * Default to true if can_delete property is not found * Update snapshots * fix: remove the auth redirect loop and clean up reamining references to the LOGIN_MODE * TM-410 - display favorites list as 4 across above the large break point (#66) * fix: display favorites list as 4 across above the large break point * fix: display favorites list as 4 across above the large break point * fix: remove the auth redirect loop (#73) * fix: remove the auth redirect loop and clean up reamining references to the LOGIN_MODE * no conditional about url * dev -> staging (#56) (#75) * chore: remove unnecessary css file from the build output * chore: update docs regarding apache compression config * Update bid list due date to match site-wide format * Use position id instead of position_number to query for position details * chore: remove unused props from components * chore: fix err due to incorrect favicon size in manifest * chore: remove unused props from the Home container * chore: remove unused props from the HomePagePositionsContainer component * fix: update profile page based on qa * Update styles and content in Position Details page based on QA feedback * fix: add logo to saved search title * fix: search page updates from qa * chore: linter fix * chore: fix linter issue * fix: search page updates from qa * chore: linter fix * Remove feedback button site-wide * Use object in state instead of array * Minor edits to Homepage based on QA * fix: make the pagination link clickable area larger * fix: use the correct button style * fix: better accessibility for active pagination tab selection * fix: use correct button design * fix: use lodash get so that non-existent nested property doesn't throw error (#45) * Use lodash get so that non-existent nested property doesn't throw error * Check for details.id so that components don't render with an empty object * Align bid count with data points in ResultsCondensedCard * Show "Available" filter to all users, not just CDOs (#46) * Update dashboard styles and content based on QA * Fix style for bid list container * Move Bid Count in-line with data points on ResultsCard * View More -> View more * Add disabled state for BidListButton based on proposed API updates * Use real properties from API PR, combine strings * Use white for button text color * feature: add remove bid to the bid tracker for draft and submitted bids * add additional status to the canDeleteBid function * Add react-toastify and use with bid list additions/removals (#51) * Add react-toastify and use with bid list additions/removals * More tests for toast-related functionality * Check if bid can be deleted and apply disabled status accordingly; update and optimize utility function * feature: use the can_delete property from the bid rather than calculate client side * Add loading spinner to Bid List button (#52) * Compress us-flag.jpg (#53) * Remove use of skill cone/code to skill (#76) * Add Public Profile page - links from CDO portfolio, profile/public/:id route, add Assignments section to public profile, re-use of Profile Dashboard (#71) ## Relies on https://github.com/MetaPhase-Consulting/State-TalentMAP-API/pull/24 * Sort bid cycles alphabetically by name (#78) * feature: download search results in csv format. Resolves TM-439 * chore: use default variable for sort * chore: reformat the date before file creation * Simplified search bar v2 (#81) * Make use of the existing simple search bar throughout site * Offsets for homepage * Redesign compare page (#82) * Redesign compare page * Remove old table styles; handle zero comparisons with route to catch it * feature: move the download button and use the secondary style. resolves TM-511 * fix: set a width on the cards for the favorite positions profile screen (#80) * fix: set a width on the cards for the favorite positions profile screen. resolves TM-410 * fix: no responsiveness for bid count and favorite buttons on position card displays * feature: fixed width for all position cards (homepage, favorites, similar positions). Resolves TM-510 * fix: remove unnecessary class and fix padding on grid for correct wrapping * chore: fixing the wrapping for the larger width * Fix search styles from breaking on the bidder portfolio * Reverting the changes to the glossary card due to the new term dialog breaking * Add link-container class back in * Update snapshots * Trigger circleci build * Code smells (#86) * Update CodeClimate exclusions for local dev * Reduce complexity * Comparison drawer component, add event listeners where needed, remove old comparison UI from results page * Track old compare choices to maintain sorting during an update * Add test coverage, use cancel tokens * Change dropdown menu link name from "Profile" to "Dashboard" * Remove How to Bid section from position details (#89) * Homepage QA (#90) * Remove Inbox icon * Fetch notifications from any screen, since we no longer use a /login route * Remove the BetaHeader * Conditional rendering of Bid Count on Bid Tracker cards, update Results cards data order and style * Break out compare elements into their own rows, add Bid List button to comparisons, use Set() for bidListToggleIsLoading * Remove eslint-disable * feature: include org info for domestic positions (#92) * Remove bidListToggleIsLoading since that is handled in BidListButton container * Display the service needs filter as a pill on the results page (#95) * Add error handling for position details screen (#93) * Add error handling for position details screen * Update call to action * Update based on design feedback * dev -> staging * Make icons consistent throughout profile pages (#102) * Service Needs -> Featured (#100) * Add hover to dropdown (#103) * Sprint 6 merge conflicts (#120) * dev -> staging (#98) * chore: remove unnecessary css file from the build output * chore: update docs regarding apache compression config * Update bid list due date to match site-wide format * Use position id instead of position_number to query for position details * chore: remove unused props from components * chore: fix err due to incorrect favicon size in manifest * chore: remove unused props from the Home container * chore: remove unused props from the HomePagePositionsContainer component * fix: update profile page based on qa * Update styles and content in Position Details page based on QA feedback * fix: add logo to saved search title * fix: search page updates from qa * chore: linter fix * chore: fix linter issue * fix: search page updates from qa * chore: linter fix * Remove feedback button site-wide * Use object in state instead of array * Minor edits to Homepage based on QA * fix: make the pagination link clickable area larger * fix: use the correct button style * fix: better accessibility for active pagination tab selection * fix: use correct button design * fix: use lodash get so that non-existent nested property doesn't throw error (#45) * Use lodash get so that non-existent nested property doesn't throw error * Check for details.id so that components don't render with an empty object * Align bid count with data points in ResultsCondensedCard * Show "Available" filter to all users, not just CDOs (#46) * Update dashboard styles and content based on QA * Fix style for bid list container * Move Bid Count in-line with data points on ResultsCard * View More -> View more * Add disabled state for BidListButton based on proposed API updates * Use real properties from API PR, combine strings * Use white for button text color * feature: add remove bid to the bid tracker for draft and submitted bids * add additional status to the canDeleteBid function * Add react-toastify and use with bid list additions/removals (#51) * Add react-toastify and use with bid list additions/removals * More tests for toast-related functionality * Check if bid can be deleted and apply disabled status accordingly; update and optimize utility function * feature: use the can_delete property from the bid rather than calculate client side * Add loading spinner to Bid List button (#52) * Compress us-flag.jpg (#53) * Use react-linkify to automatically hyperlink URLs and email addresses in position capsule descriptions * Authorization -> Authentication (#54) * Authorization -> Authentication * Rename import * Update pagination and page size defaults in alignment with designs * Display link, if available, in the glossary * Add ability to edit links from Glossary editor; update styling for glossary links * Reduce code complexity, fix long link styles * Update snapshot * Add bundlesize (#69) * Add bundlsize and command * Refine glob * Refine maxSize target * Chore/linter (#67) * chore: fix linter is scss file * fix: linter issue * End of basic auth (#63) * Delete login form * Update actions * Clean up sagas * Remove isSAML checks * Refactor sagas, CodeClimate fixes * CodeClimate linting * Upate login screen * Simplify index * Change to force external login * get new custom auth working * remove rest of the basic auth refs from server * use env vars for env specific paths * Bidder role - TM-371 (#68) * Create permissions wrapper and conditionally render content based on bidder role * remove default fallback prop * Fix/mock auth (#70) * fix: override some routes for the webpack dev server so auth works for local development * fix: fix the conf so we can use the login.html when running the server in prod mode * Default to true if can_delete property is not found * Update snapshots * fix: remove the auth redirect loop and clean up reamining references to the LOGIN_MODE * TM-410 - display favorites list as 4 across above the large break point (#66) * fix: display favorites list as 4 across above the large break point * fix: display favorites list as 4 across above the large break point * fix: remove the auth redirect loop (#73) * fix: remove the auth redirect loop and clean up reamining references to the LOGIN_MODE * no conditional about url * dev -> staging (#56) (#75) * chore: remove unnecessary css file from the build output * chore: update docs regarding apache compression config * Update bid list due date to match site-wide format * Use position id instead of position_number to query for position details * chore: remove unused props from components * chore: fix err due to incorrect favicon size in manifest * chore: remove unused props from the Home container * chore: remove unused props from the HomePagePositionsContainer component * fix: update profile page based on qa * Update styles and content in Position Details page based on QA feedback * fix: add logo to saved search title * fix: search page updates from qa * chore: linter fix * chore: fix linter issue * fix: search page updates from qa * chore: linter fix * Remove feedback button site-wide * Use object in state instead of array * Minor edits to Homepage based on QA * fix: make the pagination link clickable area larger * fix: use the correct button style * fix: better accessibility for active pagination tab selection * fix: use correct button design * fix: use lodash get so that non-existent nested property doesn't throw error (#45) * Use lodash get so that non-existent nested property doesn't throw error * Check for details.id so that components don't render with an empty object * Align bid count with data points in ResultsCondensedCard * Show "Available" filter to all users, not just CDOs (#46) * Update dashboard styles and content based on QA * Fix style for bid list container * Move Bid Count in-line with data points on ResultsCard * View More -> View more * Add disabled state for BidListButton based on proposed API updates * Use real properties from API PR, combine strings * Use white for button text color * feature: add remove bid to the bid tracker for draft and submitted bids * add additional status to the canDeleteBid function * Add react-toastify and use with bid list additions/removals (#51) * Add react-toastify and use with bid list additions/removals * More tests for toast-related functionality * Check if bid can be deleted and apply disabled status accordingly; update and optimize utility function * feature: use the can_delete property from the bid rather than calculate client side * Add loading spinner to Bid List button (#52) * Compress us-flag.jpg (#53) * Remove use of skill cone/code to skill (#76) * Add Public Profile page - links from CDO portfolio, profile/public/:id route, add Assignments section to public profile, re-use of Profile Dashboard (#71) ## Relies on https://github.com/MetaPhase-Consulting/State-TalentMAP-API/pull/24 * Sort bid cycles alphabetically by name (#78) * feature: download search results in csv format. Resolves TM-439 * chore: use default variable for sort * chore: reformat the date before file creation * Simplified search bar v2 (#81) * Make use of the existing simple search bar throughout site * Offsets for homepage * Redesign compare page (#82) * Redesign compare page * Remove old table styles; handle zero comparisons with route to catch it * feature: move the download button and use the secondary style. resolves TM-511 * fix: set a width on the cards for the favorite positions profile screen (#80) * fix: set a width on the cards for the favorite positions profile screen. resolves TM-410 * fix: no responsiveness for bid count and favorite buttons on position card displays * feature: fixed width for all position cards (homepage, favorites, similar positions). Resolves TM-510 * fix: remove unnecessary class and fix padding on grid for correct wrapping * chore: fixing the wrapping for the larger width * Fix search styles from breaking on the bidder portfolio * Reverting the changes to the glossary card due to the new term dialog breaking * Add link-container class back in * Update snapshots * Trigger circleci build * Code smells (#86) * Update CodeClimate exclusions for local dev * Reduce complexity * Comparison drawer component, add event listeners where needed, remove old comparison UI from results page * Track old compare choices to maintain sorting during an update * Add test coverage, use cancel tokens * Change dropdown menu link name from "Profile" to "Dashboard" * Remove How to Bid section from position details (#89) * Homepage QA (#90) * Remove Inbox icon * Fetch notifications from any screen, since we no longer use a /login route * Remove the BetaHeader * Conditional rendering of Bid Count on Bid Tracker cards, update Results cards data order and style * Break out compare elements into their own rows, add Bid List button to comparisons, use Set() for bidListToggleIsLoading * Remove eslint-disable * feature: include org info for domestic positions (#92) * Remove bidListToggleIsLoading since that is handled in BidListButton container * Display the service needs filter as a pill on the results page (#95) * Add error handling for position details screen (#93) * Add error handling for position details screen * Update call to action * Update based on design feedback * dev -> staging * Make icons consistent throughout profile pages (#102) * Service Needs -> Featured (#100) * Add hover to dropdown (#103) * Remove duplicates * Add toggle component, use static toggle filter in search results (#121) * Add condensed card layouts for projected vacancy and recently available (#122) * dev -> staging (#98) (#127) * chore: remove unnecessary css file from the build output * chore: update docs regarding apache compression config * Update bid list due date to match site-wide format * Use position id instead of position_number to query for position details * chore: remove unused props from components * chore: fix err due to incorrect favicon size in manifest * chore: remove unused props from the Home container * chore: remove unused props from the HomePagePositionsContainer component * fix: update profile page based on qa * Update styles and content in Position Details page based on QA feedback * fix: add logo to saved search title * fix: search page updates from qa * chore: linter fix * chore: fix linter issue * fix: search page updates from qa * chore: linter fix * Remove feedback button site-wide * Use object in state instead of array * Minor edits to Homepage based on QA * fix: make the pagination link clickable area larger * fix: use the correct button style * fix: better accessibility for active pagination tab selection * fix: use correct button design * fix: use lodash get so that non-existent nested property doesn't throw error (#45) * Use lodash get so that non-existent nested property doesn't throw error * Check for details.id so that components don't render with an empty object * Align bid count with data points in ResultsCondensedCard * Show "Available" filter to all users, not just CDOs (#46) * Update dashboard styles and content based on QA * Fix style for bid list container * Move Bid Count in-line with data points on ResultsCard * View More -> View more * Add disabled state for BidListButton based on proposed API updates * Use real properties from API PR, combine strings * Use white for button text color * feature: add remove bid to the bid tracker for draft and submitted bids * add additional status to the canDeleteBid function * Add react-toastify and use with bid list additions/removals (#51) * Add react-toastify and use with bid list additions/removals * More tests for toast-related functionality * Check if bid can be deleted and apply disabled status accordingly; update and optimize utility function * feature: use the can_delete property from the bid rather than calculate client side * Add loading spinner to Bid List button (#52) * Compress us-flag.jpg (#53) * Use react-linkify to automatically hyperlink URLs and email addresses in position capsule descriptions * Authorization -> Authentication (#54) * Authorization -> Authentication * Rename import * Update pagination and page size defaults in alignment with designs * Display link, if available, in the glossary * Add ability to edit links from Glossary editor; update styling for glossary links * Reduce code complexity, fix long link styles * Update snapshot * Add bundlesize (#69) * Add bundlsize and command * Refine glob * Refine maxSize target * Chore/linter (#67) * chore: fix linter is scss file * fix: linter issue * End of basic auth (#63) * Delete login form * Update actions * Clean up sagas * Remove isSAML checks * Refactor sagas, CodeClimate fixes * CodeClimate linting * Upate login screen * Simplify index * Change to force external login * get new custom auth working * remove rest of the basic auth refs from server * use env vars for env specific paths * Bidder role - TM-371 (#68) * Create permissions wrapper and conditionally render content based on bidder role * remove default fallback prop * Fix/mock auth (#70) * fix: override some routes for the webpack dev server so auth works for local development * fix: fix the conf so we can use the login.html when running the server in prod mode * Default to true if can_delete property is not found * Update snapshots * fix: remove the auth redirect loop and clean up reamining references to the LOGIN_MODE * TM-410 - display favorites list as 4 across above the large break point (#66) * fix: display favorites list as 4 across above the large break point * fix: display favorites list as 4 across above the large break point * fix: remove the auth redirect loop (#73) * fix: remove the auth redirect loop and clean up reamining references to the LOGIN_MODE * no conditional about url * dev -> staging (#56) (#75) * chore: remove unnecessary css file from the build output * chore: update docs regarding apache compression config * Update bid list due date to match site-wide format * Use position id instead of position_number to query for position details * chore: remove unused props from components * chore: fix err due to incorrect favicon size in manifest * chore: remove unused props from the Home container * chore: remove unused props from the HomePagePositionsContainer component * fix: update profile page based on qa * Update styles and content in Position Details page based on QA feedback * fix: add logo to saved search title * fix: search page updates from qa * chore: linter fix * chore: fix linter issue * fix: search page updates from qa * chore: linter fix * Remove feedback button site-wide * Use object in state instead of array * Minor edits to Homepage based on QA * fix: make the pagination link clickable area larger * fix: use the correct button style * fix: better accessibility for active pagination tab selection * fix: use correct button design * fix: use lodash get so that non-existent nested property doesn't throw error (#45) * Use lodash get so that non-existent nested property doesn't throw error * Check for details.id so that components don't render with an empty object * Align bid count with data points in ResultsCondensedCard * Show "Available" filter to all users, not just CDOs (#46) * Update dashboard styles and content based on QA * Fix style for bid list container * Move Bid Count in-line with data points on ResultsCard * View More -> View more * Add disabled state for BidListButton based on proposed API updates * Use real properties from API PR, combine strings * Use white for button text color * feature: add remove bid to the bid tracker for draft and submitted bids * add additional status to the canDeleteBid function * Add react-toastify and use with bid list additions/removals (#51) * Add react-toastify and use with bid list additions/removals * More tests for toast-related functionality * Check if bid can be deleted and apply disabled status accordingly; update and optimize utility function * feature: use the can_delete property from the bid rather than calculate client side * Add loading spinner to Bid List button (#52) * Compress us-flag.jpg (#53) * Remove use of skill cone/code to skill (#76) * Add Public Profile page - links from CDO portfolio, profile/public/:id route, add Assignments section to public profile, re-use of Profile Dashboard (#71) ## Relies on https://github.com/MetaPhase-Consulting/State-TalentMAP-API/pull/24 * Sort bid cycles alphabetically by name (#78) * feature: download search results in csv format. Resolves TM-439 * chore: use default variable for sort * chore: reformat the date before file creation * Simplified search bar v2 (#81) * Make use of the existing simple search bar throughout site * Offsets for homepage * Redesign compare page (#82) * Redesign compare page * Remove old table styles; handle zero comparisons with route to catch it * feature: move the download button and use the secondary style. resolves TM-511 * fix: set a width on the cards for the favorite positions profile screen (#80) * fix: set a width on the cards for the favorite positions profile screen. resolves TM-410 * fix: no responsiveness for bid count and favorite buttons on position card displays * feature: fixed width for all position cards (homepage, favorites, similar positions). Resolves TM-510 * fix: remove unnecessary class and fix padding on grid for correct wrapping * chore: fixing the wrapping for the larger width * Fix search styles from breaking on the bidder portfolio * Reverting the changes to the glossary card due to the new term dialog breaking * Add link-container class back in * Update snapshots * Trigger circleci build * Code smells (#86) * Update CodeClimate exclusions for local dev * Reduce complexity * Comparison drawer component, add event listeners where needed, remove old comparison UI from results page * Track old compare choices to maintain sorting during an update * Add test coverage, use cancel tokens * Change dropdown menu link name from "Profile" to "Dashboard" * Remove How to Bid section from position details (#89) * Homepage QA (#90) * Remove Inbox icon * Fetch notifications from any screen, since we no longer use a /login route * Remove the BetaHeader * Conditional rendering of Bid Count on Bid Tracker cards, update Results cards data order and style * Break out compare elements into their own rows, add Bid List button to comparisons, use Set() for bidListToggleIsLoading * Remove eslint-disable * feature: include org info for domestic positions (#92) * Remove bidListToggleIsLoading since that is handled in BidListButton container * Display the service needs filter as a pill on the results page (#95) * Add error handling for position details screen (#93) * Add error handling for position details screen * Update call to action * Update based on design feedback * dev -> staging * Make icons consistent throughout profile pages (#102) * Service Needs -> Featured (#100) * Add hover to dropdown (#103) * Move "No Language" filter to top of list (#129) * Projected Vacancy - Saved Search + Results cards (#123) * Projected vacancy in Saved Searches * PV in results cards * Fix typo, increase font size * Increase filter container width, increase toggle font-size * Refactor section headers in profile, static UI for projected vacancy notifications for favorites and bid list (#126) * Pull css-box-shadow repo into app to force es6 to compile * Chore/autodeploy config (#132) * chore: update deploy config * chore: update deploy config * chore: update deploy config * chore: update deploy config * chore: update deploy config * chore: update deploy config * chore: use dev branch * fix: update deploy script * Compare from Favorites (#124) * Add condensed card layouts for projected vacancy and recently available * Add comparison buttons and comparison drawer to Favorites page * Condensed Bid Tracker (#128) * Alternate styles for condensed bid tracker, check for condensedView with Context API * Additional styles/conditional rendering, scroll to bid on Bid Tracker with route id, snapshots * Show Closed alert, style tweaks * Style tweak to hide overlay alert for prepanel state * Feature flags (#130) * Feature flag implementation * Feature flags for API * fix: check for and remove if present the backup dir (#136) * Remove jQuery and replace with XHR (#137) * Different text and colors for Approved bids (#139) * Hide Featured Positions section if positions length is zero (#138) * Hide Featured Positions section if positions length is zero * Update snapshot * Set config.json to preferred defaults in dev environment * Update index.html to reference API URL from config * Update deploy.sh to use alternate config * fix: include the bid count in the sections toggled by the bidding flag * Add the Beta banner back in * Use defaultSort prop instead of entire object; refresh state value on componentWillReceiveProps() (#148) * New card design for Bidder Portfolio (#140) * New card design for Bidder Portfolio, including badges (static for now) * Fallback for no grade * Update name format * Make disabled badge color accessible * Use aria-label to describe the meaning of the icon (#149) * New row design for Bidder Portfolio (#141) * New card design for Bidder Portfolio, including badges (static for now) * Fallback for no grade * New UI for Bidder Portfolio row view * Update name format * Add Export button to Bidder Portfolio (#142) * Add auto-complete dropdown to display CDO list in Bidder Portfolio (#150) * Increase test coverage (#151) * Remove ABOUT_URL (#152) * Update Jest (#153) * Update Jest * Update coverageReporters * Bidder Portfolio Edit View (#144) * New card design for Bidder Portfolio, including badges (static for now) * Fallback for no grade * New UI for Bidder Portfolio row view * Update name format * Add Export button to Bidder Portfolio * Add Edit view for Bidder Portfolio rows * UI For Bid Portfolio Edit View * Public Profile "Updates" and Edit UI (#147) * New card design for Bidder Portfolio, including badges (static for now) * Fallback for no grade * New UI for Bidder Portfolio row view * Update name format * Add Export button to Bidder Portfolio * Add Edit view for Bidder Portfolio rows * UI For Bid Portfolio Edit View * Add "Updates" section, static edit UI to Public Profile * Use react-picky to create a multi-select checkbox dropdown to use as a static UI Bid Cycle filter * Improved test coverage * Additional tests for SearchResultsExportLink and utilities * More test coverage (#156) * More test coverage * Add test coverage to ListItem * Add active filter (#158) * staging -> sprint-8 (#160) * Set min-width on compare drawer cards in IE11 (#161) * Redirect standard error, for when file does not exist in CI (#162) * Use common Export Button component for re-use (#163) * Handle for when current_assignment is null (#165) * Integrate react-scroll-up-button to scroll to top on the Results page (#170) * Integrate react-scroll-up-button to scroll to top on the Results page * Remove props that had been abstracted to common component * Update snapshot * Better handling for Go Back button by tracking back/forward in history state, adding option to ignore repeated pathnames (#164) * Add redux-persist, add PreferencesWrapper to wrap existing components, persist sort preferences to localStorage (#169) * Linting - unused import * Linting - unused prop * Linting - vendor selector * Linting - scss * Add Grade to Compare page (#174) * Fix/back to top usability (#175) * Add z-index so that Back to Top button appears on top of Compare drawer * Add blue focus so that Back to Top border-color is accessible when compare drawer is either open or closed * Bid Tracker Success link (#176) * Add link to Bid Tracker in "Add to Bid List" success notification * Add link to Bid Tracker in "Add to Bid List" success notification * Add link to Bid Tracker in "Add to Bid List" success notification * Add link to Bid Tracker in "Add to Bid List" success notification * Add scaffolding to set global context as a client, update CDO portfolio cards and rows (#171) * Add comments * Hover button on results cards to display capsule description (#177) * Accessibility fixes (#178) * Accessible color contrast for scroll-to-top button * Negative tabindex to hide CSVLink element, as the button performs the action, and clicking this element download a blank CSV file * Use slightly lighter blue for accessibility against link color (#180) * Deploy edit (#179) * Change NODE_ENV * Fix paths * Projected Vacancy Search (#172) * Ability to search for projected vacancies, disable search functionalities that don't exist yet * Remove snapshot tests since this component uses generated shortids * Accessibility, PV results card layout, new data structure for PV from API * Hide Post filter when searching PVs * Use Q.allSettled so that filters aren't "all or nothing" if one fails * Test coverage, comments * Test coverage, remove handling for old PV data structure * Revert to handling unstructured response for bid_seasons endpoint * Feature/projected vacancy export (#181) * Ability to search for projected vacancies, disable search functionalities that don't exist yet * Remove snapshot tests since this component uses generated shortids * Accessibility, PV results card layout, new data structure for PV from API * Hide Post filter when searching PVs * Use Q.allSettled so that filters aren't "all or nothing" if one fails * Test coverage, comments * Test coverage, remove handling for old PV data structure * Revert to handling unstructured response for bid_seasons endpoint * feature: hide export on projected vacancies for non-superusers. TM-740 * Use the word "Bid Season" when using projected vacancy search (#182) * Use the word "Bid Season" when using projected vacancy search * Hide "View position" link if it is a projected vacancy * Test coverage (#183) * Use getter on property value (#187) * Increase limit for glossary terms to load (#185) * Add link to Saved Search success message (#189) * Add posted date to position details * Make header color readable (#190) * Set uFEFF to false in CSV export to resolve default file format in Excel (#195) * Feature flag for notifications (#191) * Add role to persona links (#196) * Set all flags to true in both configs (#198) * Convert new/update/delete saved search notifications to toast; remove clone-related props (#192) * Update/bidder portfolio pagination (#188) * Use getter on property value * Update page size and scroll behavior on Bidder Portfolio * Projected Vacancy Favoriting (#197) * Functionality to favorite and view favorites for projected vacancies # Use https://github.com/MetaPhase-Consulting/State-TalentMAP-API/pull/72, need to wait for API to return correct response * Use new PV query to pull position information, format accordingly * Test coverage * Fork react-CSV and add ability to transform data (#186) * Fork react-CSV and add ability to transform data, use to append "=" sign for numeric strings * Update snapshot * Handle nulls in CSV export * Trigger build (#199) --- config/jest/setupTests.js | 5 +- package.json | 4 +- public/config/config.json | 3 +- public/config/config_dev.json | 5 +- public/login.html | 8 +- .../BidTrackerCardContainer.test.jsx.snap | 16 + .../BidTrackerCardList.test.jsx.snap | 24 ++ .../__snapshots__/BidTracker.test.jsx.snap | 8 + .../BidderPortfolioCard.test.jsx.snap | 16 + .../BidderPortfolioContainer.jsx | 12 +- .../BidderPortfolioContainer.test.jsx | 7 +- .../BidderPortfolioContainer.test.jsx.snap | 2 + .../BidderPortfolioGridItem.test.jsx.snap | 16 + .../BidderPortfolio/ExportLink/ExportLink.jsx | 19 +- .../__snapshots__/ExportLink.test.jsx.snap | 3 +- src/Components/CSV/components/Download.js | 50 +++ src/Components/CSV/components/Link.js | 116 ++++++ src/Components/CSV/core.js | 98 +++++ src/Components/CSV/index.js | 5 + src/Components/CSV/metaProps.js | 39 ++ src/Components/CSV/readme.md | 3 + src/Components/CompareList/CompareList.jsx | 2 +- .../__snapshots__/CompareList.test.jsx.snap | 24 +- .../FavoritePositions/FavoritePositions.jsx | 122 ++++-- .../FavoritePositions.test.jsx | 31 +- src/Components/FavoritePositions/Nav/Nav.jsx | 66 ++++ .../FavoritePositions/Nav/Nav.test.jsx | 57 +++ .../FavoritePositions/Nav/NavItem.jsx | 34 ++ .../FavoritePositions/Nav/NavItem.test.jsx | 34 ++ .../Nav/__snapshots__/Nav.test.jsx.snap | 24 ++ src/Components/FavoritePositions/Nav/index.js | 1 + .../FavoritePositions.test.jsx.snap | 366 ++++++++++++++++++ .../Header/DesktopNav/DesktopNav.jsx | 5 +- .../__snapshots__/DesktopNav.test.jsx.snap | 14 +- .../HomePagePositionsList.jsx | 8 +- .../HomePagePositionsList.test.jsx.snap | 7 + .../HomePagePositionsSection.test.jsx.snap | 1 + .../PositionDetailsItem.jsx | 12 + .../PositionDetailsItem.test.jsx.snap | 15 + .../ProfileDashboard/ProfileDashboard.jsx | 8 +- .../__snapshots__/UserProfile.test.jsx.snap | 16 + src/Components/ResultsCard/ResultsCard.jsx | 11 +- .../ResultsCondensedCard.jsx | 5 + .../ResultsCondensedCard.test.jsx.snap | 2 + .../ResultsCondensedCardBottom.jsx | 10 +- .../ResultsCondensedCardBottom.test.jsx | 8 + .../ResultsCondensedCardTop.jsx | 2 +- .../ResultsContainer/ResultsContainer.jsx | 18 +- .../ResultsContainer.test.jsx.snap | 2 +- src/Components/ResultsList/ResultsList.jsx | 5 +- src/Components/ResultsPage/ResultsPage.jsx | 10 +- .../SavedSearchMessages/Success.jsx | 26 ++ .../SavedSearchMessages/Success.test.jsx | 15 + .../SavedSearches/SavedSearches.jsx | 65 +--- .../SavedSearches/SavedSearches.test.jsx | 32 -- .../SavedSearchesList/SavedSearchesList.jsx | 3 - .../SavedSearchesList.test.jsx | 1 - .../__snapshots__/SavedSearches.test.jsx.snap | 1 - .../SearchResultsExportLink.jsx | 12 +- .../SearchResultsExportLink.test.jsx | 4 +- .../SearchResultsExportLink.test.jsx.snap | 3 +- src/Constants/SystemMessages.js | 12 +- src/Constants/SystemMessages.test.js | 3 +- src/Containers/BidTracker/BidTracker.test.jsx | 3 +- .../BidderPortfolio/BidderPortfolio.jsx | 2 +- src/Containers/Compare/Compare.jsx | 2 +- src/Containers/Dashboard/Dashboard.jsx | 2 +- src/Containers/Favorite/Favorite.jsx | 10 +- src/Containers/Favorites/Favorites.jsx | 3 +- src/Containers/Results/Results.jsx | 22 +- .../SavedSearches/SavedSearches.jsx | 44 +-- .../SavedSearchesMap/SavedSearchesMap.jsx | 33 +- src/Containers/queryParams.js | 5 +- src/__mocks__/userObject.js | 8 + src/actions/favoritePositions.js | 56 ++- src/actions/glossary.js | 4 +- src/actions/glossary.test.js | 4 +- src/actions/savedSearch.js | 26 +- src/actions/userProfile.js | 19 +- .../favoritePositions/favoritePositions.js | 2 +- src/sass/_glossaryEditor.scss | 4 + src/sass/_profile.scss | 16 +- src/utilities.js | 34 ++ yarn.lock | 5 - 84 files changed, 1498 insertions(+), 362 deletions(-) create mode 100644 src/Components/CSV/components/Download.js create mode 100644 src/Components/CSV/components/Link.js create mode 100644 src/Components/CSV/core.js create mode 100644 src/Components/CSV/index.js create mode 100644 src/Components/CSV/metaProps.js create mode 100644 src/Components/CSV/readme.md create mode 100644 src/Components/FavoritePositions/Nav/Nav.jsx create mode 100644 src/Components/FavoritePositions/Nav/Nav.test.jsx create mode 100644 src/Components/FavoritePositions/Nav/NavItem.jsx create mode 100644 src/Components/FavoritePositions/Nav/NavItem.test.jsx create mode 100644 src/Components/FavoritePositions/Nav/__snapshots__/Nav.test.jsx.snap create mode 100644 src/Components/FavoritePositions/Nav/index.js create mode 100644 src/Components/SavedSearchMessages/Success.jsx create mode 100644 src/Components/SavedSearchMessages/Success.test.jsx diff --git a/config/jest/setupTests.js b/config/jest/setupTests.js index 1040ec72c3..9fe4a22e72 100644 --- a/config/jest/setupTests.js +++ b/config/jest/setupTests.js @@ -24,7 +24,10 @@ Object.values = (obj) => Object.keys(obj).map(key => obj[key]) // Avoid jest error: "Error: Not implemented: navigation (except hash changes)" global.window.location.assign = () => {}; -// mock sessionStorage - feature flags config beforeEach(() => { + // mock sessionStorage - feature flags config sessionStorage.setItem('config', JSON.stringify(config)); + + // mock querySelector + global.document.querySelector = () => ({ offsetParent: '50px', scrollIntoView: () => {} }); }); diff --git a/package.json b/package.json index a9d2544328..ac13be2f9e 100644 --- a/package.json +++ b/package.json @@ -29,7 +29,6 @@ "rc-steps": "^3.1.0", "react": "^15.6.2", "react-autosuggest": "^9.3.2", - "react-csv": "^1.1.1", "react-dom": "^15.6.2", "react-fontawesome": "^1.6.1", "react-helmet": "^5.2.0", @@ -141,7 +140,8 @@ "!src/Components/**/index.js", "!src/Components/StaticDevContent/*", "!src/actions/showStaticContent.js", - "!src/reducers/showStaticContent.js" + "!src/reducers/showStaticContent.js", + "!src/Components/CSV/**/*.{js,jsx}" ], "coverageReporters": [ "text-summary", diff --git a/public/config/config.json b/public/config/config.json index cfc70ec4ff..11c4d9bf78 100644 --- a/public/config/config.json +++ b/public/config/config.json @@ -5,6 +5,7 @@ "flags": { "bidding": true, "projected_vacancy": true, - "static_content": true + "static_content": true, + "notifications": true } } diff --git a/public/config/config_dev.json b/public/config/config_dev.json index cf69ab72e1..2f499285ff 100644 --- a/public/config/config_dev.json +++ b/public/config/config_dev.json @@ -3,8 +3,9 @@ "baseURL": "https://dev.talentmap.api.metaphasedev.com/api/v1" }, "flags": { - "bidding": false, + "bidding": true, "projected_vacancy": true, - "static_content": true + "static_content": true, + "notifications": true } } diff --git a/public/login.html b/public/login.html index adffd8197a..ae963cd454 100644 --- a/public/login.html +++ b/public/login.html @@ -15,16 +15,16 @@

Personas

Administrator
  • - Leah Shadtrach + Leah Shadtrach (CDO)
  • - Jenny Townpost + Jenny Townpost (Bidder)
  • - Tarek Rehman + Tarek Rehman (Bidder)
  • - Wendy Woodward + Wendy Woodward (AO)
  • diff --git a/src/Components/BidTracker/BidTrackerCardContainer/__snapshots__/BidTrackerCardContainer.test.jsx.snap b/src/Components/BidTracker/BidTrackerCardContainer/__snapshots__/BidTrackerCardContainer.test.jsx.snap index 272a003e43..4d1494ec47 100644 --- a/src/Components/BidTracker/BidTrackerCardContainer/__snapshots__/BidTrackerCardContainer.test.jsx.snap +++ b/src/Components/BidTracker/BidTrackerCardContainer/__snapshots__/BidTrackerCardContainer.test.jsx.snap @@ -87,6 +87,14 @@ exports[`BidTrackerCardContainerComponent matches snapshot when priorityExists i "representation": "[00180000] OMS (DCM) (Addis Ababa, Ethiopia)", }, ], + "favorite_positions_pv": Array [ + Object { + "id": 10, + }, + Object { + "id": 20, + }, + ], "grade": "03", "id": 1, "initials": "JD", @@ -267,6 +275,14 @@ exports[`BidTrackerCardContainerComponent matches snapshot when priorityExists i "representation": "[00180000] OMS (DCM) (Addis Ababa, Ethiopia)", }, ], + "favorite_positions_pv": Array [ + Object { + "id": 10, + }, + Object { + "id": 20, + }, + ], "grade": "03", "id": 1, "initials": "JD", diff --git a/src/Components/BidTracker/BidTrackerCardList/__snapshots__/BidTrackerCardList.test.jsx.snap b/src/Components/BidTracker/BidTrackerCardList/__snapshots__/BidTrackerCardList.test.jsx.snap index 1e33bf1ef9..99065bda09 100644 --- a/src/Components/BidTracker/BidTrackerCardList/__snapshots__/BidTrackerCardList.test.jsx.snap +++ b/src/Components/BidTracker/BidTrackerCardList/__snapshots__/BidTrackerCardList.test.jsx.snap @@ -86,6 +86,14 @@ exports[`BidTrackerCardListComponent matches snapshot 1`] = ` "representation": "[00180000] OMS (DCM) (Addis Ababa, Ethiopia)", }, ], + "favorite_positions_pv": Array [ + Object { + "id": 10, + }, + Object { + "id": 20, + }, + ], "grade": "03", "id": 1, "initials": "JD", @@ -196,6 +204,14 @@ exports[`BidTrackerCardListComponent matches snapshot 1`] = ` "representation": "[00180000] OMS (DCM) (Addis Ababa, Ethiopia)", }, ], + "favorite_positions_pv": Array [ + Object { + "id": 10, + }, + Object { + "id": 20, + }, + ], "grade": "03", "id": 1, "initials": "JD", @@ -306,6 +322,14 @@ exports[`BidTrackerCardListComponent matches snapshot 1`] = ` "representation": "[00180000] OMS (DCM) (Addis Ababa, Ethiopia)", }, ], + "favorite_positions_pv": Array [ + Object { + "id": 10, + }, + Object { + "id": 20, + }, + ], "grade": "03", "id": 1, "initials": "JD", diff --git a/src/Components/BidTracker/__snapshots__/BidTracker.test.jsx.snap b/src/Components/BidTracker/__snapshots__/BidTracker.test.jsx.snap index 4b4e7a9242..1f936ec3de 100644 --- a/src/Components/BidTracker/__snapshots__/BidTracker.test.jsx.snap +++ b/src/Components/BidTracker/__snapshots__/BidTracker.test.jsx.snap @@ -268,6 +268,14 @@ exports[`BidTrackerComponent matches snapshot 1`] = ` "representation": "[00180000] OMS (DCM) (Addis Ababa, Ethiopia)", }, ], + "favorite_positions_pv": Array [ + Object { + "id": 10, + }, + Object { + "id": 20, + }, + ], "grade": "03", "id": 1, "initials": "JD", diff --git a/src/Components/BidderPortfolio/BidderPortfolioCard/__snapshots__/BidderPortfolioCard.test.jsx.snap b/src/Components/BidderPortfolio/BidderPortfolioCard/__snapshots__/BidderPortfolioCard.test.jsx.snap index 3f212b6a1b..e210ff8951 100644 --- a/src/Components/BidderPortfolio/BidderPortfolioCard/__snapshots__/BidderPortfolioCard.test.jsx.snap +++ b/src/Components/BidderPortfolio/BidderPortfolioCard/__snapshots__/BidderPortfolioCard.test.jsx.snap @@ -41,6 +41,14 @@ exports[`BidderPortfolioCardComponent matches snapshot 1`] = ` "representation": "[00180000] OMS (DCM) (Addis Ababa, Ethiopia)", }, ], + "favorite_positions_pv": Array [ + Object { + "id": 10, + }, + Object { + "id": 20, + }, + ], "grade": "03", "id": 1, "initials": "JD", @@ -96,6 +104,14 @@ exports[`BidderPortfolioCardComponent matches snapshot 1`] = ` "representation": "[00180000] OMS (DCM) (Addis Ababa, Ethiopia)", }, ], + "favorite_positions_pv": Array [ + Object { + "id": 10, + }, + Object { + "id": 20, + }, + ], "grade": "03", "id": 1, "initials": "JD", diff --git a/src/Components/BidderPortfolio/BidderPortfolioContainer/BidderPortfolioContainer.jsx b/src/Components/BidderPortfolio/BidderPortfolioContainer/BidderPortfolioContainer.jsx index 897f868f40..35a6d299ca 100644 --- a/src/Components/BidderPortfolio/BidderPortfolioContainer/BidderPortfolioContainer.jsx +++ b/src/Components/BidderPortfolio/BidderPortfolioContainer/BidderPortfolioContainer.jsx @@ -1,26 +1,30 @@ import React, { Component } from 'react'; import PropTypes from 'prop-types'; import { BIDDER_LIST } from '../../../Constants/PropTypes'; -import { scrollToTop } from '../../../utilities'; +import { scrollToId } from '../../../utilities'; import BidderPortfolioCardList from '../BidderPortfolioCardList'; import BidderPortfolioGridList from '../BidderPortfolioGridList'; import PaginationWrapper from '../../PaginationWrapper/PaginationWrapper'; import Alert from '../../Alert/Alert'; +const ID = 'bidder-portfolio-container'; + class BidderPortfolioContainer extends Component { constructor(props) { super(props); this.onPageChange = this.onPageChange.bind(this); } onPageChange(q) { - scrollToTop(); - this.props.queryParamUpdate(q); + scrollToId({ el: '.bidder-portfolio-container', config: { duration: 400 } }); + setTimeout(() => { + this.props.queryParamUpdate(q); + }, 600); } render() { const { bidderPortfolio, pageSize, pageNumber, showListView, showEdit } = this.props; const noResults = bidderPortfolio.results.length === 0; return ( -
    +
    { showListView ? diff --git a/src/Components/BidderPortfolio/BidderPortfolioContainer/BidderPortfolioContainer.test.jsx b/src/Components/BidderPortfolio/BidderPortfolioContainer/BidderPortfolioContainer.test.jsx index be59d58c8d..48af52d98f 100644 --- a/src/Components/BidderPortfolio/BidderPortfolioContainer/BidderPortfolioContainer.test.jsx +++ b/src/Components/BidderPortfolio/BidderPortfolioContainer/BidderPortfolioContainer.test.jsx @@ -16,7 +16,7 @@ describe('BidderPortfolioContainerComponent', () => { expect(wrapper).toBeDefined(); }); - it('can call the onPageChange function', () => { + it('can call the onPageChange function', (done) => { const spy = sinon.spy(); const wrapper = shallow( { queryParamUpdate={spy} />); wrapper.instance().onPageChange({}); - sinon.assert.calledOnce(spy); + setTimeout(() => { + sinon.assert.calledOnce(spy); + done(); + }, 700); }); it('matches snapshot when the all property is greater than zero', () => { diff --git a/src/Components/BidderPortfolio/BidderPortfolioContainer/__snapshots__/BidderPortfolioContainer.test.jsx.snap b/src/Components/BidderPortfolio/BidderPortfolioContainer/__snapshots__/BidderPortfolioContainer.test.jsx.snap index 89adc6ecdf..d44df7f7c4 100644 --- a/src/Components/BidderPortfolio/BidderPortfolioContainer/__snapshots__/BidderPortfolioContainer.test.jsx.snap +++ b/src/Components/BidderPortfolio/BidderPortfolioContainer/__snapshots__/BidderPortfolioContainer.test.jsx.snap @@ -3,6 +3,7 @@ exports[`BidderPortfolioContainerComponent matches snapshot when the all property is greater than zero 1`] = `
    ( data.map(entry => ({ - ...entry, + ...mapValues(entry, x => !x ? '' : x), // eslint-disable-line no-confusing-arrow + grade: getFormattedNumCSV(entry.grade), // any other processing we may want to do here })) ); @@ -74,7 +76,16 @@ export class ExportLink extends Component { return (
    - +
    ); } diff --git a/src/Components/BidderPortfolio/ExportLink/__snapshots__/ExportLink.test.jsx.snap b/src/Components/BidderPortfolio/ExportLink/__snapshots__/ExportLink.test.jsx.snap index d342c36bfe..6c63ed7e4e 100644 --- a/src/Components/BidderPortfolio/ExportLink/__snapshots__/ExportLink.test.jsx.snap +++ b/src/Components/BidderPortfolio/ExportLink/__snapshots__/ExportLink.test.jsx.snap @@ -57,7 +57,8 @@ exports[`SearchResultsExportLink matches snapshot 1`] = ` separator="," tabIndex="-1" target="_blank" - uFEFF={true} + transform={[Function]} + uFEFF={false} />
    `; diff --git a/src/Components/CSV/components/Download.js b/src/Components/CSV/components/Download.js new file mode 100644 index 0000000000..fbe1ec301b --- /dev/null +++ b/src/Components/CSV/components/Download.js @@ -0,0 +1,50 @@ +/* eslint-disable */ +import React from 'react'; +import {buildURI} from '../core'; +import { + defaultProps as commonDefaultProps, + propTypes as commonPropTypes} from '../metaProps'; +const defaultProps = { + target: '_blank' +}; + +/** + * + * @example ../../sample-site/csvdownload.example.md + */ +class CSVDownload extends React.Component { + + static defaultProps = Object.assign( + commonDefaultProps, + defaultProps + ); + + static propTypes = commonPropTypes; + + constructor(props) { + super(props); + this.state={}; + } + + buildURI() { + return buildURI(...arguments); + } + + componentDidMount(){ + const {data, headers, separator, enclosingCharacter, uFEFF, target, specs, replace, transform} = this.props; + this.state.page = window.open( + this.buildURI(data, uFEFF, headers, separator, enclosingCharacter), target, specs, replace, transform + ); + } + + getWindow() { + return this.state.page; + } + + render(){ + return (null) + } +} + +export default CSVDownload; +/* eslint-enable */ diff --git a/src/Components/CSV/components/Link.js b/src/Components/CSV/components/Link.js new file mode 100644 index 0000000000..1d94f2c152 --- /dev/null +++ b/src/Components/CSV/components/Link.js @@ -0,0 +1,116 @@ +/* eslint-disable */ +import React from 'react'; +import { buildURI, toCSV } from '../core'; +import { + defaultProps as commonDefaultProps, + propTypes as commonPropTypes +} from '../metaProps'; + +/** + * + * @example ../../sample-site/csvlink.example.md + */ +class CSVLink extends React.Component { + static defaultProps = commonDefaultProps; + static propTypes = commonPropTypes; + + constructor(props) { + super(props); + this.buildURI = this.buildURI.bind(this); + this.state = { href: '' }; + } + + componentDidMount() { + const {data, headers, separator, uFEFF, enclosingCharacter, transform} = this.props; + this.setState({ href: this.buildURI(data, uFEFF, headers, separator, enclosingCharacter, transform) }); + } + + componentWillReceiveProps(nextProps) { + const { data, headers, separator, transform, uFEFF, enclosingCharacter } = nextProps; + this.setState({ href: this.buildURI(data, uFEFF, headers, separator, enclosingCharacter, transform) }); + } + + buildURI() { + return buildURI(...arguments); + } + + /** + * In IE11 this method will trigger the file download + */ + handleLegacy(event, data, headers, separator, filename, enclosingCharacter, transform) { + // If this browser is IE 11, it does not support the `download` attribute + if (window.navigator.msSaveOrOpenBlob) { + // Stop the click propagation + event.preventDefault(); + + let blob = new Blob([toCSV(data, headers, separator, enclosingCharacter, transform)]); + window.navigator.msSaveBlob(blob, filename); + + return false; + } + } + + handleAsyncClick(event, ...args) { + const done = proceed => { + if (proceed === false) { + event.preventDefault(); + return; + } + this.handleLegacy(event, ...args); + }; + + this.props.onClick(event, done); + } + + handleSyncClick(event, ...args) { + const stopEvent = this.props.onClick(event) === false; + if (stopEvent) { + event.preventDefault(); + return; + } + this.handleLegacy(event, ...args); + } + + handleClick(...args) { + return event => { + if (typeof this.props.onClick === 'function') { + return this.props.asyncOnClick + ? this.handleAsyncClick(event, ...args) + : this.handleSyncClick(event, ...args); + } + this.handleLegacy(event, ...args); + }; + } + + render() { + const { + data, + headers, + separator, + filename, + uFEFF, + children, + onClick, + asyncOnClick, + enclosingCharacter, + transform, + ...rest + } = this.props; + + return ( + (this.link = link)} + target="_self" + href={this.state.href} + onClick={this.handleClick(data, headers, separator, filename, enclosingCharacter, transform)} + > + {children} + + ); + } +} + +export default CSVLink; +/* eslint-enable */ diff --git a/src/Components/CSV/core.js b/src/Components/CSV/core.js new file mode 100644 index 0000000000..6b76d9533a --- /dev/null +++ b/src/Components/CSV/core.js @@ -0,0 +1,98 @@ +/* eslint-disable */ +/** + * Simple safari detection based on user agent test + */ +export const isSafari = () => /^((?!chrome|android).)*safari/i.test(navigator.userAgent); + +const returnVal = v => v; + +export const isJsons = ((array) => Array.isArray(array) && array.every( + row => (typeof row === 'object' && !(row instanceof Array)) +)); + +export const isArrays = ((array) => Array.isArray(array) && array.every( + row => Array.isArray(row) +)); + +export const jsonsHeaders = ((array) => Array.from( + array.map(json => Object.keys(json)) + .reduce((a, b) => new Set([...a, ...b]), []) +)); + +export const jsons2arrays = (jsons, headers) => { + headers = headers || jsonsHeaders(jsons); + + // allow headers to have custom labels, defaulting to having the header data key be the label + let headerLabels = headers; + let headerKeys = headers; + if (isJsons(headers)) { + headerLabels = headers.map((header) => header.label); + headerKeys = headers.map((header) => header.key); + } + + const data = jsons.map((object) => headerKeys.map((header) => getHeaderValue(header, object))); + return [headerLabels, ...data]; +}; + +export const getHeaderValue = (property, obj) => { + const foundValue = property + .replace(/\[([^\]]+)]/g, ".$1") + .split(".") + .reduce(function(o, p, i, arr) { + // if at any point the nested keys passed do not exist, splice the array so it doesnt keep reducing + if (o[p] === undefined) { + arr.splice(1); + } else { + return o[p]; + } + }, obj); + + return (foundValue === undefined) ? '' : foundValue; +} + +export const elementOrEmpty = (element) => element || element === 0 ? element : ''; + +export const joiner = ((data, separator = ',', enclosingCharacter = '"', transform = returnVal) => { + return data + .filter(e => e) + .map( + row => row + .map((element) => elementOrEmpty(element)) + .map(column => transform(`${enclosingCharacter}${column}${enclosingCharacter}`)) + .join(separator) + ) + .join(`\n`); +}); + +export const arrays2csv = ((data, headers, separator, enclosingCharacter, transform = returnVal) => + joiner(headers ? [headers, ...data] : data, separator, enclosingCharacter, transform) +); + +export const jsons2csv = ((data, headers, separator, enclosingCharacter, transform = returnVal) => + joiner(jsons2arrays(data, headers), separator, enclosingCharacter, transform) +); + +export const string2csv = ((data, headers, separator, enclosingCharacter) => + (headers) ? `${headers.join(separator)}\n${data}`: data +); + +export const toCSV = (data, headers, separator, enclosingCharacter, transform = returnVal) => { + if (isJsons(data)) return jsons2csv(data, headers, separator, enclosingCharacter, transform); + if (isArrays(data)) return arrays2csv(data, headers, separator, enclosingCharacter, transform); + if (typeof data ==='string') return string2csv(data, headers, separator); + throw new TypeError(`Data should be a "String", "Array of arrays" OR "Array of objects" `); +}; + +export const buildURI = ((data, uFEFF, headers, separator, enclosingCharacter, transform = returnVal) => { + const csv = toCSV(data, headers, separator, enclosingCharacter, transform); + const type = isSafari() ? 'application/csv' : 'text/csv'; + const blob = new Blob([uFEFF ? '\uFEFF' : '', csv], {type}); + const dataURI = `data:${type};charset=utf-8,${uFEFF ? '\uFEFF' : ''}${csv}`; + + const URL = window.URL || window.webkitURL; + + return (typeof URL.createObjectURL === 'undefined') + ? dataURI + : URL.createObjectURL(blob); +}); +/* eslint-enable */ diff --git a/src/Components/CSV/index.js b/src/Components/CSV/index.js new file mode 100644 index 0000000000..4dd8149c44 --- /dev/null +++ b/src/Components/CSV/index.js @@ -0,0 +1,5 @@ +import Download from './components/Download'; +import Link from './components/Link'; + +export const CSVDownload = Download; +export const CSVLink = Link; diff --git a/src/Components/CSV/metaProps.js b/src/Components/CSV/metaProps.js new file mode 100644 index 0000000000..93d92ae157 --- /dev/null +++ b/src/Components/CSV/metaProps.js @@ -0,0 +1,39 @@ +/* eslint-disable */ +import React from 'react'; +import { string, array, oneOfType, bool, func } from 'prop-types'; + + +export const propTypes = { + data: oneOfType([string, array]).isRequired, + headers: array, + target: string, + separator: string, + filename: string, + uFEFF: bool, + onClick: func, + asyncOnClick: bool, + transform: func +}; + +export const defaultProps = { + separator: ',', + filename: 'generatedBy_react-csv.csv', + uFEFF: true, + asyncOnClick: false, + transform: v => v, +}; + +export const PropsNotForwarded = [ + `data`, + `headers` +]; + +// export const DownloadPropTypes = Object.assign( +// {}, +// PropTypes, +// { +// : , +// } +// ); + +/* eslint-enable */ diff --git a/src/Components/CSV/readme.md b/src/Components/CSV/readme.md new file mode 100644 index 0000000000..ed9df32a38 --- /dev/null +++ b/src/Components/CSV/readme.md @@ -0,0 +1,3 @@ +Fork of react-csv + +Waiting for https://github.com/react-csv/react-csv/pull/155 to be approved and merged. Once done, revert to the node module and delete this folder. diff --git a/src/Components/CompareList/CompareList.jsx b/src/Components/CompareList/CompareList.jsx index b1237663a0..5546ffb988 100644 --- a/src/Components/CompareList/CompareList.jsx +++ b/src/Components/CompareList/CompareList.jsx @@ -286,7 +286,7 @@ class CompareList extends Component { ( -
    -
    -
    - -
    -
    - +
    +
    + +
    +
    +
    -
    - { - favoritePositionsIsLoading && !favoritePositionsHasErrored && - - } - { - !favoritePositionsIsLoading && !favorites.results.length && - - } - -
    -); + ); + } +} FavoritePositions.propTypes = { - favorites: POSITION_SEARCH_RESULTS.isRequired, + favorites: FAVORITE_POSITIONS_ARRAY, + favoritesPV: FAVORITE_POSITIONS_ARRAY, favoritePositionsIsLoading: PropTypes.bool.isRequired, favoritePositionsHasErrored: PropTypes.bool.isRequired, bidList: BID_RESULTS.isRequired, onSortChange: PropTypes.func.isRequired, }; +FavoritePositions.defaultProps = { + favorites: [], + favoritesPV: [], +}; + export default FavoritePositions; diff --git a/src/Components/FavoritePositions/FavoritePositions.test.jsx b/src/Components/FavoritePositions/FavoritePositions.test.jsx index c901af9fe8..a8008be590 100644 --- a/src/Components/FavoritePositions/FavoritePositions.test.jsx +++ b/src/Components/FavoritePositions/FavoritePositions.test.jsx @@ -7,7 +7,8 @@ import bidListObject from '../../__mocks__/bidListObject'; describe('FavoritePositionsComponent', () => { const props = { - favorites: resultsObject, + favorites: resultsObject.results, + favoritesPV: resultsObject.results, toggleFavoritePositionIsLoading: false, toggleFavoritePositionHasErrored: false, favoritePositionsIsLoading: false, @@ -24,31 +25,41 @@ describe('FavoritePositionsComponent', () => { expect(wrapper).toBeDefined(); }); + it('is defined when selected === open', () => { + const wrapper = shallow( + , + ); + wrapper.setState({ selected: 'open' }); + expect(wrapper).toBeDefined(); + }); + + it('is defined when selected === pv', () => { + const wrapper = shallow( + , + ); + wrapper.setState({ selected: 'pv' }); + expect(wrapper).toBeDefined(); + }); + it('can receive props', () => { const wrapper = shallow( , ); - expect(wrapper.instance().props.favorites).toBe(resultsObject); + expect(wrapper.instance().props.favorites).toBe(props.favorites); }); it('displays an alert if there are no positions', () => { const wrapper = shallow( , ); expect(wrapper.find('NoFavorites').exists()).toBe(true); }); - it('renders the Spinner when loading', () => { - const wrapper = shallow( - , - ); - expect(wrapper.instance().props.favorites).toBe(resultsObject); - }); - it('renders the Spinner when loading', () => { const wrapper = shallow( onClick(selected)); + } + render() { + const { denominator, options } = this.props; + return ( +
    + {options.map((m) => { + const isActive = m.value === this.state.selected; + return ( + + ); + })} +
    + ); + } +} + +Nav.propTypes = { + options: PropTypes.arrayOf( + PropTypes.shape({ + title: PropTypes.string.isRequired, + numerator: PropTypes.number.isRequired, + }), + ), + denominator: PropTypes.number.isRequired, + selected: PropTypes.string, + onClick: PropTypes.func, +}; + +Nav.defaultProps = { + options: [], + denominator: 1, + selected: '', + onClick: EMPTY_FUNCTION, +}; + +export default Nav; diff --git a/src/Components/FavoritePositions/Nav/Nav.test.jsx b/src/Components/FavoritePositions/Nav/Nav.test.jsx new file mode 100644 index 0000000000..2bebe5a524 --- /dev/null +++ b/src/Components/FavoritePositions/Nav/Nav.test.jsx @@ -0,0 +1,57 @@ +import { shallow } from 'enzyme'; +import React from 'react'; +import toJSON from 'enzyme-to-json'; +import sinon from 'sinon'; +import Nav from './Nav'; + +describe('NavComponent', () => { + const props = { + options: [ + { title: 'Test', value: '1', numerator: 2 }, + { title: 'Test 2', value: '2', numerator: 3 }, + ], + denominator: 5, + }; + + it('is defined', () => { + const wrapper = shallow( +
    +
    +