Skip to content

Gigs housekeep #5393

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Feb 25, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ workflows:
filters:
branches:
only:
- free
- gigs-housekeep
# This is beta env for production soft releases
- "build-prod-beta":
context : org-global
Expand Down
27 changes: 17 additions & 10 deletions src/shared/components/Gigs/GigApply/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,23 +48,30 @@ export default function GigApply(props) {
<h2>{application.error ? 'OOPS!' : 'APPLICATION SUBMITTED'}</h2>
{
application.error ? (
<p>Looks like there is a problem on our end. Please try again.<br />If this persists please contact <a href="mailto:[email protected]">[email protected]</a>.</p>
<React.Fragment>
<p styleName="error-text">{application.errorObj.message || JSON.stringify(application.errorObj)}</p>
<p>Looks like there is a problem on our end. Please try again.<br />If this persists please contact <a href="mailto:[email protected]">[email protected]</a>.</p>
<p>Please send us an email at <a href="mailto:[email protected]">[email protected]</a> with the subject ‘Gig Error’<br />and paste the URL for the gig you are attempting to apply for so that we know of your interest.</p>
</React.Fragment>
) : (
<p>We will contact you via email if it seems like a fit!</p>
)
}
<div styleName="cta-buttons">
{
application.error ? (
<a
href="#"
styleName="primaryBtn"
onClick={(e) => {
e.preventDefault();
window.location.reload();
}}
>APPLY AGAIN
</a>
<React.Fragment>
<a
href="#"
styleName="primaryBtn"
onClick={(e) => {
e.preventDefault();
window.location.reload();
}}
>APPLY AGAIN
</a>
<Link to={`${config.GIGS_PAGES_PATH}`}>VIEW OTHER GIGS</Link>
</React.Fragment>
) : (
<Link to={`${config.GIGS_PAGES_PATH}`} styleName="primaryBtn">GO TO GIG LIST</Link>
)
Expand Down
9 changes: 9 additions & 0 deletions src/shared/components/Gigs/GigApply/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -241,11 +241,16 @@
text-decoration: none;
}
}

.error-text {
color: #ef476f;
}
}
/* stylelint-disable */
.cta-buttons {
display: flex;
justify-content: center;
align-items: flex-start;
margin-top: 47px;

@include xs-to-sm {
Expand All @@ -271,6 +276,10 @@
@include xs-to-sm {
text-align: center;
}

&:last-child {
margin-left: 20px;
}
}
}
/* stylelint-enable */
Expand Down
11 changes: 8 additions & 3 deletions src/shared/containers/Gigs/RecruitCRMJobs.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ const sortByOptions = [
{ label: 'Latest Updated Descending', selected: false },
];
// Locations
let locations = [];
let locations = [{
label: 'All', selected: true,
}];

class RecruitCRMJobsContainer extends React.Component {
constructor(props) {
Expand Down Expand Up @@ -123,12 +125,15 @@ class RecruitCRMJobsContainer extends React.Component {
jobsToDisplay = _.filter(jobs, (job) => {
const country = job.country === 'Anywhere' || job.country === 'Any' ? 'All' : job.country;
// build dropdown
const found = _.find(locations, { label: country });
if (!found) {
const found = _.findIndex(locations, { label: country });
if (found === -1) {
locations.push({
label: country, selected: location.toLowerCase() === country.toLowerCase(),
});
} else {
locations[found].selected = location.toLowerCase() === country.toLowerCase();
}
locations[0].selected = location === 'All';
// filter
if (location === 'Anywhere' || location === 'Any' || location === 'All') return true;
return location.toLowerCase() === job.country.toLowerCase();
Expand Down