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

TaaS Intake - v2.01 #349

Merged
merged 21 commits into from
Jun 24, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
4b8ede8
Update styling of RoleDetailsModal.
mbaghel Jun 17, 2021
703fb73
Updates to behaviour of team description popup:
mbaghel Jun 17, 2021
64e0af5
Change matching rate to skills match. Add tooltip icon next to 'Add S…
mbaghel Jun 18, 2021
aeb5779
New styled Month Picker component.
mbaghel Jun 18, 2021
1437342
Merge pull request #332 from mbaghel/role-integration
nikolay83 Jun 21, 2021
4cf54b4
Merge pull request #337 from topcoder-platform/role-integration
nikolay83 Jun 21, 2021
07562ba
Allow user to delete positions in Team Details popup. Rename Roles to…
mbaghel Jun 21, 2021
1edd3e4
Fixed crash when empty object returned from /sendRoleSearchRequest
mbaghel Jun 21, 2021
23e6120
Do not allow submission when no matching profile found.
mbaghel Jun 21, 2021
5f8794b
Merge branch 'dev' into roles-finalfix
mbaghel Jun 21, 2021
21a5dd5
Merge pull request #341 from mbaghel/dev
nikolay83 Jun 21, 2021
491038e
Add job title to job description search page. Fixes for deleting sear…
mbaghel Jun 22, 2021
646093b
Add Skills Found popup to Job Description search page
mbaghel Jun 22, 2021
eead1c5
Add job title to request from Job Description page.
mbaghel Jun 22, 2021
1d1cc33
Fix placeholder centering in roles page and skills page.
mbaghel Jun 22, 2021
34ac8af
Change CreateNewTeam path to /taas/createnewteam. Fix placholder alig…
mbaghel Jun 22, 2021
9b376f0
Create custom number input. Small style fixes to Team Details Popup.
mbaghel Jun 23, 2021
cef072d
Merge pull request #345 from mbaghel/roles-finalfix
nikolay83 Jun 23, 2021
94e697f
Merge pull request #346 from topcoder-platform/roles-finalfix
nikolay83 Jun 23, 2021
bc4e276
Allow Submit Request on No Matching Profile page if positions already…
mbaghel Jun 23, 2021
7e1007a
Merge pull request #347 from mbaghel/dev
nikolay83 Jun 23, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 31 additions & 12 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
"prop-types": "^15.7.2",
"react": "^16.12.0",
"react-avatar": "^3.9.7",
"react-datepicker": "^3.4.1",
"react-datepicker": "^3.8.0",
"react-dom": "^16.12.0",
"react-final-form": "^6.5.2",
"react-final-form-arrays": "^3.1.3",
Expand Down
10 changes: 10 additions & 0 deletions src/assets/images/icon-information-circle.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
23 changes: 23 additions & 0 deletions src/assets/images/icon-thick-calendar.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions src/components/FormField/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ const FormField = ({ field }) => {
onBlur={input.onBlur}
onFocus={input.onFocus}
className={meta.error && meta.touched ? "error" : ""}
maxLength={field.maxLength}
/>
)}
{field.type === FORM_FIELD_TYPE.DATE && (
Expand Down
87 changes: 87 additions & 0 deletions src/components/InformationTooltip/index.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
/**
* Information Tooltip
* Icon which reveals a tooltip on mouse hover
*/
import React, { useCallback, useState } from "react";
import PT from "prop-types";
import { usePopper } from "react-popper";
import IconInformationCircle from "../../assets/images/icon-information-circle.svg";
import "./styles.module.scss";

function InformationTooltip({ text, iconSize = "16px" }) {
const [isTooltipShown, setIsTooltipShown] = useState(false);
const [referenceElement, setReferenceElement] = useState(null);
const [popperElement, setPopperElement] = useState(null);
const [arrowElement, setArrowElement] = useState(null);
const { styles, attributes } = usePopper(referenceElement, popperElement, {
placement: "top",
modifiers: [
{
name: "flip",
options: {
fallbackPlacements: ["top"],
},
},
{
name: "offset",
options: {
// use offset to move the tooltip slightly up
offset: [0, 12],
},
},
{
name: "arrow",
// padding should be equal to border-radius of the tooltip
options: { element: arrowElement, padding: 5 },
},
],
});

const showTooltip = useCallback(() => {
setIsTooltipShown(true);
}, []);

const hideTooltip = useCallback(() => {
setIsTooltipShown(false);
}, []);

const iconStyle = {
width: iconSize,
height: iconSize,
};

return (
<div>
<div
style={iconStyle}
ref={setReferenceElement}
onMouseEnter={showTooltip}
onMouseLeave={hideTooltip}
>
<IconInformationCircle styleName="circle" />
</div>
{isTooltipShown && (
<div
styleName="tooltip"
ref={setPopperElement}
style={styles.popper}
{...attributes.popper}
>
<div styleName="tooltip-content">{text}</div>
<div
styleName="tooltip-arrow"
ref={setArrowElement}
style={styles.arrow}
/>
</div>
)}
</div>
);
}

InformationTooltip.propTypes = {
iconSize: PT.string,
text: PT.string,
};

export default InformationTooltip;
34 changes: 34 additions & 0 deletions src/components/InformationTooltip/styles.module.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
@import "styles/include";

.circle {
* {
fill: #aaa;
}
}

.tooltip {
border-radius: 5px;
box-shadow: 0px 5px 25px #c6c6c6;
width: 165px;
z-index: 1000;
}

.tooltip-arrow {
bottom: -9px;
border-style: solid;
border-width: 10px 8px 0 8px;
border-color: #2a2a2a transparent transparent transparent;
height: 0;
width: 0;
}

.tooltip-content {
border-radius: 5px;
@include font-roboto;
font-size: 12px;
line-height: 16px;
font-weight: 400;
color: #fff;
background-color: #2a2a2a;
padding: 10px;
}
3 changes: 3 additions & 0 deletions src/components/MarkdownEditor/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,9 @@ const MarkdownEditor = (props) => {
]}
plugins={[]}
/>
{props.errorMessage && (
<div styleName="message">{props.errorMessage}</div>
)}
</div>
);
};
Expand Down
31 changes: 16 additions & 15 deletions src/components/MarkdownEditor/styles.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -12,21 +12,6 @@
overflow-y: auto;
background: #fafafb;
}
.message {
@include font-roboto;

width: 100%;
text-align: center;
min-height: 40px;
line-height: 20px;
padding: 9px 10px;
margin: 10px 0 5px;
font-size: 14px;
color: #ff5b52;
border: 1px solid #ffd5d1;
cursor: auto;
outline: none;
}
}
.editor-container {
:global {
Expand Down Expand Up @@ -72,3 +57,19 @@
}
}
}

