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

fix(interview-scheduler): P3 & P4 issues #264

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion src/assets/images/icon-check.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion src/assets/images/icon-cross-light.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion src/assets/images/icon-cross.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion src/assets/images/icon-moon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion src/assets/images/icon-resume.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion src/assets/images/icon-sun.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 3 additions & 1 deletion src/components/BaseModal/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ function BaseModal({
children,
title,
button,
closeButtonText,
disabled,
extraModalStyle,
}) {
Expand All @@ -58,7 +59,7 @@ function BaseModal({
onClick={onClose}
disabled={disabled}
>
Cancel
{closeButtonText ? closeButtonText : "Cancel"}
</Button>
</div>
</Modal>
Expand All @@ -71,6 +72,7 @@ BaseModal.propTypes = {
children: PT.node,
title: PT.string,
button: PT.element,
closeButtonText: PT.string,
disabled: PT.bool,
extraModalStyle: PT.object,
};
Expand Down
4 changes: 4 additions & 0 deletions src/components/BaseModal/styles.module.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
@import "styles/include";

svg {
pointer-events: none;
}

.title {
@include font-barlow-condensed;
font-weight: normal;
Expand Down
4 changes: 4 additions & 0 deletions src/components/MarkdownEditor/styles.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@
border: 1px solid #aaaaab;
border-radius: 4px;
overflow: hidden;
&:focus-within:not(.error) {
border-color: #55a5ff;
box-shadow: 0 0 2px 1px #cee6ff;
}
}

.te-toolbar-section {
Expand Down
3 changes: 1 addition & 2 deletions src/components/Select/styles.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
cursor: pointer;
appearance: none;
background: url("data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB3aWR0aD0iMTVweCIgaGVpZ2h0PSI5cHgiIHZpZXdCb3g9IjAgMCAxNSA5IiB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiPgogICAgPGcgaWQ9IlBhZ2UtMSIgc3Ryb2tlPSJub25lIiBzdHJva2Utd2lkdGg9IjEiIGZpbGw9Im5vbmUiIGZpbGwtcnVsZT0iZXZlbm9kZCI+CiAgICAgICAgPGcgaWQ9IjAyQi1DYW5kaWRhdGUtU2VsZWN0aW9uIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgtMTI3Ny4wMDAwMDAsIC0yMTYuMDAwMDAwKSIgZmlsbD0iIzEzN0Q2MCI+CiAgICAgICAgICAgIDxnIGlkPSJHcm91cC0zIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgzMDUuMDAwMDAwLCAxODIuMDAwMDAwKSI+CiAgICAgICAgICAgICAgICA8ZyBpZD0iVUktS2l0L0Zvcm1zL3RleHRib3gvZW1wdHkiI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jczNSA2Ljc5MjM4MTM4LDguMjg5MzA0NzggNi43OTEzNjEwMyw4LjI4ODI3OTk5IFoiIGlkPSJhcnJvdyI+PC9wYXRoPgogICAgICAgICAgICAgICAgICAgIDwvZz4KICAgICAgICAgICAgICAgIDwvZz4KICAgICAgICAgICAgPC9nPgogICAgICAgIDwvZz4KICAgIDwvZz4KPC9zdmc+Cg==")
no-repeat center right;
no-repeat 96% center;
border: 0;
color: #2a2a2a;
outline: none;
Expand All @@ -23,7 +23,6 @@
border-radius: 6px;
display: flex;
height: 40px;
padding-right: 15px;
position: relative;
}

Expand Down
2 changes: 1 addition & 1 deletion src/components/SkillsSummary/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const SkillsSummary = ({ skills, requiredSkills = [], limit }) => {
<div>
<div styleName="percentage">
<PercentageBar ratio={skillsMatchedRatio} styleName="percentage-bar" />
{Math.round(skillsMatchedRatio * 100)}% skill matched
{Math.round(skillsMatchedRatio * 100)}% skills matched
</div>
<SkillsList
skills={skills}
Expand Down
11 changes: 10 additions & 1 deletion src/constants/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@
*/
export const DAY_FORMAT = "MM/DD/YYYY";

/**
* Date with time format
*/
export const DATE_WITH_TIME_FORMAT = "MM/DD/YYYY HH:mm";

/**
* How many team member show per page by default
*/
Expand Down Expand Up @@ -123,24 +128,28 @@ export const CANDIDATE_STATUS_FILTERS = [
key: CANDIDATE_STATUS_FILTER_KEY.TO_REVIEW,
buttonText: "To Review",
title: "Candidates to Review",
noCandidateMessage: "No Candidates To Review",
statuses: [CANDIDATE_STATUS.OPEN],
},
{
key: CANDIDATE_STATUS_FILTER_KEY.INTERESTED,
buttonText: "Interviews",
title: "Interviews",
noCandidateMessage: "No Interviews",
statuses: [CANDIDATE_STATUS.INTERVIEW],
},
{
key: CANDIDATE_STATUS_FILTER_KEY.SELECTED,
buttonText: "Selected",
title: "Selected",
noCandidateMessage: "No Selected Candidates",
statuses: [CANDIDATE_STATUS.SELECTED],
},
{
key: CANDIDATE_STATUS_FILTER_KEY.NOT_INTERESTED,
buttonText: "Declined",
title: "Declined",
noCandidateMessage: "No Declined Candidates",
statuses: [
CANDIDATE_STATUS.CLIENT_REJECTED_SCREENING,
CANDIDATE_STATUS.CLIENT_REJECTED_INTERVIEW,
Expand All @@ -162,7 +171,7 @@ export const CANDIDATES_SORT_BY = {
* Candidates "sort by" select options
*/
export const CANDIDATES_SORT_OPTIONS = [
{ label: "Skill Matched", value: CANDIDATES_SORT_BY.SKILL_MATCHED },
{ label: "Skills Matched", value: CANDIDATES_SORT_BY.SKILL_MATCHED },
{ label: "Handle", value: CANDIDATES_SORT_BY.HANDLE },
];

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,12 @@ function InterviewDetailsPopup({ open, onClose, candidate, openNext }) {
candidate.interviews.length >= MAX_ALLOWED_INTERVIEWS
) {
return (
<BaseModal open={open} onClose={onClose} title="Schedule an Interview">
<BaseModal
open={open}
onClose={onClose}
closeButtonText="Close"
title="Schedule an Interview"
>
<p styleName="exceeds-max-number-txt">
You've reached the cap of {MAX_ALLOWED_INTERVIEWS} interviews with
this candidate. Now please make your decision to Select and Decline
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import React from "react";
import PT from "prop-types";
import "./styles.module.scss";
import { formatDate } from "utils/format";
import { formatInterviewDate } from "utils/format";

function LatestInterview({ interviews }) {
if (!interviews || !interviews.length) {
Expand All @@ -19,7 +19,7 @@ function LatestInterview({ interviews }) {
<>
<p styleName="small">Interview Round {latestInterview.round}</p>
<p styleName="strong">{latestInterview.status}</p>
<p>{formatDate(latestInterview.startTimestamp)}</p>
<p>{formatInterviewDate(latestInterview.startTimestamp)}</p>
</>
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ const PositionCandidates = ({ position, statusFilterKey, updateCandidate }) => {
/>

{filteredCandidates.length === 0 && (
<div styleName="no-candidates">No {statusFilter.title}</div>
<div styleName="no-candidates">{statusFilter.noCandidateMessage}</div>
)}
{filteredCandidates.length > 0 && (
<div styleName="table">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*/
import React from "react";
import PT from "prop-types";
import { formatDate } from "utils/format";
import { formatInterviewDate } from "utils/format";
import Accordion from "components/Accordion";
import "./styles.module.scss";

Expand All @@ -15,7 +15,7 @@ function PrevInterviewItem(props) {
return (
<Accordion
title={`Interview Round ${round}`}
subhead={formatDate(date)}
subhead={formatInterviewDate(date)}
sidebar={`${guestEmails.length + 1} Attendees`}
>
<ul>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,13 +70,13 @@ const SelectCandidatePopup = ({
) : (
<>
<p>
You have selected this applicant - you want this member on your
You have selected this candidate - you want this member on your
team! What happens next:
</p>
<ol>
<li>
Upon confirmation, Topcoder will confirm the arrangement with
the selected member
the selected candidate
</li>
<li>
A Topcoder Rep will contact you with details on the work
Expand Down
3 changes: 3 additions & 0 deletions src/styles/main.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,7 @@
.topcoder-micro-frontends-teams-app {
@include font-roboto;
color: #2a2a2a;
svg {
pointer-events: none;
}
}
18 changes: 14 additions & 4 deletions src/utils/format.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import _ from "lodash";
import { RATE_TYPE } from "constants";
import { EMAIL_REQUEST_EXTENSION, CONNECT_WEBSITE_URL } from "../../config";
import moment from "moment";
import { DAY_FORMAT } from "constants/";
import { DAY_FORMAT, DATE_WITH_TIME_FORMAT } from "constants/";

/**
* Format URL to the project (team) in Connect App.
Expand Down Expand Up @@ -233,11 +233,11 @@ export const formatDateRange = (startDate, endDate) => {
* Format date
*
* @param {string|Date|moment.Moment} date date
*
* @param {string} format date/time format
* @returns {string} formatted date range
*/
export const formatDate = (date) => {
const dateStr = date ? moment(date).format(DAY_FORMAT) : "";
export const formatDate = (date, format = DAY_FORMAT) => {
const dateStr = date ? moment(date).format(format) : "";

if (!dateStr) {
return "TBD";
Expand All @@ -246,6 +246,16 @@ export const formatDate = (date) => {
return `${dateStr}`;
};

/**
* Format interview date/time.
*
* @param {string|Date|moment.Moment} date date
* @returns {string} formatted date
*/
export const formatInterviewDate = (date) => {
return formatDate(date, DATE_WITH_TIME_FORMAT);
};

/**
* Format page title to show in the browser header.
*
Expand Down