Skip to content

Commit

Permalink
side by side view of calendar/info
Browse files Browse the repository at this point in the history
  • Loading branch information
ryu-kyu committed Jul 28, 2023
1 parent afff06b commit cd51b02
Showing 1 changed file with 6 additions and 34 deletions.
40 changes: 6 additions & 34 deletions frontend/src/components/Page/Staff/InterviewPage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -209,13 +209,13 @@ const InterviewPageMain = () => {
{/* Interview Calendar + Popup for Interview */}
<Grid
container
spacing={2}
direction="column"
spacing={1}
direction="row"
alignItems="center"
justifyContent="center"
columns={12}
>
<Grid xs={12}>
<Grid xs={6}>
<Container>
<InterviewCalendar
events={calendarData}
Expand All @@ -232,45 +232,17 @@ const InterviewPageMain = () => {
setSelectedCancelled(event.extendedProps.cancelled);
check_group(event.extendedProps.group_id);

console.log(event);

// For setting default values to old fields of change interview endpoint.
// setFilterInputFieldsObj({
// interview_id: event.extendedProps.id,
// booked: true,
// time: moment(event.start).format('YYYY-MM-DD HH:mm:ss'),
// date: moment(event.start).format('YYYY-MM-DD'),
// group_id: event.extendedProps.group_id,
// length: event.extendedProps.length,
// location: event.extendedProps.location,
// note: event.extendedProps.note,
// cancelled: event.extendedProps.cancelled
// });

// For setting default values to new fields of change interview endpoint.
// Used to render default values to input fields.
// setToNewFieldsObj({
// set_time: moment(event.start).format('YYYY-MM-DD HH:mm:ss'),
// set_group_id: event.extendedProps.group_id,
// set_length: event.extendedProps.length,
// set_location: event.extendedProps.location, // event.extendedProps.location
// set_note: event.extendedProps.note,
// set_cancelled: event.extendedProps.cancelled
// });
// TODO: In the case that some fields are omitted in sending, delete omitted fields.
// e.g. if set_time is not set to new value, delete set_time key from toNewFieldsObj.

setOpen(true);
}}
selectSlotHandler={(slotInfo) => setOpen(false)}
width={1000}
/>
</Container>
</Grid>
<Grid xs={12}>
<Grid xs>
{open && (
<Container>
<Card sx={{ pb: 0, mb: 4, width: 1000 }}>
<Card sx={{ pb: 0, mb: 4, width: '35vw' }}>
<CardContent sx={{ pb: 0 }}>
<Box>
<Grid container spacing={0}>
Expand Down Expand Up @@ -308,7 +280,7 @@ const InterviewPageMain = () => {
<CardItem title="Host" desc={selectedHost} />
<CardItem
title="Length"
desc={selectedLength.toString()}
desc={selectedLength.toString() + ' min.'}
/>
{selectedNote === null ? (
<div></div>
Expand Down

0 comments on commit cd51b02

Please sign in to comment.