diff --git a/.circleci/config.yml b/.circleci/config.yml index ecb10a3cc4..0dc0f8c4c6 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -275,8 +275,7 @@ workflows: filters: branches: only: - - recruit-apis - - feature/recommender-sync-develop + - develop # This is alternate dev env for parallel testing - "build-test": context : org-global @@ -291,14 +290,14 @@ workflows: filters: branches: only: - - bug-bash + - free # This is beta env for production soft releases - "build-prod-beta": context : org-global filters: branches: only: - - bug-bash + - free # This is stage env for production QA releases - "build-prod-staging": context : org-global @@ -306,7 +305,6 @@ workflows: branches: only: - develop - - feature/recommender-sync-develop - "approve-smoke-test-on-staging": type: approval requires: diff --git a/src/shared/components/GUIKit/JobListCard/index.jsx b/src/shared/components/GUIKit/JobListCard/index.jsx index 6502ff43bd..adfdfe4f48 100644 --- a/src/shared/components/GUIKit/JobListCard/index.jsx +++ b/src/shared/components/GUIKit/JobListCard/index.jsx @@ -1,6 +1,6 @@ /* eslint-disable max-len */ /** - * SearchCombo component. + * Job card component. */ import React from 'react'; import PT from 'prop-types'; diff --git a/src/shared/components/GUIKit/Paginate/index.jsx b/src/shared/components/GUIKit/Paginate/index.jsx index 7dc2eb3c8d..4dead9a44c 100644 --- a/src/shared/components/GUIKit/Paginate/index.jsx +++ b/src/shared/components/GUIKit/Paginate/index.jsx @@ -5,6 +5,7 @@ import React from 'react'; import ReactPaginate from 'react-paginate'; import PT from 'prop-types'; +import { useMediaQuery } from 'react-responsive'; import './style.scss'; function Paginate({ @@ -12,14 +13,17 @@ function Paginate({ page, onChange, }) { + const isMobile = useMediaQuery({ + query: '(max-device-width: 768px)', + }); return (
setVal(term), [term]); const clearSearch = () => { setVal(''); onSearch(''); diff --git a/src/shared/containers/Gigs/RecruitCRMJobs.jsx b/src/shared/containers/Gigs/RecruitCRMJobs.jsx index eb649611ad..77c4770fed 100644 --- a/src/shared/containers/Gigs/RecruitCRMJobs.jsx +++ b/src/shared/containers/Gigs/RecruitCRMJobs.jsx @@ -12,6 +12,7 @@ import Dropdown from 'components/GUIKit/Dropdown'; import PT from 'prop-types'; import React from 'react'; import { connect } from 'react-redux'; +import { getQuery, updateQuery } from 'utils/url'; import './jobLisingStyles.scss'; const GIGS_PER_PAGE = 10; @@ -48,7 +49,8 @@ class RecruitCRMJobsContainer extends React.Component { getJobs, jobs, } = this.props; - + const { state } = this; + const q = getQuery(); // This gets all jobs. // Pagination and filtering on front-side if (!jobs.length) { @@ -56,6 +58,14 @@ class RecruitCRMJobsContainer extends React.Component { job_status: 1, // Open jobs only }); } + // handle URL query if present + if (q && q.search) { + const stateUpdate = { + ...state, + term: q.search, + }; + this.setState(stateUpdate); + } } /** @@ -64,7 +74,6 @@ class RecruitCRMJobsContainer extends React.Component { */ onFilter(newState) { // Do updates - // update the state this.setState(newState); } @@ -74,12 +83,20 @@ class RecruitCRMJobsContainer extends React.Component { term: newTerm, page: 0, }); + // update the URL query + updateQuery({ + search: newTerm, + }); } onPaginate(newPage) { this.onFilter({ page: newPage.selected, }); + window.scrollTo({ + top: 0, + behavior: 'smooth', + }); } onLocation(newLocation) { diff --git a/src/shared/containers/Gigs/jobLisingStyles.scss b/src/shared/containers/Gigs/jobLisingStyles.scss index 923c4fe8fb..d1997b2f7c 100644 --- a/src/shared/containers/Gigs/jobLisingStyles.scss +++ b/src/shared/containers/Gigs/jobLisingStyles.scss @@ -30,6 +30,7 @@ @include xs-to-sm { margin-right: 0; + margin-bottom: 15px; } &:first-child {