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

Commit 4008477

Browse files
committed
fix: issue #598
1 parent c3e7974 commit 4008477

File tree

5 files changed

+54
-34
lines changed

5 files changed

+54
-34
lines changed

src/constants/index.js

+5
Original file line numberDiff line numberDiff line change
@@ -720,3 +720,8 @@ export const DEFAULT_SELECTED_DAYS = ["M", "T", "W", "R", "F"];
720720
* Actually it's not secret, we just use JWT to compress data not to secure it
721721
*/
722722
export const NYLAS_CONNECT_CALENDAR_JWT_SECRET = "secret";
723+
724+
/*
725+
* connecting calendar switcher
726+
*/
727+
export const ALLOW_CONNECTING_CALENDAR = false

src/routes/PositionDetails/components/InterviewPopup/ManageAvailability/index.jsx

+16-14
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import React, { useState, useEffect } from "react";
22
import cn from "classnames";
33
import PT from "prop-types";
44
import {
5+
ALLOW_CONNECTING_CALENDAR,
56
SCHEDULE_INTERVIEW_STEPS,
67
DAYS,
78
DEFAULT_SELECTED_DAYS,
@@ -245,21 +246,22 @@ const ManageAvailability = ({ scheduleDetails, onContinue }) => {
245246
</Button>
246247
</div>
247248
</div>
248-
249249
<div styleName="button-wrapper">
250-
{/* issue #598, hide `Manage connected calendar` button temporarily */}
251-
<div></div>
252-
{/* <div */}
253-
{/* onClick={() => */}
254-
{/* onContinue(POPUP_STAGES.MANAGE_CALENDAR, { */}
255-
{/* timezone, */}
256-
{/* slots, */}
257-
{/* }) */}
258-
{/* } */}
259-
{/* styleName="manage-calendar" */}
260-
{/* > */}
261-
{/* Manage connected calendar */}
262-
{/* </div> */}
250+
{ALLOW_CONNECTING_CALENDAR ? (
251+
<div
252+
onClick={() =>
253+
onContinue(POPUP_STAGES.MANAGE_CALENDAR, {
254+
timezone,
255+
slots,
256+
})
257+
}
258+
styleName="manage-calendar"
259+
>
260+
Manage connected calendar
261+
</div>
262+
) : (
263+
<div />
264+
)}
263265
<Button
264266
onClick={() => onContinueAhead()}
265267
disabled={isDisabled()}

src/routes/PositionDetails/components/InterviewPopup/ScheduleInterview/index.jsx

+16-8
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
import Button from "components/Button";
22
import PT from "prop-types";
3-
import { BUTTON_SIZE, POPUP_STAGES } from "constants";
3+
import {
4+
ALLOW_CONNECTING_CALENDAR,
5+
BUTTON_SIZE,
6+
POPUP_STAGES,
7+
} from "constants";
48

59
import React from "react";
610
import "./styles.module.scss";
@@ -21,13 +25,17 @@ const ScheduleInterview = ({ onClick }) => {
2125
>
2226
Add your availability
2327
</Button>
24-
<div styleName="or-label">OR</div>
25-
<Button
26-
size={BUTTON_SIZE.LARGE}
27-
onClick={() => onClick(POPUP_STAGES.CONNECT_CALENDAR)}
28-
>
29-
Connect your calendar
30-
</Button>
28+
{ALLOW_CONNECTING_CALENDAR && (
29+
<>
30+
<div styleName="or-label">OR</div>
31+
<Button
32+
size={BUTTON_SIZE.LARGE}
33+
onClick={() => onClick(POPUP_STAGES.CONNECT_CALENDAR)}
34+
>
35+
Connect your calendar
36+
</Button>
37+
</>
38+
)}
3139
</div>
3240
);
3341
};

src/routes/PositionDetails/components/InterviewPopup/ScheduleInterview/styles.module.scss

+2
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
align-items: center;
77
justify-content: center;
88
flex-direction: column;
9+
height: 147px;
10+
box-sizing: content-box;
911
}
1012

1113
.or-label {

src/routes/PositionDetails/components/InterviewPopup/SelectDuration/index.jsx

+15-12
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import Button from "components/Button";
55
import StepsIndicator from "../../StepsIndicator";
66
import InterviewTypeIcon from "../../../../../assets/images/icon-interview-type.svg";
77
import {
8+
ALLOW_CONNECTING_CALENDAR,
89
SCHEDULE_INTERVIEW_STEPS,
910
BUTTON_SIZE,
1011
BUTTON_TYPE,
@@ -71,18 +72,20 @@ const SelectDuration = ({ onContinue, onGoBack, scheduleDetails }) => {
7172
</div>
7273
</div>
7374
<div styleName="button-wrapper">
74-
{/* issue #598, hide `Manage connected calendar` button temporarily */}
75-
<div></div>
76-
{/* <div */}
77-
{/* onClick={() => */}
78-
{/* onContinue(POPUP_STAGES.MANAGE_CALENDAR, { */}
79-
{/* duration, */}
80-
{/* }) */}
81-
{/* } */}
82-
{/* styleName="manage-calendar" */}
83-
{/* > */}
84-
{/* Manage connected calendar */}
85-
{/* </div> */}
75+
{ALLOW_CONNECTING_CALENDAR ? (
76+
<div
77+
onClick={() =>
78+
onContinue(POPUP_STAGES.MANAGE_CALENDAR, {
79+
duration,
80+
})
81+
}
82+
styleName="manage-calendar"
83+
>
84+
Manage connected calendar
85+
</div>
86+
) : (
87+
<div />
88+
)}
8689
<div styleName="button-wrapper-right-pane">
8790
<Button
8891
styleName="back-button"

0 commit comments

Comments
 (0)