Skip to content
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
1 change: 1 addition & 0 deletions components/calendar/CalendarLayout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ const CalendarLayout = ({
'private',
currentDate
);

const scheduleData = [...PublicSchedule, ...PrivateSchedule];
const handleNavigate = (date: Date) => {
setCurrentDate(date);
Expand Down
13 changes: 9 additions & 4 deletions components/calendar/CustomCalendar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,17 @@ const CustomCalendar = styled.div`
justify-content: center;
align-items: center;
position: relative;
overflow: auto;

.rbc-calendar {
width: 95%;
height: 100%;
background-color: white;
padding: 2rem 1rem 1rem 1rem;
position: absolute;
overflow: auto;
padding: 1rem;
position: relative;
display: flex;
flex-direction: column;
height: 85vh;
overflow: hidden;
}

.rbc-header {
Expand All @@ -35,6 +38,8 @@ const CustomCalendar = styled.div`
}

.rbc-month-view {
flex-grow: 1;
overflow-y: auto;
border-left: none;
border-right: none;
border-top: 1px solid #e8ebfc;
Expand Down
23 changes: 21 additions & 2 deletions components/calendar/sidebar/CalendarSidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,13 @@ const CalendarSidebar = ({
...updateGroup,
title: value!,
},
() => {
setUpdatedPrivateGroups((prev) =>
prev.map((group) =>
group.id === id ? { ...group, title: value || '' } : group
)
);
},
(error: string) => {
setSnackbar({
toastName: 'post error',
Expand All @@ -84,6 +91,13 @@ const CalendarSidebar = ({
...updateGroup,
backgroundColor: value!,
},
() => {
setUpdatedPrivateGroups((prev) =>
prev.map((group) =>
group.id === id ? { ...group, title: value || '' } : group
)
);
},
(error: string) => {
setSnackbar({
toastName: 'post error',
Expand All @@ -105,7 +119,12 @@ const CalendarSidebar = ({
'DELETE',
`custom/${id}`,
deleteGroup,
(error: string) => {
() => {
setUpdatedPrivateGroups((prev) =>
prev.filter((group) => group.id !== id)
);
},
() => {
setSnackbar({
toastName: 'post error',
severity: 'error',
Expand All @@ -115,8 +134,8 @@ const CalendarSidebar = ({
}
);
}
return prev.filter((group) => group.id !== id);
}

return prev;
});
};
Expand Down
3 changes: 3 additions & 0 deletions pages/calendar/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,9 @@ const CalendarPage: NextPage = () => {
filterList: ScheduleFilter
) => {
return schedules.filter((schedule) => {
if (schedule.status === 'DELETE') {
return false;
}
const isPublicMatch = filterList.public.includes(
schedule.classification!
);
Expand Down
6 changes: 4 additions & 2 deletions styles/calendar/Calendar.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
max-width: 100%;
height: 100%;
flex-direction: row;
// overflow: hidden;
// overflow: scroll;
background-color: #f9f9fc;
border-radius: 0.5rem;
}
Expand All @@ -23,7 +23,9 @@
position: relative;
display: flex;
width: 100%;
margin: 4rem 2rem 2.5rem;
// height: 100%;
margin: 1.5rem;
overflow: scroll;
background-color: white;
border-radius: 0.5rem;
box-shadow: 0 0 10px #ebedf6;
Expand Down
1 change: 1 addition & 0 deletions styles/calendar/modal/AddSelect.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
z-index: 5;
width: 120px;
padding: 5px;
cursor: default;
background-color: #f3f3ff;
border-radius: 5px;
box-shadow: rgba(99, 99, 99, 0.2) 0px 4px 4px 0px;
Expand Down