diff --git a/Dockerfile b/Dockerfile index 49e686a794..59d39c94bc 100644 --- a/Dockerfile +++ b/Dockerfile @@ -64,6 +64,8 @@ ARG TC_M2M_AUTH0_PROXY_SERVER_URL ARG TC_M2M_AUTH0_URL ARG AUTH_SECRET +ARG COMMUNITY_APP_URL + ################################################################################ # Setting of environment variables in the Docker image. @@ -117,6 +119,7 @@ ENV CONTENTFUL_EDU_SPACE_ID=$CONTENTFUL_EDU_SPACE_ID ENV CONTENTFUL_EDU_CDN_API_KEY=$CONTENTFUL_EDU_CDN_API_KEY ENV CONTENTFUL_EDU_PREVIEW_API_KEY=$CONTENTFUL_EDU_PREVIEW_API_KEY ENV RECRUITCRM_API_KEY=$RECRUITCRM_API_KEY +ENV COMMUNITY_APP_URL=$COMMUNITY_APP_URL ################################################################################ # Testing and build of the application inside the container. diff --git a/build.sh b/build.sh index 64affb8170..8c4660937b 100755 --- a/build.sh +++ b/build.sh @@ -43,7 +43,8 @@ docker build -t $TAG \ --build-arg CONTENTFUL_COMCAST_SPACE_ID=$CONTENTFUL_COMCAST_SPACE_ID \ --build-arg CONTENTFUL_COMCAST_CDN_API_KEY=$CONTENTFUL_COMCAST_CDN_API_KEY \ --build-arg CONTENTFUL_COMCAST_PREVIEW_API_KEY=$CONTENTFUL_COMCAST_PREVIEW_API_KEY \ - --build-arg RECRUITCRM_API_KEY=$RECRUITCRM_API_KEY . + --build-arg RECRUITCRM_API_KEY=$RECRUITCRM_API_KEY \ + --build-arg COMMUNITY_APP_URL=$COMMUNITY_APP_URL . # Copies "node_modules" from the created image, if necessary for caching. docker create --name app $TAG diff --git a/package.json b/package.json index 3c9ed33fbe..8a0d8872c9 100644 --- a/package.json +++ b/package.json @@ -137,7 +137,7 @@ "tc-accounts": "git+https://github.com/appirio-tech/accounts-app.git#dev", "tc-core-library-js": "github:appirio-tech/tc-core-library-js#v2.6.3", "tc-ui": "^1.0.12", - "topcoder-react-lib": "1.0.0", + "topcoder-react-lib": "1000.21.5", "topcoder-react-ui-kit": "2.0.0", "topcoder-react-utils": "0.7.8", "turndown": "^4.0.2", diff --git a/src/assets/images/icon-skills-blue.png b/src/assets/images/icon-skills-blue.png new file mode 100644 index 0000000000..658369b2d2 Binary files /dev/null and b/src/assets/images/icon-skills-blue.png differ diff --git a/src/assets/images/icon-skills.png b/src/assets/images/icon-skills.png new file mode 100644 index 0000000000..9708ba945f Binary files /dev/null and b/src/assets/images/icon-skills.png differ diff --git a/src/assets/images/icon-skills.svg b/src/assets/images/icon-skills.svg deleted file mode 100644 index e2c6de4376..0000000000 --- a/src/assets/images/icon-skills.svg +++ /dev/null @@ -1,31 +0,0 @@ - - - - 52CD6D74-4265-497A-89D8-FF91F35564F8 - Created with sketchtool. - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/assets/images/l1.png b/src/assets/images/l1.png new file mode 100644 index 0000000000..be745ce393 Binary files /dev/null and b/src/assets/images/l1.png differ diff --git a/src/assets/images/l2.png b/src/assets/images/l2.png new file mode 100644 index 0000000000..fd3e0c91c4 Binary files /dev/null and b/src/assets/images/l2.png differ diff --git a/src/assets/images/l3.png b/src/assets/images/l3.png new file mode 100644 index 0000000000..963e89ca56 Binary files /dev/null and b/src/assets/images/l3.png differ diff --git a/src/assets/images/l4.png b/src/assets/images/l4.png new file mode 100644 index 0000000000..2e066b7f5d Binary files /dev/null and b/src/assets/images/l4.png differ diff --git a/src/server/services/recruitCRM.js b/src/server/services/recruitCRM.js index 4f7fb95189..b8659ae824 100644 --- a/src/server/services/recruitCRM.js +++ b/src/server/services/recruitCRM.js @@ -114,20 +114,27 @@ export default class RecruitCRMService { const data = await response.json(); if (data.current_page < data.last_page) { const pages = _.range(2, data.last_page + 1); - // eslint-disable-next-line no-restricted-syntax - for (const page of pages) { - // eslint-disable-next-line no-await-in-loop - const pageDataRsp = await fetch(`${this.private.baseUrl}/v1/jobs/search?${qs.stringify(req.query)}&page=${page}`, { + return Promise.all( + pages.map(page => fetch(`${this.private.baseUrl}/v1/jobs/search?${qs.stringify(req.query)}&page=${page}`, { method: 'GET', headers: { 'Content-Type': req.headers['content-type'], Authorization: this.private.authorization, }, - }); - // eslint-disable-next-line no-await-in-loop - const pageData = await pageDataRsp.json(); - data.data = _.flatten(data.data.concat(pageData.data)); - } + })), + ) + .then(async (allPages) => { + // eslint-disable-next-line no-restricted-syntax + for (const pageDataRsp of allPages) { + // eslint-disable-next-line no-await-in-loop + const pageData = await pageDataRsp.json(); + data.data = _.flatten(data.data.concat(pageData.data)); + } + return res.send(data.data); + }) + .catch(e => res.send({ + error: e, + })); } return res.send(data.data); } catch (err) { diff --git a/src/server/tc-communities/tco19/metadata.json b/src/server/tc-communities/tco19/metadata.json index 423235140a..d3e84c70ea 100644 --- a/src/server/tc-communities/tco19/metadata.json +++ b/src/server/tc-communities/tco19/metadata.json @@ -1,9 +1,6 @@ { "challengeFilter": { - "groupIds": ["20000078"], - "or": [{ - "tags": ["TCO", "TCO19"] - }] + "events": ["tco19"] }, "communityId": "tco19", "communityName": "TCO19", diff --git a/src/server/tc-communities/tco20/metadata.json b/src/server/tc-communities/tco20/metadata.json index 12ba613f5f..4b5a8e9cd7 100644 --- a/src/server/tc-communities/tco20/metadata.json +++ b/src/server/tc-communities/tco20/metadata.json @@ -1,6 +1,6 @@ { "challengeFilter": { - "tags": ["TCO", "TCO20"] + "events": ["tco20"] }, "communityId": "tco20", "communityName": "TCO20", diff --git a/src/server/tc-communities/tco21/metadata.json b/src/server/tc-communities/tco21/metadata.json index fa22f3f373..0e3f2ec708 100644 --- a/src/server/tc-communities/tco21/metadata.json +++ b/src/server/tc-communities/tco21/metadata.json @@ -1,6 +1,6 @@ { "challengeFilter": { - "tags": ["TCO", "TCO21"] + "events": ["tco21"] }, "communityId": "tco21", "communityName": "TCO21", diff --git a/src/shared/components/GUIKit/JobListCard/index.jsx b/src/shared/components/GUIKit/JobListCard/index.jsx index d94f4dc175..f2801de3b0 100644 --- a/src/shared/components/GUIKit/JobListCard/index.jsx +++ b/src/shared/components/GUIKit/JobListCard/index.jsx @@ -10,7 +10,7 @@ import './style.scss'; import IconBlackDuration from 'assets/images/icon-black-duration.svg'; import IconBlackLocation from 'assets/images/icon-black-location.svg'; import IconBlackPayment from 'assets/images/icon-black-payment.svg'; -import IconBlackSkills from 'assets/images/icon-skills.svg'; +import iconBlackSkills from 'assets/images/icon-skills.png'; export default function JobListCard({ job, @@ -30,7 +30,7 @@ export default function JobListCard({ {job.name}
- {skills} + skills-icon {skills}
{job.country} diff --git a/src/shared/components/GUIKit/JobListCard/style.scss b/src/shared/components/GUIKit/JobListCard/style.scss index 1cff03c199..d25dc60fd5 100644 --- a/src/shared/components/GUIKit/JobListCard/style.scss +++ b/src/shared/components/GUIKit/JobListCard/style.scss @@ -69,7 +69,8 @@ width: 141px; } - svg { + svg, + img { margin-right: 7px; } } diff --git a/src/shared/components/GUIKit/SearchCombo/index.jsx b/src/shared/components/GUIKit/SearchCombo/index.jsx index 29400e9cb0..c94b4e0480 100644 --- a/src/shared/components/GUIKit/SearchCombo/index.jsx +++ b/src/shared/components/GUIKit/SearchCombo/index.jsx @@ -17,6 +17,11 @@ function SearchCombo({ setVal(''); onSearch(''); }; + const onKeyDown = (e) => { + if (e.which === 13) { + onSearch(inputVal); + } + }; return (
@@ -24,7 +29,7 @@ function SearchCombo({ { !inputVal ? {placeholder} : null } - setVal(event.target.value)} /> + setVal(event.target.value)} onKeyDown={onKeyDown} /> { inputVal ? : null } diff --git a/src/shared/components/GUIKit/SearchCombo/style.scss b/src/shared/components/GUIKit/SearchCombo/style.scss index a47b4940ec..30d0928547 100644 --- a/src/shared/components/GUIKit/SearchCombo/style.scss +++ b/src/shared/components/GUIKit/SearchCombo/style.scss @@ -9,7 +9,6 @@ width: 100%; position: relative; margin-right: 10px; - z-index: 1; input.input { background: transparent; @@ -17,6 +16,8 @@ border-radius: 6px; height: 39px; margin: 0; + position: relative; + z-index: 1; } .search-placeholder { @@ -29,6 +30,12 @@ z-index: 0; top: 8px; left: 15px; + + @include xs-to-sm { + max-width: 250px; + overflow: hidden; + white-space: nowrap; + } } .clear-search { @@ -36,6 +43,7 @@ top: calc(50% - 5px); right: 15px; cursor: pointer; + z-index: 2; } } diff --git a/src/shared/components/Gigs/GigDetails.jsx b/src/shared/components/Gigs/GigDetails.jsx index cbf3602331..9f83e9198e 100644 --- a/src/shared/components/Gigs/GigDetails.jsx +++ b/src/shared/components/Gigs/GigDetails.jsx @@ -17,6 +17,11 @@ import IconMoney from 'assets/images/icon-payment.svg'; import IconDuration from 'assets/images/icon-calendar-gig.svg'; import IconHours from 'assets/images/icon-duration.svg'; import IconTimezone from 'assets/images/icon-timezone.svg'; +import iconSkills from 'assets/images/icon-skills-blue.png'; +import iconLabel1 from 'assets/images/l1.png'; +import iconLabel2 from 'assets/images/l2.png'; +import iconLabel3 from 'assets/images/l3.png'; +import iconLabel4 from 'assets/images/l4.png'; // Cleanup HTML from style tags // so it won't affect other parts of the UI @@ -41,11 +46,11 @@ export default function GigDetails(props) { return (
{ - job.error ? ( + job.error || job.enable_job_application_form !== 1 ? (

Gig does not exist.

- VIEW OTHER JOBS + VIEW OTHER GIGS
) : ( @@ -90,8 +95,8 @@ export default function GigDetails(props) {
-

Required Tech Skills

-

{skills}

+

Skills

+

skills-icon {skills}

Description

{ReactHtmlParser(job.job_description_text, ReactHtmlParserOptions)}

@@ -126,12 +131,25 @@ export default function GigDetails(props) {

Thank you for checking out our latest gig at Topcoder. Gig work through us is simple and effective for those that would like traditional freelance work. To learn more about how Gigs work with us, go here.

At Topcoder, we pride ourselves in bringing our customers the very best candidates to help fill their needs. Want to improve your chances? You can do a few things:

    -
  • Check out our Topcoder challenges and participate. Challenges showing your technology skills make you a “qualified” candidate so we know you’re good. The proof is in the pudding!
  • -
  • Make sure your Topcoder profile says it all. Fill out your profile to the best of your ability. Your skills, your location, your devices, etc, all help you improve your chances of being selected for a gig
  • -
  • Let us know you’re here! Check in on our Gig Work forum and tell us you’re looking for a gig. It’s great visibility for the Gig team
  • -
  • Subscribe to our Gig notifications email. We’ll send you a weekly update on gigs available so you don’t miss a beat. Find the button at the top of this page.
  • +
  • + label 1 +
    Make sure your Topcoder profile says it all. Fill out your profile to the best of your ability. Your skills, your location, your devices, etc, all help you improve your chances of being selected for a gig.
    +
  • +
  • + label 2 +
    Subscribe to our Gig notifications email.. We’ll send you a weekly update on gigs available so you don’t miss a beat.
    +
  • +
  • + label 3 +
    Let us know you’re here! Check in on our Gig Work forum and tell us you’re looking for a gig. It’s great visibility for the Gig team.
    +
  • +
  • + label 4 +
    Check out our Topcoder challenges and participate. Challenges showing your technology skills make you a “qualified” candidate so we know you’re good. The proof is in the pudding!
    +
+
If you have any questions or doubts, don’t hesitate to email support@topcoder.com.
diff --git a/src/shared/components/Gigs/style.scss b/src/shared/components/Gigs/style.scss index 03756963e1..840e6508a2 100644 --- a/src/shared/components/Gigs/style.scss +++ b/src/shared/components/Gigs/style.scss @@ -23,6 +23,11 @@ height: 80vh; } + .wrap .content .right .support a { + font-weight: 600; + text-decoration: none; + } + .wrap { h2 { color: #26b3c5; @@ -118,15 +123,26 @@ li { font-size: 14px; line-height: 26px; - } + strong { + font-weight: bold; + } + } /* stylelint-enable */ ul { margin-bottom: 0; + list-style: none; + padding: 0; li { margin-bottom: 15px; + display: flex; + align-items: flex-start; + + img { + margin-right: 16px; + } &:last-child { margin-bottom: 0; @@ -138,6 +154,16 @@ .gig-skills { display: flex; } + + .support { + background-color: #eaf6fd; + border-radius: 10px; + padding: 20px; + text-transform: uppercase; + font-weight: 600; + font-family: Barlow, sans-serif; + margin-top: 20px; + } } .left { @@ -159,6 +185,16 @@ margin-top: 0; } } + + .skills { + display: flex; + align-items: center; + /* stylelint-disable */ + img { + margin-right: 8px; + } + /* stylelint-enable */ + } } } } diff --git a/src/shared/components/ReviewOpportunityDetailsPage/ChallengeSpecTab/index.jsx b/src/shared/components/ReviewOpportunityDetailsPage/ChallengeSpecTab/index.jsx index 829d428032..37c0d832c5 100644 --- a/src/shared/components/ReviewOpportunityDetailsPage/ChallengeSpecTab/index.jsx +++ b/src/shared/components/ReviewOpportunityDetailsPage/ChallengeSpecTab/index.jsx @@ -29,24 +29,6 @@ const ChallengeSpecTab = ({ challenge }) => ( ) } - { - challenge.finalSubmissionGuidelines - && ( -
-

- Final Submission Guidelines -

-
-
- ) - }
); diff --git a/src/shared/components/challenge-detail/MySubmissions/index.jsx b/src/shared/components/challenge-detail/MySubmissions/index.jsx index 3cc0c6536e..8687914a85 100644 --- a/src/shared/components/challenge-detail/MySubmissions/index.jsx +++ b/src/shared/components/challenge-detail/MySubmissions/index.jsx @@ -41,7 +41,7 @@ class MySubmissionsView extends React.Component { } if (isMM) { - loadMMSubmissions(challenge.id, challenge.registrants, auth.tokenV3); + loadMMSubmissions(challenge.id, auth.tokenV3); } } diff --git a/src/shared/components/challenge-detail/Specification/index.jsx b/src/shared/components/challenge-detail/Specification/index.jsx index b6d3566c53..bb2b7b7817 100644 --- a/src/shared/components/challenge-detail/Specification/index.jsx +++ b/src/shared/components/challenge-detail/Specification/index.jsx @@ -45,7 +45,6 @@ export default function ChallengeDetailsView(props) { legacy, legacyId, documents, - finalSubmissionGuidelines, userDetails, metadata, events, @@ -196,35 +195,6 @@ export default function ChallengeDetailsView(props) { ) } - { - finalSubmissionGuidelines - && ( -
-

- Final Submission Guidelines -

- { - editMode ? ( - n && n.setHtml(finalSubmissionGuidelines)} - /> - ) : ( -
- ) - } -
- ) - } ) : ( @@ -408,7 +378,6 @@ ChallengeDetailsView.defaultProps = { track: 'design', reviewType: undefined, numberOfCheckpointsPrizes: 0, - finalSubmissionGuidelines: '', environment: '', descriptionFormat: 'HTML', codeRepo: '', @@ -438,7 +407,6 @@ ChallengeDetailsView.propTypes = { groups: PT.any, reviewType: PT.string, numberOfCheckpointsPrizes: PT.number, - finalSubmissionGuidelines: PT.string, environment: PT.string, codeRepo: PT.string, userDetails: PT.shape({ diff --git a/src/shared/components/challenge-detail/Submissions/index.jsx b/src/shared/components/challenge-detail/Submissions/index.jsx index b8e2e61c02..bf0beda012 100644 --- a/src/shared/components/challenge-detail/Submissions/index.jsx +++ b/src/shared/components/challenge-detail/Submissions/index.jsx @@ -54,7 +54,7 @@ class SubmissionsComponent extends React.Component { } if (isMM) { - loadMMSubmissions(challenge.id, challenge.registrants, auth.tokenV3); + loadMMSubmissions(challenge.id, auth.tokenV3); } this.updateSortedSubmissions(); } @@ -175,13 +175,16 @@ class SubmissionsComponent extends React.Component { valueA = `${a.member || ''}`.toLowerCase(); valueB = `${b.member || ''}`.toLowerCase(); } else { - valueA = _.get(a.registrant, 'memberHandle', ''); - valueB = _.get(b.registrant, 'memberHandle', ''); + valueA = _.get(a.registrant, 'memberHandle', '').toLowerCase(); + valueB = _.get(b.registrant, 'memberHandle', '').toLowerCase(); } valueIsString = true; break; } case 'Time': + valueA = new Date(a.submissions && a.submissions[0].submissionTime); + valueB = new Date(b.submissions && b.submissions[0].submissionTime); + break; case 'Submission Date': { valueA = new Date(a.created); valueB = new Date(b.created); @@ -247,7 +250,7 @@ class SubmissionsComponent extends React.Component { let isReviewPhaseComplete = false; _.forEach(allPhases, (phase) => { - if (phase.name === 'Review' && !phase.isOpen) { + if (phase.name === 'Review' && !phase.isOpen && moment(phase.scheduledStartDate).isBefore()) { isReviewPhaseComplete = true; } }); diff --git a/src/shared/containers/Gigs/RecruitCRMJobs.jsx b/src/shared/containers/Gigs/RecruitCRMJobs.jsx index eacff10bde..e9ffd09d65 100644 --- a/src/shared/containers/Gigs/RecruitCRMJobs.jsx +++ b/src/shared/containers/Gigs/RecruitCRMJobs.jsx @@ -118,10 +118,15 @@ class RecruitCRMJobsContainer extends React.Component {
{ - jobsToDisplay.map(job => ) + jobsToDisplay.length + ? jobsToDisplay.map(job => ) + : No Results }
- + { + jobsToDisplay.length + ? : null + } ); } diff --git a/src/shared/containers/Gigs/jobLisingStyles.scss b/src/shared/containers/Gigs/jobLisingStyles.scss index ef403335ee..4edc9b7c5b 100644 --- a/src/shared/containers/Gigs/jobLisingStyles.scss +++ b/src/shared/containers/Gigs/jobLisingStyles.scss @@ -16,5 +16,10 @@ display: flex; flex-direction: column; margin: 20px 0 50px 0; + + .no-results { + display: flex; + justify-content: center; + } } } diff --git a/src/shared/containers/GigsPages.jsx b/src/shared/containers/GigsPages.jsx index 65b18b48a8..f0406e7259 100644 --- a/src/shared/containers/GigsPages.jsx +++ b/src/shared/containers/GigsPages.jsx @@ -6,7 +6,7 @@ import PT from 'prop-types'; import Header from 'containers/TopcoderHeader'; import Footer from 'components/TopcoderFooter'; import Viewport from 'components/Contentful/Viewport'; -import { config } from 'topcoder-react-utils'; +import { config, MetaTags } from 'topcoder-react-utils'; import RecruitCRMJobDetails from 'containers/Gigs/RecruitCRMJobDetails'; @@ -15,6 +15,7 @@ export default function GigsPagesContainer(props) { const { id } = match.params; return (
+
{ id ? ( diff --git a/src/shared/containers/challenge-detail/index.jsx b/src/shared/containers/challenge-detail/index.jsx index 334758cd55..3bb14e4c1b 100644 --- a/src/shared/containers/challenge-detail/index.jsx +++ b/src/shared/containers/challenge-detail/index.jsx @@ -728,18 +728,15 @@ function mapStateToProps(state, props) { if (!_.isEmpty(mmSubmissions)) { mmSubmissions = mmSubmissions.map((submission) => { let registrant; - let { member } = submission; - if (auth.user.handle === submission.member) { + const { memberId } = submission; + let member = memberId; + if (`${auth.user.userId}` === `${memberId}`) { mySubmissions = submission.submissions || []; mySubmissions.forEach((mySubmission, index) => { mySubmissions[index].id = mySubmissions.length - index; }); } - let submissionDetail = _.find(challenge.submissions, { createdBy: submission.createdBy }); - if (!submissionDetail) { - // get submission detail from submissions challenge detail - submissionDetail = _.find(challenge.submissions, s => (`${s.memberId}` === `${submission.memberId}`)); - } + const submissionDetail = _.find(challenge.submissions, s => (`${s.memberId}` === `${submission.memberId}`)); if (submissionDetail) { member = submissionDetail.createdBy; @@ -747,12 +744,11 @@ function mapStateToProps(state, props) { } if (!registrant) { - registrant = _.find(challenge.registrants, { handle: submission.member }); + registrant = _.find(challenge.registrants, r => `${r.memberId}` === `${memberId}`); } - if (!submissionDetail && registrant) { - // sometime member is member id, do this to make sure it's alway member handle - member = registrant.handle; + if (registrant) { + member = registrant.memberHandle; } return ({ @@ -926,10 +922,10 @@ const mapDispatchToProps = (dispatch) => { dispatch(a.updateChallengeInit(uuid)); dispatch(a.updateChallengeDone(uuid, challenge, tokenV3)); }, - loadMMSubmissions: (challengeId, registrants, tokenV3) => { + loadMMSubmissions: (challengeId, tokenV3) => { const a = actions.challenge; dispatch(a.getMmSubmissionsInit(challengeId)); - dispatch(a.getMmSubmissionsDone(challengeId, registrants, tokenV3)); + dispatch(a.getMmSubmissionsDone(challengeId, tokenV3)); }, loadSubmissionInformation: (challengeId, submissionId, tokenV3) => { const a = actions.challenge; diff --git a/src/shared/containers/challenge-listing/Listing/index.jsx b/src/shared/containers/challenge-listing/Listing/index.jsx index 8b27e52269..5d8a6b09fb 100644 --- a/src/shared/containers/challenge-listing/Listing/index.jsx +++ b/src/shared/containers/challenge-listing/Listing/index.jsx @@ -136,7 +136,7 @@ export class ListingContainer extends React.Component { if (communityFilter) communityFilter = communityFilter.challengeFilter; if (communityFilter) filter = combine(filter, communityFilter); if (communityId && !_.isEmpty(groupIds)) { - filter.groups = groupIds; + filter.groupIds = groupIds; } return { back: mapToBackend(filter),