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

Commit 771088d

Browse files
authored
Merge pull request #250 from cagdas001/dev
feat(interview-scheduler): model updates based on updated schema
2 parents 253f5e2 + dd1c286 commit 771088d

File tree

3 files changed

+17
-11
lines changed

3 files changed

+17
-11
lines changed

src/routes/PositionDetails/components/InterviewDetailsPopup/index.jsx

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -57,13 +57,16 @@ function InterviewDetailsPopup({ open, onClose, candidate, openNext }) {
5757

5858
const onSubmitCallback = useCallback(
5959
async (formData) => {
60-
const attendeesList =
61-
formData.emails?.filter(
62-
(email) => typeof email === "string" && email.length > 0
63-
) || [];
60+
const hostEmail = formData.emails[0];
61+
const guestEmails =
62+
formData.emails
63+
.slice(1)
64+
.filter((email) => typeof email === "string" && email.length > 0) ||
65+
[];
6466
const interviewData = {
65-
xaiTemplate: formData.time,
66-
attendeesList,
67+
templateUrl: formData.time,
68+
hostEmail,
69+
guestEmails,
6770
};
6871

6972
try {

src/routes/PositionDetails/components/PrevInterviewItem/index.jsx

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,17 @@ import Accordion from "components/Accordion";
1010
import "./styles.module.scss";
1111

1212
function PrevInterviewItem(props) {
13-
const { date, round, emails } = props;
13+
const { date, round, hostEmail, guestEmails } = props;
1414

1515
return (
1616
<Accordion
1717
title={`Interview Round ${round}`}
1818
subhead={formatDate(date)}
19-
sidebar={`${emails.length} Attendees`}
19+
sidebar={`${guestEmails.length + 1} Attendees`}
2020
>
2121
<ul>
22-
{emails.map((email) => (
22+
<li styleName="email">{hostEmail}</li>
23+
{guestEmails.map((email) => (
2324
<li styleName="email">{email}</li>
2425
))}
2526
</ul>
@@ -30,7 +31,8 @@ function PrevInterviewItem(props) {
3031
PrevInterviewItem.propTypes = {
3132
date: PT.string.isRequired,
3233
round: PT.number.isRequired,
33-
emails: PT.arrayOf(PT.string).isRequired,
34+
hostEmail: PT.string.isRequired,
35+
guestEmails: PT.arrayOf(PT.string).isRequired,
3436
};
3537

3638
export default PrevInterviewItem;

src/routes/PositionDetails/components/PreviousInterviewsPopup/index.jsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ function PreviousInterviewsPopup(props) {
2424
key={interview.id}
2525
round={interview.round}
2626
date={interview.startTimestamp}
27-
emails={interview.attendeesList}
27+
hostEmail={interview.hostEmail}
28+
guestEmails={interview.guestEmails}
2829
/>
2930
));
3031
};

0 commit comments

Comments
 (0)