Skip to content
This repository was archived by the owner on Mar 13, 2025. It is now read-only.

Commit c3aac43

Browse files
authored
Merge pull request #398 from mbaghel/dev
feat: Support direct links to the Job Candidates tabs and issue: #355 (the Logo Ribbon and the page height)
2 parents fbf22a1 + 4718302 commit c3aac43

File tree

5 files changed

+42
-12
lines changed

5 files changed

+42
-12
lines changed

src/components/CustomerScroll/styles.module.scss

+12-1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717

1818
.scrolling-logos {
1919
background-image: url("../../assets/images/customer-logos.svg");
20+
background-size: cover;
2021
height: 60px;
2122
width: 100%;
2223
animation: scroll 300s linear infinite;
@@ -42,4 +43,14 @@
4243
width: 60px;
4344
z-index: 2;
4445
}
45-
}
46+
}
47+
48+
@media only screen and (max-height: 859px) {
49+
.scrolling-logos {
50+
height: 30px;
51+
}
52+
.title {
53+
font-size: 16px;
54+
margin-bottom: 15px;
55+
}
56+
}

src/constants/index.js

+4
Original file line numberDiff line numberDiff line change
@@ -134,20 +134,23 @@ export const CANDIDATE_STATUS_FILTERS = [
134134
title: "Candidates to Review",
135135
noCandidateMessage: "No Candidates To Review",
136136
statuses: [CANDIDATE_STATUS.OPEN],
137+
urlParam: "to-review",
137138
},
138139
{
139140
key: CANDIDATE_STATUS_FILTER_KEY.INTERESTED,
140141
buttonText: "Interviews",
141142
title: "Interviews",
142143
noCandidateMessage: "No Interviews",
143144
statuses: [CANDIDATE_STATUS.INTERVIEW],
145+
urlParam: "interviews",
144146
},
145147
{
146148
key: CANDIDATE_STATUS_FILTER_KEY.SELECTED,
147149
buttonText: "Selected",
148150
title: "Selected",
149151
noCandidateMessage: "No Selected Candidates",
150152
statuses: [CANDIDATE_STATUS.SELECTED, CANDIDATE_STATUS.OFFERED],
153+
urlParam: "selected",
151154
},
152155
{
153156
key: CANDIDATE_STATUS_FILTER_KEY.NOT_INTERESTED,
@@ -162,6 +165,7 @@ export const CANDIDATE_STATUS_FILTERS = [
162165
CANDIDATE_STATUS.JOB_CLOSED,
163166
CANDIDATE_STATUS.WITHDRAWN,
164167
],
168+
urlParam: "declined",
165169
},
166170
];
167171

src/root.component.jsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ export default function Root() {
3232
<JobForm path="/taas/myteams/:teamId/positions/new" />
3333
<ResourceBookingDetails path="/taas/myteams/:teamId/rb/:resourceBookingId" />
3434
<ResourceBookingForm path="/taas/myteams/:teamId/rb/:resourceBookingId/edit" />
35-
<PositionDetails path="/taas/myteams/:teamId/positions/:positionId/candidates" />
35+
<PositionDetails path="/taas/myteams/:teamId/positions/:positionId/candidates/*candidateStatus" />
3636
<TeamAccess path="/taas/myteams/:teamId/access" />
3737
<CreateNewTeam path="/taas/createnewteam">
3838
<CreateTeamLanding path="/" />

src/routes/CreateNewTeam/styles.module.scss

+9-2
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,15 @@
1111
}
1212
}
1313

14-
@media only screen and (max-height: 820px) {
14+
@media only screen and (max-height: 859px) {
1515
.logos {
16-
display: none;
16+
position: relative;
17+
width: 100vw;
18+
}
19+
}
20+
21+
@media only screen and (max-height: 859px) and (min-width: 1024px) {
22+
.logos {
23+
left: -270px;
1724
}
1825
}

src/routes/PositionDetails/index.jsx

+16-8
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,12 @@ const inReviewStatusFilter = _.find(CANDIDATE_STATUS_FILTERS, {
2222
key: CANDIDATE_STATUS_FILTER_KEY.TO_REVIEW,
2323
});
2424

25-
const PositionDetails = ({ teamId, positionId }) => {
25+
const getKeyFromParam = (urlParam) => {
26+
const filter = _.find(CANDIDATE_STATUS_FILTERS, { urlParam });
27+
return filter?.key || undefined;
28+
}
29+
30+
const PositionDetails = ({ teamId, positionId, candidateStatus }) => {
2631
// by default show "interested" tab
2732
const [candidateStatusFilterKey, setCandidateStatusFilterKey] = useState(
2833
CANDIDATE_STATUS_FILTER_KEY.INTERESTED
@@ -41,15 +46,18 @@ const PositionDetails = ({ teamId, positionId }) => {
4146

4247
// if there are some candidates to review, then show "To Review" tab by default
4348
useEffect(() => {
44-
if (
45-
position &&
46-
_.filter(position.candidates, (candidate) =>
49+
if (position) {
50+
const key = getKeyFromParam(candidateStatus);
51+
if (key) {
52+
setCandidateStatusFilterKey(key);
53+
} else if (_.filter(position.candidates, (candidate) =>
4754
inReviewStatusFilter.statuses.includes(candidate.status)
48-
).length > 0
49-
) {
50-
setCandidateStatusFilterKey(CANDIDATE_STATUS_FILTER_KEY.TO_REVIEW);
55+
).length > 0
56+
) {
57+
setCandidateStatusFilterKey(CANDIDATE_STATUS_FILTER_KEY.TO_REVIEW);
58+
}
5159
}
52-
}, [position]);
60+
}, [position, candidateStatus]);
5361

5462
return (
5563
<Page title="Job Details">

0 commit comments

Comments
 (0)