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

Commit 1a112c0

Browse files
committed
Merge branch 'dev' of https://github.com/topcoder-platform/taas-app into dev
2 parents 012c0ec + ac33c90 commit 1a112c0

File tree

14 files changed

+206
-40
lines changed

14 files changed

+206
-40
lines changed

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

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,27 +8,27 @@
88
import React from "react";
99
import PT from "prop-types";
1010
import AddedRolesAccordion from "../AddedRolesAccordion";
11-
import Completeness from "../Completeness";
11+
import Progress from "../Progress";
1212
import "./styles.module.scss";
1313

1414
function InputContainer({
1515
stages,
16-
isCompletenessDisabled,
16+
isProgressDisabled,
1717
toRender,
1818
search,
1919
onClick,
20-
completenessStyle,
20+
progressStyle,
2121
addedRoles,
2222
}) {
2323
return (
2424
<div styleName="page">
2525
{toRender(search)}
2626
<div styleName="right-side">
2727
<AddedRolesAccordion addedRoles={addedRoles} />
28-
<Completeness
29-
isDisabled={isCompletenessDisabled}
28+
<Progress
29+
isDisabled={isProgressDisabled}
3030
onClick={onClick ? onClick: search}
31-
extraStyleName={completenessStyle}
31+
extraStyleName={progressStyle}
3232
buttonLabel="Search"
3333
stages={stages}
3434
percentage="26"
@@ -40,11 +40,11 @@ function InputContainer({
4040

4141
InputContainer.propTypes = {
4242
stages: PT.array,
43-
isCompletenessDisabled: PT.bool,
43+
isProgressDisabled: PT.bool,
4444
search: PT.func,
4545
onClick: PT.func,
4646
toRender: PT.func,
47-
completenessStyle: PT.string,
47+
progressStyle: PT.string,
4848
addedRoles: PT.array,
4949
};
5050

src/routes/CreateNewTeam/components/Completeness/index.jsx renamed to src/routes/CreateNewTeam/components/Progress/index.jsx

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
/**
2-
* Completeness Sidebar
3-
* Shows level of completeness through skill
2+
* Progress Sidebar
3+
* Shows level of progress through skill
44
* input process and contains a button for
55
* searching for users or submitting the job.
66
*/
77
import Button from "components/Button";
88
import React from "react";
99
import cn from "classnames";
1010
import PT from "prop-types";
11-
import CompleteProgress from "../CompleteProgress";
11+
import ProgressBar from "../ProgressBar";
1212
import "./styles.module.scss";
1313
import IconMultipleActionsCheck from "../../../../assets/images/icon-multiple-actions-check-2.svg";
1414
import IconListQuill from "../../../../assets/images/icon-list-quill.svg";
1515
import IconOfficeFileText from "../../../../assets/images/icon-office-file-text.svg";
1616

17-
function Completeness({
17+
function Progress({
1818
extraStyleName,
1919
isDisabled,
2020
onClick,
@@ -23,7 +23,7 @@ function Completeness({
2323
percentage,
2424
}) {
2525

26-
let backgroundIcon
26+
let backgroundIcon
2727
if (extraStyleName === "input-skills") {
2828
backgroundIcon= <IconListQuill styleName="transparent-icon" />
2929
} else if (extraStyleName === "input-job-description") {
@@ -33,8 +33,8 @@ function Completeness({
3333
}
3434

3535
return (
36-
<div styleName={cn("completeness", extraStyleName)}>
37-
<CompleteProgress percentDone={percentage} />
36+
<div styleName={cn("progress", extraStyleName)}>
37+
<ProgressBar percentDone={percentage} />
3838
<ul styleName="list">
3939
{stages.map((stage) => (
4040
<li
@@ -60,7 +60,7 @@ function Completeness({
6060
);
6161
}
6262

63-
Completeness.propTypes = {
63+
Progress.propTypes = {
6464
extraStyleName: PT.string,
6565
isDisabled: PT.bool,
6666
onClick: PT.func,
@@ -69,4 +69,4 @@ Completeness.propTypes = {
6969
stages: PT.arrayOf(PT.string),
7070
};
7171

72-
export default Completeness;
72+
export default Progress;

src/routes/CreateNewTeam/components/Completeness/styles.module.scss renamed to src/routes/CreateNewTeam/components/Progress/styles.module.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
@import "styles/include";
22

3-
.completeness {
3+
.progress {
44
@include rounded-card;
55
overflow: hidden;
66
padding: 12px;

src/routes/CreateNewTeam/components/CompleteProgress/index.jsx renamed to src/routes/CreateNewTeam/components/ProgressBar/index.jsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
/**
2-
* Complete Progress Tracker
2+
* Progress Tracker
33
* Graphical representation of
4-
* completeness percentage for skill input.
4+
* progress percentage for skill input.
55
*/
66
import React from "react";
77
import PT from "prop-types";
88
import "./styles.module.scss";
99

10-
function CompleteProgress({ percentDone }) {
10+
function ProgressBar({ percentDone }) {
1111
if (!percentDone || percentDone < 0) {
1212
percentDone = 0;
1313
} else if (percentDone > 100) {
@@ -17,7 +17,7 @@ function CompleteProgress({ percentDone }) {
1717
return (
1818
<div styleName="progress">
1919
<div styleName="heading">
20-
<p>Completeness</p>
20+
<p>Progress</p>
2121
<h6>{percentDone}%</h6>
2222
</div>
2323
<div styleName="progress-bar">
@@ -30,8 +30,8 @@ function CompleteProgress({ percentDone }) {
3030
);
3131
}
3232

33-
CompleteProgress.propTypes = {
33+
ProgressBar.propTypes = {
3434
percentDone: PT.number,
3535
};
3636

37-
export default CompleteProgress;
37+
export default ProgressBar;

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import _ from "lodash";
1111
import { useDispatch } from "react-redux";
1212
import { editRoleAction } from "../../actions";
1313
import AddedRolesAccordion from "../AddedRolesAccordion";
14-
import Completeness from "../Completeness";
14+
import Progress from "../Progress";
1515
import SearchCard from "../SearchCard";
1616
import ResultCard from "../ResultCard";
1717
import NoMatchingProfilesResultCard from "../NoMatchingProfilesResultCard";
@@ -22,7 +22,7 @@ import "./styles.module.scss";
2222
function SearchContainer({
2323
isNewRole,
2424
stages,
25-
completenessStyle,
25+
progressStyle,
2626
navigate,
2727
addedRoles,
2828
searchState,
@@ -87,14 +87,14 @@ function SearchContainer({
8787
{renderLeftSide()}
8888
<div styleName="right-side">
8989
<AddedRolesAccordion addedRoles={addedRoles} />
90-
<Completeness
90+
<Progress
9191
isDisabled={
9292
!buttonClickable ||
9393
searchState === "searching" ||
9494
(searchState === "done" && (!addedRoles || !addedRoles.length))
9595
}
9696
onClick={() => setAddAnotherOpen(true)}
97-
extraStyleName={completenessStyle}
97+
extraStyleName={progressStyle}
9898
buttonLabel="Continue"
9999
stages={stages}
100100
percentage={getPercentage()}
@@ -114,7 +114,7 @@ function SearchContainer({
114114
SearchContainer.propTypes = {
115115
isNewRole: PT.bool,
116116
stages: PT.array,
117-
completenessStyle: PT.string,
117+
progressStyle: PT.string,
118118
previousSearchId: PT.string,
119119
navigate: PT.func,
120120
addedRoles: PT.array,

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import { toastr } from "react-redux-toastr";
1717
import { navigate } from "@reach/router";
1818
import ResultCard from "../ResultCard";
1919
import AddedRolesAccordion from "../AddedRolesAccordion";
20-
import Completeness from "../Completeness";
20+
import Progress from "../Progress";
2121
import AddAnotherModal from "../AddAnotherModal";
2222
import TeamDetailsModal from "../TeamDetailsModal";
2323
import ConfirmationModal from "../ConfirmationModal";
@@ -31,7 +31,7 @@ import NoMatchingProfilesResultCard from "../NoMatchingProfilesResultCard";
3131
function SubmitContainer({
3232
stages,
3333
setStages,
34-
completenessStyle,
34+
progressStyle,
3535
matchingRole,
3636
addedRoles,
3737
}) {
@@ -120,9 +120,9 @@ function SubmitContainer({
120120
)}
121121
<div styleName="right-side">
122122
<AddedRolesAccordion addedRoles={addedRoles} />
123-
<Completeness
123+
<Progress
124124
onClick={() => setAddAnotherOpen(true)}
125-
extraStyleName={completenessStyle}
125+
extraStyleName={progressStyle}
126126
buttonLabel="Continue"
127127
stages={stages}
128128
percentage="98"
@@ -154,7 +154,7 @@ function SubmitContainer({
154154
SubmitContainer.propTypes = {
155155
stages: PT.array,
156156
setStages: PT.func,
157-
completenessStyle: PT.string,
157+
progressStyle: PT.string,
158158
addedRoles: PT.array,
159159
matchingRole: PT.object,
160160
};
Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
/**
2+
* Progress Sidebar
3+
* Shows level of progress through skill
4+
* input process and contains a button for
5+
* searching for users or submitting the job.
6+
*/
7+
import Button from "components/Button";
8+
import React from "react";
9+
import cn from "classnames";
10+
import PT from "prop-types";
11+
import ProgressBar from "../ProgressBar";
12+
import "./styles.module.scss";
13+
import IconMultipleActionsCheck from "../../../../assets/images/icon-multiple-actions-check-2.svg";
14+
import IconListQuill from "../../../../assets/images/icon-list-quill.svg";
15+
import IconOfficeFileText from "../../../../assets/images/icon-office-file-text.svg";
16+
17+
function Progress({
18+
extraStyleName,
19+
isDisabled,
20+
onClick,
21+
buttonLabel,
22+
stages,
23+
percentage,
24+
}) {
25+
26+
let backgroundIcon
27+
if (extraStyleName === "input-skills") {
28+
backgroundIcon= <IconListQuill styleName="transparent-icon" />
29+
} else if (extraStyleName === "input-job-description") {
30+
backgroundIcon= <IconOfficeFileText styleName="transparent-icon" />
31+
} else {
32+
backgroundIcon= <IconMultipleActionsCheck styleName="transparent-icon" />
33+
}
34+
35+
return (
36+
<div styleName={cn("progress", extraStyleName)}>
37+
<ProgressBar percentDone={percentage} />
38+
<ul styleName="list">
39+
{stages.map((stage) => (
40+
<li
41+
styleName={cn("list-item", {
42+
active: stage.isCurrent,
43+
done: stage.completed,
44+
})}
45+
>
46+
{stage.name}
47+
</li>
48+
))}
49+
</ul>
50+
<Button
51+
size="medium"
52+
type="secondary"
53+
disabled={isDisabled}
54+
onClick={onClick}
55+
>
56+
{buttonLabel}
57+
</Button>
58+
{backgroundIcon}
59+
</div>
60+
);
61+
}
62+
63+
Progress.propTypes = {
64+
extraStyleName: PT.string,
65+
isDisabled: PT.bool,
66+
onClick: PT.func,
67+
buttonLabel: PT.string,
68+
currentStageIdx: PT.number,
69+
stages: PT.arrayOf(PT.string),
70+
};
71+
72+
export default Progress;
Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
@import "styles/include";
2+
3+
.progress {
4+
@include rounded-card;
5+
overflow: hidden;
6+
padding: 12px;
7+
position: relative;
8+
width: 250px;
9+
color: #fff;
10+
button {
11+
border: none;
12+
}
13+
}
14+
15+
.input-job-description {
16+
background-image: linear-gradient(135deg, #2984BD 0%, #0AB88A 100%);
17+
}
18+
19+
.input-skills {
20+
background-image: linear-gradient(221.5deg, #646CD0 0%, #9d41c9 100%);
21+
}
22+
23+
.role-selection {
24+
background-image: linear-gradient(45deg, #8B41B0 0%, #EF476F 100%);
25+
}
26+
27+
.list {
28+
margin-bottom: 55px;
29+
& + button[disabled] {
30+
background-color: #E9E9E9;
31+
color: #FFF;
32+
opacity: 1;
33+
filter: none;
34+
}
35+
}
36+
37+
.list-item {
38+
margin-bottom: 14px;
39+
font-size: 14px;
40+
line-height: 16px;
41+
font-weight: 400;
42+
43+
&:before {
44+
content: "";
45+
color: #fff;
46+
border: 1px solid #ffffff;
47+
border-radius: 100%;
48+
width: 16px;
49+
height: 16px;
50+
margin-right: 10px;
51+
display: block;
52+
float: left;
53+
}
54+
55+
&.active {
56+
font-weight: 500;
57+
&:before {
58+
background-color: #fff;
59+
}
60+
}
61+
62+
&.done {
63+
font-weight: 400;
64+
color: rgba(255, 255, 255, 0.6);
65+
&:before {
66+
content: "";
67+
font-size: 9px;
68+
line-height: 14px;
69+
padding-left: 2px;
70+
}
71+
}
72+
}
73+
74+
.transparent-icon {
75+
position: absolute;
76+
right: -50px;
77+
top: 85px;
78+
opacity: 10%;
79+
width: 144px;
80+
height: 144px;
81+
}

0 commit comments

Comments
 (0)