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

Commit f9120c2

Browse files
authored
Merge pull request #514 from infinitycoders05/feature/interview-update
feat: schedule interview updates
2 parents 9d1d631 + 317edaf commit f9120c2

File tree

44 files changed

+2085
-368
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+2085
-368
lines changed

config/dev.js

+6
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,10 @@ 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+
/**
18+
* The interview api url is the mock server url.
19+
* This has to be replaced with the real url once the API is implemented.
20+
*/
21+
INTERVIEW_API_URL: "http://localhost:5555/",
1622
};
+3
Loading
+4
Loading
Loading

src/assets/images/icon-google.svg

+3
Loading
Loading

src/assets/images/icon-microsoft.svg

+3
Loading

src/assets/images/icon-plus.svg

+3
Loading

src/components/BaseModal/index.jsx

+39-14
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,15 @@
1010

1111
import React from "react";
1212
import PT from "prop-types";
13+
import cn from "classnames";
1314
import { Modal } from "react-responsive-modal";
1415
import Button from "../Button";
1516
import IconCross from "../../assets/images/icon-cross-light.svg";
1617
import "./styles.module.scss";
1718

1819
const modalStyle = {
1920
borderRadius: "8px",
20-
padding: "32px 32px 22px 32px",
21+
padding: "20px 24px",
2122
maxWidth: "640px",
2223
width: "100%",
2324
margin: 0,
@@ -28,6 +29,11 @@ const containerStyle = {
2829
padding: "10px",
2930
};
3031

32+
const closeButton = {
33+
right: "24px",
34+
top: "24px",
35+
};
36+
3137
function BaseModal({
3238
open,
3339
onClose,
@@ -37,31 +43,47 @@ function BaseModal({
3743
closeButtonText,
3844
disabled,
3945
extraModalStyle,
46+
alignTitleCenter = false,
47+
showButton = true,
48+
closeIcon: CloseIcon,
4049
}) {
4150
return (
4251
<Modal
4352
open={open}
4453
onClose={onClose}
45-
closeIcon={<IconCross width="15px" height="15px" />}
54+
closeIcon={
55+
CloseIcon ? CloseIcon : <IconCross width="15px" height="15px" />
56+
}
4657
styles={{
4758
modal: { ...modalStyle, ...extraModalStyle },
4859
modalContainer: containerStyle,
60+
closeButton,
4961
}}
5062
center={true}
5163
>
52-
{title && <h2 styleName="title">{title}</h2>}
53-
<div styleName="content">{children}</div>
54-
<div styleName="button-group">
55-
{button && button}
56-
<Button
57-
type="secondary"
58-
size="medium"
59-
onClick={onClose}
60-
disabled={disabled}
64+
{title && (
65+
<h2
66+
styleName={cn("title", {
67+
"center-title": alignTitleCenter,
68+
})}
6169
>
62-
{closeButtonText ? closeButtonText : "Cancel"}
63-
</Button>
64-
</div>
70+
{title}
71+
</h2>
72+
)}
73+
<div styleName="content">{children}</div>
74+
{showButton && (
75+
<div styleName="button-group">
76+
{button && button}
77+
<Button
78+
type="secondary"
79+
size="medium"
80+
onClick={onClose}
81+
disabled={disabled}
82+
>
83+
{closeButtonText ? closeButtonText : "Cancel"}
84+
</Button>
85+
</div>
86+
)}
6587
</Modal>
6688
);
6789
}
@@ -75,6 +97,9 @@ BaseModal.propTypes = {
7597
closeButtonText: PT.string,
7698
disabled: PT.bool,
7799
extraModalStyle: PT.object,
100+
showButton: PT.bool,
101+
alignTitleCenter: PT.bool,
102+
closeIcon: PT.node,
78103
};
79104

80105
export default BaseModal;

src/components/BaseModal/styles.module.scss

+13-3
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,24 @@ svg {
55
}
66

77
.title {
8-
@include font-barlow-condensed;
8+
@include font-barlow;
99
font-weight: normal;
10-
font-size: 34px;
11-
line-height: 40px;
10+
font-weight: 600;
11+
font-size: 24px;
12+
line-height: 24px;
1213
margin: 0 0 24px 0;
1314
overflow-wrap: anywhere;
1415
padding: 0;
1516
text-transform: uppercase;
17+
border-bottom: 2px solid #e9e9e9;
18+
padding-bottom: 20px;
19+
color: #2a2a2a;
20+
}
21+
22+
.center-title {
23+
text-align: center;
24+
border-bottom-color: transparent;
25+
margin-bottom: 0;
1626
}
1727

1828
.content {

src/components/Button/styles.module.scss

+11
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,17 @@
5252
text-transform: uppercase;
5353
}
5454

55+
.size-xSmall {
56+
border-radius: 15px;
57+
font-size: 10px;
58+
font-weight: 700;
59+
line-height: 24px;
60+
letter-spacing: 0.8px;
61+
height: 24px;
62+
padding: 0 11px;
63+
text-transform: uppercase;
64+
}
65+
5566
.type-primary {
5667
border: 1px solid #137d60;
5768
background-color: #137d60;

src/components/Select/index.jsx

+14-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import React, { useCallback } from "react";
2+
import cn from "classnames";
23
import PT from "prop-types";
34
import "./styles.module.scss";
45

@@ -13,9 +14,19 @@ const Select = ({ options, value, onChange, label, className }) => {
1314
return (
1415
<div styleName="select-wrapper" className={className}>
1516
{!!label && <label styleName="select-label">{label}</label>}
16-
<select value={value} onChange={onChangeHandler} styleName="select">
17+
<select
18+
value={value}
19+
onChange={onChangeHandler}
20+
styleName={cn("select", {
21+
"empty-value": value === "",
22+
})}
23+
>
1724
{options.map((option) => (
18-
<option key={option.value} value={option.value}>
25+
<option
26+
key={option.value}
27+
value={option.value}
28+
disabled={option.disabled}
29+
>
1930
{option.label}
2031
</option>
2132
))}
@@ -29,6 +40,7 @@ Select.propTypes = {
2940
PT.shape({
3041
label: PT.string.isRequired,
3142
value: PT.oneOfType([PT.string, PT.number]),
43+
disabled: PT.bool,
3244
})
3345
),
3446
value: PT.oneOfType([PT.string, PT.number]),

src/components/Select/styles.module.scss

+7-1
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,19 @@
99
border: 0;
1010
color: #2a2a2a;
1111
outline: none;
12-
font-size: 14px;
12+
font-size: 16px;
1313
height: 100%;
1414
line-height: 22px;
1515
padding-left: 15px;
1616
width: 100%;
1717
}
1818

19+
.empty-value {
20+
color: #aaaaaa;
21+
font-weight: 400;
22+
font-size: 16px;
23+
}
24+
1925
.select-wrapper {
2026
align-items: center;
2127
border: 1px solid #aaaaaa;
+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
import React from "react";
2+
import PT from "prop-types";
3+
import { TIME_ZONES } from "constants";
4+
import moment from "moment";
5+
import "./styles.module.scss";
6+
7+
const TimezoneSelector = ({ value, onChange }) => {
8+
return (
9+
<div styleName="timezone-selector">
10+
<div styleName="label">Interview Timezone</div>
11+
<select styleName="select" onChange={onChange}>
12+
{TIME_ZONES.map((zone) => (
13+
<option
14+
value={zone}
15+
selected={zone === value}
16+
>{`${zone} - UTC${moment().tz(zone).format("Z")}`}</option>
17+
))}
18+
</select>
19+
</div>
20+
);
21+
};
22+
23+
TimezoneSelector.propTypes = {
24+
value: PT.string,
25+
onChange: PT.func,
26+
};
27+
28+
export default TimezoneSelector;
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
@import "styles/include";
2+
3+
.select {
4+
/* Reset Select */
5+
appearance: none;
6+
outline: 0;
7+
border: 0;
8+
box-shadow: none;
9+
/* Personalize */
10+
@include font-roboto;
11+
flex: 1;
12+
color: #2a2a2a;
13+
margin-left: 10px;
14+
font-size: 16px;
15+
font-weight: 400;
16+
background-image: none;
17+
cursor: pointer;
18+
margin-bottom: 7px;
19+
}
20+
21+
/* Remove IE arrow */
22+
.select::-ms-expand {
23+
display: none;
24+
}
25+
26+
/* Custom Select wrapper */
27+
.timezone-selector {
28+
position: relative;
29+
display: flex;
30+
width: 384px;
31+
height: 48px;
32+
overflow: hidden;
33+
margin-top: 59px;
34+
flex-direction: column;
35+
border: 1px solid #aaaaaa;
36+
border-radius: 4px;
37+
}
38+
39+
.label {
40+
@include font-roboto;
41+
color: #137d60;
42+
font-weight: 500;
43+
font-size: 11px;
44+
margin-left: 10px;
45+
}
46+
47+
/* Arrow */
48+
.timezone-selector::after {
49+
content: "";
50+
position: absolute;
51+
background-image: url(../../assets/images/icon-down-arrow-black.svg);
52+
background-size: 16px;
53+
background-repeat: no-repeat;
54+
bottom: 10px;
55+
right: 10px;
56+
width: 16px;
57+
height: 16px;
58+
transition: 0.25s all ease;
59+
pointer-events: none;
60+
}
61+
62+
/* Transition */
63+
.timezone-selector:hover::after {
64+
color: #f39c12;
65+
}
66+
67+
@media (max-width: 420px) {
68+
.timezone-selector {
69+
width: 100%;
70+
}
71+
}

0 commit comments

Comments
 (0)