Skip to content

Commit 08a86ec

Browse files
Merge branch 'develop' into contentful-tabs-mobile
2 parents d4a2ae2 + d4fa135 commit 08a86ec

File tree

13 files changed

+82
-38
lines changed

13 files changed

+82
-38
lines changed

.circleci/config.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,7 @@ workflows:
342342
filters:
343343
branches:
344344
only:
345-
- gigs-apply-integration
345+
- free
346346
# This is alternate dev env for parallel testing
347347
- "build-test":
348348
context : org-global
@@ -363,7 +363,7 @@ workflows:
363363
filters:
364364
branches:
365365
only:
366-
- contentful-tabs-mobile
366+
- free
367367
# This is stage env for production QA releases
368368
- "build-prod-staging":
369369
context : org-global

__tests__/shared/components/Header/__snapshots__/index.jsx.snap

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -82,19 +82,19 @@ exports[`Default render 1`] = `
8282
"title": "Competitive Programming",
8383
},
8484
Object {
85-
"href": "/thrive/tracks?track=Data%20Science&tax=",
85+
"href": "/thrive/tracks?track=Data%20Science",
8686
"title": "Data Science",
8787
},
8888
Object {
89-
"href": "/thrive/tracks?track=Design&tax=",
89+
"href": "/thrive/tracks?track=Design",
9090
"title": "Design",
9191
},
9292
Object {
93-
"href": "/thrive/tracks?track=Development&tax=",
93+
"href": "/thrive/tracks?track=Development",
9494
"title": "Development",
9595
},
9696
Object {
97-
"href": "/thrive/tracks?track=QA&tax=",
97+
"href": "/thrive/tracks?track=QA",
9898
"title": "QA",
9999
},
100100
],

config/default.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -358,19 +358,19 @@ module.exports = {
358358
},
359359
{
360360
title: 'Data Science',
361-
href: '/thrive/tracks?track=Data%20Science&tax=',
361+
href: '/thrive/tracks?track=Data%20Science',
362362
},
363363
{
364364
title: 'Design',
365-
href: '/thrive/tracks?track=Design&tax=',
365+
href: '/thrive/tracks?track=Design',
366366
},
367367
{
368368
title: 'Development',
369-
href: '/thrive/tracks?track=Development&tax=',
369+
href: '/thrive/tracks?track=Development',
370370
},
371371
{
372372
title: 'QA',
373-
href: '/thrive/tracks?track=QA&tax=',
373+
href: '/thrive/tracks?track=QA',
374374
},
375375
],
376376
},

config/production.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -139,19 +139,19 @@ module.exports = {
139139
},
140140
{
141141
title: 'Data Science',
142-
href: '/thrive/tracks?track=Data%20Science&tax=',
142+
href: '/thrive/tracks?track=Data%20Science',
143143
},
144144
{
145145
title: 'Design',
146-
href: '/thrive/tracks?track=Design&tax=',
146+
href: '/thrive/tracks?track=Design',
147147
},
148148
{
149149
title: 'Development',
150-
href: '/thrive/tracks?track=Development&tax=',
150+
href: '/thrive/tracks?track=Development',
151151
},
152152
{
153153
title: 'QA',
154-
href: '/thrive/tracks?track=QA&tax=',
154+
href: '/thrive/tracks?track=QA',
155155
},
156156
],
157157
},

docs/swagger.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,13 @@ components:
122122
description: "The availability of the user"
123123
default: true
124124
example: true
125+
skill:
126+
type: string
127+
description: "The candidate's skills separated via ,"
128+
example: "Java,Angular,SQL Server,JavaScript"
129+
salaryExpectation:
130+
type: integer
131+
description: "The candidate expected salary"
125132
hasProfile:
126133
type: boolean
127134
description: "Whether has profile for the user"

src/server/routes/recruitCRM.js

Lines changed: 36 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -24,19 +24,42 @@ const routes = express.Router();
2424

2525
// Enables CORS on those routes according config above
2626
// ToDo configure CORS for set of our trusted domains
27-
routes.use(cors());
28-
routes.options('*', cors());
29-
30-
routes.get('/jobs', (req, res, next) => new RecruitCRMService().getAllJobs(req, res, next));
31-
routes.get('/jobs/cache', (req, res, next) => new RecruitCRMService().getJobsCacheStats(req, res, next));
32-
routes.get('/jobs/cache/flush', (req, res, next) => authenticator(authenticatorOptions)(req, res, next), (req, res, next) => new RecruitCRMService().getJobsCacheFlush(req, res, next));
33-
routes.get('/jobs/search', (req, res, next) => new RecruitCRMService().getJobs(req, res, next));
34-
routes.get('/jobs/:id', (req, res, next) => new RecruitCRMService().getJob(req, res, next));
35-
routes.post('/jobs/:id/apply', (req, res, next) => authenticator(authenticatorOptions)(req, res, next), upload.single('resume'), (req, res, next) => new RecruitCRMService().applyForJob(req, res, next));
36-
routes.get('/candidates/search', (req, res, next) => new RecruitCRMService().searchCandidates(req, res, next));
27+
// routes.use(cors());
28+
// routes.options('*', cors());
29+
30+
routes.options('/jobs', cors());
31+
routes.get('/jobs', cors(), (req, res, next) => new RecruitCRMService().getAllJobs(req, res, next));
32+
33+
routes.options('/jobs/cache', cors());
34+
routes.get('/jobs/cache', cors(), (req, res, next) => new RecruitCRMService().getJobsCacheStats(req, res, next));
35+
36+
routes.options('/jobs/cache/flush', cors());
37+
routes.get('/jobs/cache/flush', cors(), (req, res, next) => authenticator(authenticatorOptions)(req, res, next), (req, res, next) => new RecruitCRMService().getJobsCacheFlush(req, res, next));
38+
39+
routes.options('/jobs/search', cors());
40+
routes.get('/jobs/search', cors(), (req, res, next) => new RecruitCRMService().getJobs(req, res, next));
41+
42+
routes.options('/jobs/:id', cors());
43+
routes.get('/jobs/:id', cors(), (req, res, next) => new RecruitCRMService().getJob(req, res, next));
44+
45+
const applyOptions = {
46+
origin: true,
47+
methods: ['POST'],
48+
credentials: true,
49+
maxAge: 3600,
50+
allowedHeaders: ['Content-Type', 'Authorization'],
51+
};
52+
routes.options('/jobs/:id/apply', cors(applyOptions));
53+
routes.post('/jobs/:id/apply', cors(applyOptions), (req, res, next) => authenticator(authenticatorOptions)(req, res, next), upload.single('resume'), (req, res, next) => new RecruitCRMService().applyForJob(req, res, next));
54+
55+
routes.options('/candidates/search', cors());
56+
routes.get('/candidates/search', cors(), (req, res, next) => new RecruitCRMService().searchCandidates(req, res, next));
3757
// new router added
38-
routes.get('/profile', (req, res, next) => authenticator(authenticatorOptions)(req, res, next), (req, res, next) => new RecruitCRMService().getProfile(req, res, next));
39-
routes.post('/profile', (req, res, next) => authenticator(authenticatorOptions)(req, res, next), upload.single('resume'), (req, res, next) => new RecruitCRMService().updateProfile(req, res, next));
40-
routes.get('/taasjobs', (req, res, next) => new RecruitCRMService().getJobsFromTaas(req, res, next));
58+
routes.options('/profile', cors());
59+
routes.get('/profile', cors(), (req, res, next) => authenticator(authenticatorOptions)(req, res, next), (req, res, next) => new RecruitCRMService().getProfile(req, res, next));
60+
routes.post('/profile', cors(), (req, res, next) => authenticator(authenticatorOptions)(req, res, next), upload.single('resume'), (req, res, next) => new RecruitCRMService().updateProfile(req, res, next));
61+
62+
routes.options('/taasjobs', cors());
63+
routes.get('/taasjobs', cors(), (req, res, next) => new RecruitCRMService().getJobsFromTaas(req, res, next));
4164

4265
export default routes;

src/server/services/contentful.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,9 @@ class ApiService {
134134
* @return {Promise}
135135
*/
136136
async queryEntries(query) {
137-
const res = await this.client.getEntries(query);
137+
const decode = o => _.mapValues(o, prop => (typeof prop === 'object' ? decode(prop) : decodeURIComponent(prop)));
138+
const decoded = decode(query);
139+
const res = await this.client.getEntries(decoded);
138140
return res.stringifySafe ? JSON.parse(res.stringifySafe()) : res;
139141
}
140142
}

src/server/services/recruitCRM.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -635,6 +635,8 @@ export default class RecruitCRMService {
635635
const responseMapping = {
636636
hasProfile: true,
637637
phone: candidate.contact_number,
638+
salaryExpectation: candidate.salary_expectation,
639+
skill: candidate.skill,
638640
resume: candidate.resume,
639641
availability: _.isNil(candidate.available_from) ? true
640642
: new Date(candidate.available_from) <= new Date(),

src/shared/components/Contentful/Article/themes/default.scss

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -139,9 +139,8 @@
139139

140140
.catsContainer {
141141
display: flex;
142-
justify-content: flex-start;
143-
align-items: center;
144-
flex-wrap: wrap;
142+
flex-direction: column;
143+
align-items: flex-start;
145144
border-left: 3px solid #e9e9e9;
146145
padding-left: 7px;
147146
margin-bottom: 5px;

src/shared/components/Contentful/ArticleCard/themes/video.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
min-height: 217px;
1010
display: flex;
1111
flex-direction: column;
12+
cursor: pointer;
1213

1314
@include xs-to-sm {
1415
margin: auto;

0 commit comments

Comments
 (0)