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

Commit bcf0307

Browse files
authored
Merge pull request #286 from cagdas001/feature/role-intake
feat(create-new-team): role intake module
2 parents d176a3a + 8b139d3 commit bcf0307

File tree

40 files changed

+1639
-256
lines changed

40 files changed

+1639
-256
lines changed

src/assets/images/icon-earth-x.svg

+13
Loading
+17
Loading

src/assets/images/icon-search.svg

+18
Loading

src/root.component.jsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@ import JobDetails from "./routes/JobDetails";
1010
import JobForm from "./routes/JobForm";
1111
import TeamAccess from "./routes/TeamAccess";
1212
import CreateNewTeam from "./routes/CreateNewTeam";
13-
import InputSkills from "./routes/InputSkills";
13+
import InputSkills from "./routes/CreateNewTeam/pages/InputSkills";
14+
import SelectRole from "./routes/CreateNewTeam/pages/SelectRole";
1415
import ReduxToastr from "react-redux-toastr";
1516
import store from "./store";
1617
import "./styles/main.vendor.scss";
1718
import styles from "./styles/main.module.scss";
18-
import SelectRole from "./routes/SelectRole";
1919

2020
export default function Root() {
2121
return (

src/routes/InputSkills/components/AddAnotherModal/index.jsx renamed to src/routes/CreateNewTeam/components/AddAnotherModal/index.jsx

+13-2
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,13 @@ const containerStyle = {
2626
padding: "10px",
2727
};
2828

29-
function AddAnotherModal({ open, onClose, submitDone, addAnother }) {
29+
function AddAnotherModal({
30+
open,
31+
onClose,
32+
onContinueClick,
33+
submitDone,
34+
addAnother,
35+
}) {
3036
return (
3137
<Modal
3238
open={open}
@@ -63,7 +69,12 @@ function AddAnotherModal({ open, onClose, submitDone, addAnother }) {
6369
>
6470
Add Another Position
6571
</Button>
66-
<Button type="primary" size="medium" disabled={!submitDone}>
72+
<Button
73+
type="primary"
74+
size="medium"
75+
onClick={onContinueClick}
76+
disabled={!submitDone}
77+
>
6778
Continue
6879
</Button>
6980
</div>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
/**
2+
* CircularProgressBar component.
3+
* Displays a circular progress bar.
4+
* Size and strokeWidth are customizable.
5+
* Allows appending children inside bar.
6+
*/
7+
import React, { useEffect, useState, useRef } from "react";
8+
import PT from "prop-types";
9+
10+
const CircularProgressBar = ({ size, progress, children, strokeWidth }) => {
11+
const [offset, setOffset] = useState(0);
12+
const circleRef = useRef(null);
13+
const center = size / 2;
14+
const radius = size / 2 - strokeWidth / 2;
15+
const circumference = 2 * Math.PI * radius;
16+
useEffect(() => {
17+
const progressOffset = ((100 - progress) / 100) * circumference;
18+
setOffset(progressOffset);
19+
circleRef.current.style = "transition: stroke-dashoffset 850ms ease-in-out";
20+
}, [setOffset, progress, circumference, offset]);
21+
return (
22+
<>
23+
<svg width={size} height={size}>
24+
<circle
25+
stroke="lightgray"
26+
fill="transparent"
27+
cx={center}
28+
cy={center}
29+
r={radius}
30+
strokeWidth={strokeWidth}
31+
/>
32+
<circle
33+
ref={circleRef}
34+
stroke="#219174"
35+
fill="transparent"
36+
cx={center}
37+
cy={center}
38+
r={radius}
39+
strokeWidth={strokeWidth}
40+
strokeDasharray={circumference}
41+
strokeDashoffset={offset}
42+
/>
43+
<foreignObject x="35" y="50" width={size * 0.6} height={size * 0.6}>
44+
{children ? children : `${progress}%`}
45+
</foreignObject>
46+
</svg>
47+
</>
48+
);
49+
};
50+
51+
CircularProgressBar.propTypes = {
52+
size: PT.number.isRequired,
53+
progress: PT.number.isRequired,
54+
children: PT.node,
55+
strokeWidth: PT.number.isRequired,
56+
};
57+
58+
export default CircularProgressBar;
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
/**
2+
* Completeness Sidebar
3+
* Shows level of completeness 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 CompleteProgress from "../CompleteProgress";
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+
16+
function Completeness({
17+
extraStyleName,
18+
isDisabled,
19+
onClick,
20+
buttonLabel,
21+
stages,
22+
percentage,
23+
}) {
24+
return (
25+
<div styleName={cn("completeness", extraStyleName)}>
26+
<CompleteProgress percentDone={percentage} />
27+
<ul styleName="list">
28+
{stages.map((stage) => (
29+
<li
30+
styleName={cn("list-item", {
31+
active: stage.isCurrent,
32+
done: stage.completed,
33+
})}
34+
>
35+
{stage.name}
36+
</li>
37+
))}
38+
</ul>
39+
<Button
40+
size="medium"
41+
type="secondary"
42+
disabled={isDisabled}
43+
onClick={onClick}
44+
>
45+
{buttonLabel}
46+
</Button>
47+
{extraStyleName === "input-skills" ? (
48+
<IconListQuill styleName="transparent-icon" />
49+
) : (
50+
<IconMultipleActionsCheck styleName="transparent-icon" />
51+
)}
52+
</div>
53+
);
54+
}
55+
56+
Completeness.propTypes = {
57+
extraStyleName: PT.string,
58+
isDisabled: PT.bool,
59+
onClick: PT.func,
60+
buttonLabel: PT.string,
61+
currentStageIdx: PT.number,
62+
stages: PT.arrayOf(PT.string),
63+
};
64+
65+
export default Completeness;

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

+12-2
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,19 @@
44
@include rounded-card;
55
padding: 12px;
66
position: relative;
7-
background-image: linear-gradient(221.5deg, #2c95d7 0%, #9d41c9 100%);
87
width: 250px;
98
color: #fff;
9+
button {
10+
border: none;
11+
}
12+
}
13+
14+
.input-skills {
15+
background-image: linear-gradient(221.5deg, #2c95d7 0%, #9d41c9 100%);
16+
}
17+
18+
.role-selection {
19+
background-image: linear-gradient(45deg, #8B41B0 0%, #EF476F 100%);
1020
}
1121

1222
.list {
@@ -43,7 +53,7 @@
4353
content: "";
4454
font-size: 9px;
4555
line-height: 14px;
46-
padding-left: 2px;
56+
padding-left: 3px;
4757
}
4858
}
4959
}

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

+3
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@
1616
align-items: center;
1717
position: relative;
1818
z-index: 10;
19+
button {
20+
border: none;
21+
}
1922
}
2023

2124
.title {
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
/**
2+
* No Matching Profiles Result Card
3+
* Card that appears when there are no matching profiles after searching.
4+
*/
5+
import React from "react";
6+
import { navigate } from "@reach/router";
7+
import "./styles.module.scss";
8+
import IconEarthX from "../../../../assets/images/icon-earth-x.svg";
9+
import Curve from "../../../../assets/images/curve.svg";
10+
import Button from "components/Button";
11+
12+
function NoMatchingProfilesResultCard() {
13+
return (
14+
<div styleName="result-card">
15+
<div styleName="heading">
16+
<IconEarthX />
17+
<h3>No Matching Profiles</h3>
18+
<Curve styleName="curve" />
19+
<IconEarthX styleName="transparent-icon" />
20+
</div>
21+
<div styleName="content">
22+
<p styleName="info-txt">
23+
We will be looking internally for members matching your requirements
24+
and be back at them in about 2 weeks.
25+
</p>
26+
<div styleName="niche-rate-box">
27+
<p>Niche Rate</p>
28+
<p styleName="cost">$1,200</p>
29+
<p>/Week</p>
30+
</div>
31+
<Button
32+
onClick={() => navigate("/taas/myteams/createnewteam")}
33+
type="secondary"
34+
styleName="button"
35+
>
36+
Modify Search Criteria
37+
</Button>
38+
</div>
39+
</div>
40+
);
41+
}
42+
43+
export default NoMatchingProfilesResultCard;

0 commit comments

Comments
 (0)