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

Commit 1f8683b

Browse files
committed
cleanup and documentation
1 parent 4bc2baa commit 1f8683b

File tree

11 files changed

+86
-1
lines changed

11 files changed

+86
-1
lines changed

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

+5
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
/**
2+
* Landing Box
3+
* An option for the Create New Team
4+
* landing page
5+
*/
16
import React from "react";
27
import PT from "prop-types";
38
import "./styles.module.scss";

src/routes/CreateNewTeam/index.jsx

+7-1
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,20 @@
1+
/**
2+
* Create New Team
3+
* Landing page for creating new teams
4+
* by selecting a role, inputting skills,
5+
* or inputting a job description
6+
*/
17
import React from "react";
28
import { navigate } from "@reach/router";
39
import _ from "lodash";
10+
import { toastr } from "react-redux-toastr";
411
import Page from "components/Page";
512
import PageHeader from "components/PageHeader";
613
import LandingBox from "./components/LandingBox";
714
import IconMultipleActionsCheck from "../../assets/images/icon-multiple-actions-check-2.svg";
815
import IconListQuill from "../../assets/images/icon-list-quill.svg";
916
import IconOfficeFileText from "../../assets/images/icon-office-file-text.svg";
1017
import { postProject } from "services/teams";
11-
import { toastr } from "react-redux-toastr";
1218

1319
function CreateNewTeam() {
1420
const createProject = async () => {

src/routes/InputSkills/components/AddAnotherModal/index.jsx

+6
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
/**
2+
* Add Another Modal
3+
* Popup that appears after submitting job.
4+
* Shows loading spinner while job submits and
5+
* allows navigation to "Add another role".
6+
*/
17
import React from "react";
28
import PT from "prop-types";
39
import Modal from "react-responsive-modal";

src/routes/InputSkills/components/CompleteProgress/index.jsx

+5
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
/**
2+
* Complete Progress Tracker
3+
* Graphical representation of
4+
* completeness percentage for skill input.
5+
*/
16
import React from "react";
27
import PT from "prop-types";
38
import "./styles.module.scss";

src/routes/InputSkills/components/Completeness/index.jsx

+14
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
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+
*/
17
import Button from "components/Button";
28
import React from "react";
39
import cn from "classnames";
10+
import PT from "prop-types";
411
import CompleteProgress from "../CompleteProgress";
512
import "./styles.module.scss";
613
import IconListQuill from "../../../../assets/images/icon-list-quill.svg";
@@ -47,4 +54,11 @@ function Completeness({ isDisabled, onClick, buttonLabel, stage }) {
4754
);
4855
}
4956

57+
Completeness.propTypes = {
58+
isDisabled: PT.bool,
59+
onClick: PT.func,
60+
buttonLabel: PT.string,
61+
stage: PT.number,
62+
};
63+
5064
export default Completeness;

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

+6
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
/**
2+
* Result Card
3+
* Card that appears after searching for
4+
* users matching given skills. Gives information
5+
* about costs and number of matching candidates.
6+
*/
17
import React, { useState } from "react";
28
import "./styles.module.scss";
39
import IconEarthCheck from "../../../../assets/images/icon-earth-check.svg";

src/routes/InputSkills/components/SearchCard/index.jsx

+5
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
/**
2+
* Search Card
3+
* A card that simulates searching for users
4+
* that match the given skills.
5+
*/
16
import React, { useEffect, useState } from "react";
27
import "./styles.module.scss";
38
import IconEarthSearch from "../../../../assets/images/icon-earth-search.svg";

src/routes/InputSkills/components/SkillItem/index.jsx

+5
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
/**
2+
* Skill Item
3+
* An item for the Skill List component.
4+
* Shows an image and the name of the skill.
5+
*/
16
import React from "react";
27
import PT from "prop-types";
38
import IconQuestionCircle from "../../../../assets/images/icon-question-circle.svg";

src/routes/InputSkills/components/SkillsList/index.jsx

+13
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
1+
/**
2+
* Skills List
3+
* Lists all skills available to apply to a job
4+
* and search for. Allows selecting skills and filtering
5+
* by name.
6+
*/
17
import React, { useEffect, useState } from "react";
28
import { useDebounce } from "react-use";
9+
import PT from "prop-types";
310
import Input from "components/Input";
411
import PageHeader from "components/PageHeader";
512
import "./styles.module.scss";
@@ -65,4 +72,10 @@ function SkillsList({ skills, selectedSkills, toggleSkill }) {
6572
);
6673
}
6774

75+
SkillsList.propTypes = {
76+
skills: PT.array,
77+
selectedSkills: PT.array,
78+
toggleSkill: PT.func,
79+
};
80+
6881
export default SkillsList;

src/routes/InputSkills/index.jsx

+15
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,17 @@
1+
/**
2+
* Input Skills page
3+
* Page that user reaches after choosing to input job skills.
4+
*
5+
* Gets a project id from the router.
6+
*
7+
* Allows selecting a number of skills, searching for users
8+
* with those skills, and submitting a job requiring the skills.
9+
*/
110
import React, { useCallback, useEffect, useState } from "react";
211
import { useData } from "hooks/useData";
312
import { navigate } from "@reach/router";
413
import { toastr } from "react-redux-toastr";
14+
import PT from "prop-types";
515
import SkillsList from "./components/SkillsList";
616
import Completeness from "./components/Completeness";
717
import "./styles.module.scss";
@@ -60,6 +70,7 @@ function InputSkills({ projectId }) {
6070
[selectedSkills]
6171
);
6272

73+
// mocked search for users with given skills
6374
const search = () => {
6475
setSearchState("searching");
6576
searchTimer = setTimeout(() => {
@@ -108,4 +119,8 @@ function InputSkills({ projectId }) {
108119
);
109120
}
110121

122+
InputSkills.propTypes = {
123+
projectId: PT.string,
124+
};
125+
111126
export default InputSkills;

src/routes/SelectRole/index.jsx

+5
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
/**
2+
* Select Role
3+
* Page for selecting a role to add to your team
4+
*/
5+
16
import React from "react";
27

38
function SelectRole() {

0 commit comments

Comments
 (0)