Skip to content

Commit eead1c5

Browse files
committed
Add job title to request from Job Description page.
Add job title/role name heading to Result Card. Show No Matching Role page on backend error.
1 parent 646093b commit eead1c5

File tree

4 files changed

+32
-6
lines changed

4 files changed

+32
-6
lines changed

src/routes/CreateNewTeam/components/ResultCard/index.jsx

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,10 @@ function ResultCard({ role }) {
3232
isExternalMember,
3333
skillsMatch,
3434
rates: [rates],
35+
jobTitle,
36+
name,
37+
timeToCandidate,
38+
timeToInterview,
3539
} = role;
3640
const [userHandle, setUserHandle] = useState(null);
3741
const [showRates, setShowRates] = useState(false);
@@ -54,6 +58,9 @@ function ResultCard({ role }) {
5458
<Curve styleName="curve" />
5559
<IconEarthCheck styleName="transparent-icon" />
5660
</div>
61+
<h4 styleName="job-title">
62+
{jobTitle && jobTitle.length ? jobTitle : name}
63+
</h4>
5764
<div styleName="button-group">
5865
<Button
5966
type={!showRates ? "segment-selected" : "segment"}
@@ -202,14 +209,14 @@ function ResultCard({ role }) {
202209
<IconMultipleActionsCheck />
203210
<div>
204211
<p>Qualified candidates within</p>
205-
<h6>24h</h6>
212+
<h6>{timeToCandidate}h</h6>
206213
</div>
207214
</div>
208215
<div styleName="timeline-info">
209216
<IconTeamMeetingChat />
210217
<div>
211218
<p>Interviews can start within</p>
212-
<h6>48h</h6>
219+
<h6>{timeToInterview}h</h6>
213220
</div>
214221
</div>
215222
</div>

src/routes/CreateNewTeam/components/ResultCard/styles.module.scss

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
justify-content: flex-start;
1414
align-items: center;
1515
padding: 30px 0 60px 0;
16-
margin-bottom: 30px;
16+
margin-bottom: 14px;
1717
color: #fff;
1818
background-image: linear-gradient(225deg, #0ab88a 0%, #137d60 100%);
1919
position: relative;
@@ -40,6 +40,18 @@
4040
}
4141
}
4242

43+
.job-title {
44+
@include font-barlow;
45+
font-size: 22px;
46+
margin-bottom: 18px;
47+
font-weight: 600;
48+
text-align: center;
49+
text-transform: uppercase;
50+
// position text over bottom of header image
51+
position: relative;
52+
z-index: 100;
53+
}
54+
4355
.button-group {
4456
display: flex;
4557
flex-direction: row;

src/routes/CreateNewTeam/pages/InputJobDescription/index.jsx

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* Allows user to search for roles by
55
* job description
66
*/
7-
import React, { useCallback, useState } from "react";
7+
import React, { useCallback, useMemo, useState } from "react";
88
import PageHeader from "components/PageHeader";
99
import MarkdownEditor from "../../../../components/MarkdownEditor";
1010
import "./styles.module.scss";
@@ -29,6 +29,13 @@ function InputJobDescription() {
2929
setJdString(value);
3030
}, []);
3131

32+
const searchObject = useMemo(() => {
33+
if (jobTitle && jobTitle.length) {
34+
return { jobDescription: jdString, jobTitle };
35+
}
36+
return { jobDescription: jdString };
37+
}, [jobTitle, jdString]);
38+
3239
const onClick = useCallback(() => {
3340
setLoadingSkills(true);
3441
setSkills([]);
@@ -51,7 +58,7 @@ function InputJobDescription() {
5158
setStages={setStages}
5259
isCompletenessDisabled={jdString.length < 10 || jdString.length > 255}
5360
completenessStyle="input-job-description"
54-
searchObject={{ jobDescription: jdString }}
61+
searchObject={searchObject}
5562
onClick={onClick}
5663
toRender={(searchFunc) => (
5764
<div styleName="edit-container">

src/utils/helpers.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,4 +70,4 @@ export const setCurrentStage = (currentStepIdx, stages, setStagesCallback) => {
7070
* @returns {boolean} whether the role is custom/niche
7171
*/
7272
export const isCustomRole = (role) =>
73-
!role.name || CUSTOM_ROLE_NAMES.includes(role.name.toLowerCase());
73+
!role || !role.name || CUSTOM_ROLE_NAMES.includes(role.name.toLowerCase());

0 commit comments

Comments
 (0)