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

Commit 5e0ddb2

Browse files
authored
Merge pull request #305 from topcoder-platform/revert-302-feature/frontend-search
Revert "Taas Platform - Role & Skills Intake - Search part of Front-end"
2 parents a2f188d + d5c5c5f commit 5e0ddb2

File tree

24 files changed

+309
-529
lines changed

24 files changed

+309
-529
lines changed

config/dev.js

-3
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,4 @@ module.exports = {
1313
V5: "https://api.topcoder-dev.com/v5", //"http://localhost:3030/api/v5"
1414
V3: "https://api.topcoder-dev.com/v3",
1515
},
16-
17-
// matching rate for search role result page
18-
MATCHING_RATE: process.env.MATCHING_RATE || 80,
1916
};

config/prod.js

-3
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,4 @@ module.exports = {
1313
V5: "https://api.topcoder.com/v5",
1414
V3: "https://api.topcoder.com/v3",
1515
},
16-
17-
// matching rate for search role result page
18-
MATCHING_RATE: process.env.MATCHING_RATE || 80,
1916
};

src/root.component.jsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ export default function Root() {
3535
<PositionDetails path="/taas/myteams/:teamId/positions/:positionId/candidates" />
3636
<TeamAccess path="/taas/myteams/:teamId/access" />
3737
<InputJobDescription path="/taas/myteams/createnewteam/jd" />
38-
<InputSkills path="/taas/myteams/createnewteam/skills" />
39-
<SelectRole path="/taas/myteams/createnewteam/role" />
38+
<InputSkills path="/taas/myteams/createnewteam/:projectId/skills" />
39+
<SelectRole path="/taas/myteams/createnewteam/:projectId/role" />
4040
</Router>
4141

4242
{/* Global config for Toastr popups */}

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

-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
position: relative;
77
width: 250px;
88
color: #fff;
9-
overflow: hidden;
109
button {
1110
border: none;
1211
}

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

+3-12
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,13 @@
33
* Card that appears when there are no matching profiles after searching.
44
*/
55
import React from "react";
6-
import PT from "prop-types";
76
import { navigate } from "@reach/router";
8-
import {
9-
formatMoney,
10-
} from "utils/format";
117
import "./styles.module.scss";
128
import IconEarthX from "../../../../assets/images/icon-earth-x.svg";
139
import Curve from "../../../../assets/images/curve.svg";
1410
import Button from "components/Button";
1511

16-
function NoMatchingProfilesResultCard({rates = [{global: 0}], onSearch}) {
12+
function NoMatchingProfilesResultCard() {
1713
return (
1814
<div styleName="result-card">
1915
<div styleName="heading">
@@ -29,11 +25,11 @@ function NoMatchingProfilesResultCard({rates = [{global: 0}], onSearch}) {
2925
</p>
3026
<div styleName="niche-rate-box">
3127
<p>Niche Rate</p>
32-
<p styleName="cost">{formatMoney(rates[0].global)}</p>
28+
<p styleName="cost">$1,200</p>
3329
<p>/Week</p>
3430
</div>
3531
<Button
36-
onClick={onSearch}
32+
onClick={() => navigate("/taas/myteams/createnewteam")}
3733
type="secondary"
3834
styleName="button"
3935
>
@@ -44,9 +40,4 @@ function NoMatchingProfilesResultCard({rates = [{global: 0}], onSearch}) {
4440
);
4541
}
4642

47-
NoMatchingProfilesResultCard.propTypes = {
48-
onSearch: PT.func,
49-
rates: PT.array,
50-
};
51-
5243
export default NoMatchingProfilesResultCard;

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

-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
.result-card {
44
@include rounded-card;
55
max-width: 746px;
6-
overflow: hidden;
76
width: 50vw;
87
margin-right: 30px;
98
}

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

+37-52
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,8 @@
55
* about costs and number of matching candidates.
66
*/
77
import React, { useState, useEffect } from "react";
8-
import PT from "prop-types";
98
import cn from "classnames";
10-
import _ from "lodash";
11-
import {
12-
formatMoney,
13-
} from "utils/format";
149
import { getAuthUserProfile } from "@topcoder/micro-frontends-navbar-app";
15-
import config from '../../../../../config';
1610
import "./styles.module.scss";
1711
import IconEarthCheck from "../../../../assets/images/icon-earth-check.svg";
1812
import IconMultipleUsers from "../../../../assets/images/icon-multiple-users.svg";
@@ -22,15 +16,9 @@ import Curve from "../../../../assets/images/curve.svg";
2216
import CircularProgressBar from "../CircularProgressBar";
2317
import Button from "components/Button";
2418

25-
function ResultCard({
26-
numberOfMembersAvailable,
27-
numberOfMembers,
28-
timeToCandidate,
29-
timeToInterview,
30-
isExternalMember,
31-
rates
32-
}) {
19+
function ResultCard() {
3320
const [userHandle, setUserHandle] = useState("handle");
21+
const [showSpecialRates, setShowSpecialRates] = useState(false);
3422
const [showRates, setShowRates] = useState(false);
3523

3624
useEffect(() => {
@@ -41,11 +29,16 @@ function ResultCard({
4129

4230
return (
4331
<div styleName="result-card">
44-
<div styleName="heading">
32+
<div
33+
role="button"
34+
tabIndex="0"
35+
onClick={() => setShowSpecialRates(!showSpecialRates)}
36+
styleName={cn("heading", { ["non-clickable"]: !showRates })}
37+
>
4538
<IconEarthCheck />
4639
<h3>We have matching profiles</h3>
4740
<p>
48-
We have qualified candidates who match {config.MATCHING_RATE}% or more of your job
41+
We have qualified candidates who match 80% or more of your job
4942
requirements.
5043
</p>
5144
<Curve styleName="curve" />
@@ -67,7 +60,7 @@ function ResultCard({
6760
Rate Details
6861
</Button>
6962
</div>
70-
{showRates && !isExternalMember && (
63+
{showRates && showSpecialRates && (
7164
<div styleName="xeno-rates">
7265
<p styleName="greeting-txt">
7366
Hi {userHandle}, we have special rates for you as a Xeno User!
@@ -79,23 +72,23 @@ function ResultCard({
7972
<p>(40h / week)</p>
8073
</div>
8174
<div styleName="senior">
82-
<h4>Global Rate</h4>
75+
<h4>Senior Member</h4>
8376
<div styleName="cost">
84-
<h4>{formatMoney(rates[0].global)}</h4>
77+
<h4>$2,000</h4>
8578
<p>/Week</p>
8679
</div>
8780
</div>
8881
<div styleName="standard">
89-
<h4>In-Conutry Rate</h4>
82+
<h4>Standard Member</h4>
9083
<div styleName="cost">
91-
<h4>{formatMoney(rates[0].inCountry)}</h4>
84+
<h4>$1,500</h4>
9285
<p>/Week</p>
9386
</div>
9487
</div>
9588
<div styleName="junior">
96-
<h4>Offshore Rate</h4>
89+
<h4>Junior Member</h4>
9790
<div styleName="cost">
98-
<h4>{formatMoney(rates[0].offShore)}</h4>
91+
<h4>$1,000</h4>
9992
<p>/Week</p>
10093
</div>
10194
</div>
@@ -106,23 +99,23 @@ function ResultCard({
10699
<p>(30h / week)</p>
107100
</div>
108101
<div styleName="senior">
109-
<h4>Global Rate</h4>
102+
<h4>Senior Member</h4>
110103
<div styleName="cost">
111-
<h4>{formatMoney(rates[0].rate30Global)}</h4>
104+
<h4>$1,800</h4>
112105
<p>/Week</p>
113106
</div>
114107
</div>
115108
<div styleName="standard">
116-
<h4>In-Conutry Rate</h4>
109+
<h4>Standard Member</h4>
117110
<div styleName="cost">
118-
<h4>{formatMoney(rates[0].rate30InCountry)}</h4>
111+
<h4>$1,300</h4>
119112
<p>/Week</p>
120113
</div>
121114
</div>
122115
<div styleName="junior">
123-
<h4>Offshore Rate</h4>
116+
<h4>Junior Member</h4>
124117
<div styleName="cost">
125-
<h4>{formatMoney(rates[0].rate30OffShore)}</h4>
118+
<h4>$800</h4>
126119
<p>/Week</p>
127120
</div>
128121
</div>
@@ -133,31 +126,31 @@ function ResultCard({
133126
<p>(20h / week)</p>
134127
</div>
135128
<div styleName="senior">
136-
<h4>Global Rate</h4>
129+
<h4>Senior Member</h4>
137130
<div styleName="cost">
138-
<h4>{formatMoney(rates[0].rate20Global)}</h4>
131+
<h4>$1,600</h4>
139132
<p>/Week</p>
140133
</div>
141134
</div>
142135
<div styleName="standard">
143-
<h4>In-Conutry Rate</h4>
136+
<h4>Standard Member</h4>
144137
<div styleName="cost">
145-
<h4>{formatMoney(rates[0].rate20InCountry)}</h4>
138+
<h4>$1,100</h4>
146139
<p>/Week</p>
147140
</div>
148141
</div>
149142
<div styleName="junior">
150-
<h4>Offshore Rate</h4>
143+
<h4>Junior Member</h4>
151144
<div styleName="cost">
152-
<h4>{formatMoney(rates[0].rate20OffShore)}</h4>
145+
<h4>$600</h4>
153146
<p>/Week</p>
154147
</div>
155148
</div>
156149
</div>
157150
</div>
158151
</div>
159152
)}
160-
{showRates && isExternalMember && (
153+
{showRates && !showSpecialRates && (
161154
<div styleName="rate-content">
162155
<div styleName="rate-left-side">
163156
<div styleName="cost-info">
@@ -166,7 +159,7 @@ function ResultCard({
166159
<p>(40h / week)</p>
167160
</div>
168161
<div styleName="weekly-rate">
169-
<h5>{formatMoney(rates[0].global)}</h5>
162+
<h5>$1,800</h5>
170163
<p>/Week</p>
171164
</div>
172165
</div>
@@ -176,7 +169,7 @@ function ResultCard({
176169
<p>(30h / week)</p>
177170
</div>
178171
<div styleName="weekly-rate">
179-
<h5>{formatMoney(rates[0].inCountry)}</h5>
172+
<h5>$1,250</h5>
180173
<p>/Week</p>
181174
</div>
182175
</div>
@@ -186,7 +179,7 @@ function ResultCard({
186179
<p>(20h / week)</p>
187180
</div>
188181
<div styleName="weekly-rate">
189-
<h5>{formatMoney(rates[0].offShore)}</h5>
182+
<h5>$800</h5>
190183
<p>/Week</p>
191184
</div>
192185
</div>
@@ -197,14 +190,14 @@ function ResultCard({
197190
<IconMultipleActionsCheck />
198191
<div>
199192
<p>Qualified candidates within</p>
200-
<h6>{timeToCandidate}h</h6>
193+
<h6>24h</h6>
201194
</div>
202195
</div>
203196
<div styleName="timeline-info">
204197
<IconTeamMeetingChat />
205198
<div>
206199
<p>Interviews can start within</p>
207-
<h6>{timeToInterview}h</h6>
200+
<h6>48h</h6>
208201
</div>
209202
</div>
210203
</div>
@@ -216,11 +209,11 @@ function ResultCard({
216209
<div>
217210
<CircularProgressBar
218211
size="160"
219-
progress={config.MATCHING_RATE}
212+
progress="80"
220213
strokeWidth="6"
221214
children={
222215
<div styleName="progressbar-child">
223-
<h4>{config.MATCHING_RATE}%</h4>
216+
<h4>80%</h4>
224217
<p>Matching rate</p>
225218
</div>
226219
}
@@ -229,7 +222,7 @@ function ResultCard({
229222
<div styleName="vertical-line" />
230223
<div>
231224
<IconMultipleUsers styleName="users" />
232-
<h4>{numberOfMembersAvailable}+</h4>
225+
<h4>300+</h4>
233226
<p>Members matched</p>
234227
</div>
235228
</div>
@@ -253,12 +246,4 @@ function ResultCard({
253246
);
254247
}
255248

256-
ResultCard.propTypes = {
257-
numberOfMembersAvailable:PT.number,
258-
numberOfMembers: PT.string,
259-
timeToCandidate: PT.number,
260-
timeToInterview: PT.number,
261-
isExternalMember: PT.bool,
262-
rates: PT.array,
263-
};
264249
export default ResultCard;

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

+2-8
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
.result-card {
44
@include rounded-card;
55
max-width: 746px;
6-
overflow: hidden;
76
width: 50vw;
87
margin-right: 30px;
98
}
@@ -24,6 +23,7 @@
2423
position: relative;
2524
text-align: center;
2625
border-radius: 8px 8px 0 0;
26+
cursor: pointer;
2727

2828
svg {
2929
margin-bottom: 8px;
@@ -72,12 +72,9 @@
7272
margin: 0 40px;
7373
}
7474
.progressbar-child {
75+
margin-top: 5px;
7576
width: 90px;
7677
height: 90px;
77-
overflow: hidden;
78-
> h4 {
79-
margin-top: 10px;
80-
}
8178
}
8279
}
8380

@@ -157,9 +154,6 @@
157154
&:not(:first-child) {
158155
margin-left: 40px;
159156
}
160-
&:not(:last-child) {
161-
border-right: 1px solid #E9E9E9;
162-
}
163157

164158
.rate-heading {
165159
display: flex;

0 commit comments

Comments
 (0)