.message {
@include font-roboto;

width: 100%;
text-align: center;
min-height: 40px;
line-height: 20px;
padding: 9px 10px;
margin: 10px 0 5px;
font-size: 14px;
color: #ff5b52;
border: 1px solid #ffd5d1;
cursor: auto;
outline: none;
}
45 changes: 45 additions & 0 deletions src/components/MonthPicker/index.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
/**
* Month Picker
* An styled input component for selecting date by month.
* Compatible with react-final-form
*/
import React from "react";
import PT from "prop-types";
import DatePicker from "react-datepicker";
import "./styles.module.scss";

function getCurrMonthYear() {
const now = new Date();
const year = now.getFullYear();
const month = now.getMonth();
return new Date(`${year}-${month + 1}`);
}

function MonthPicker({ name, value, onChange, onBlur, onFocus }) {
return (
<div styleName="month-picker">
<DatePicker
name={name}
selected={value}
onChange={onChange}
dateFormat="MMM, yyyy"
showMonthYearPicker
showPopperArrow={false}
onBlur={onBlur}
onFocus={onFocus}
popperPlacement="top-end"
showFourColumnMonthYearPicker
minDate={getCurrMonthYear()}
/>
</div>
);
}

MonthPicker.propTypes = {
name: PT.string,
value: PT.any,
onChange: PT.func,
onBlur: PT.func,
};

export default MonthPicker;
Loading