diff --git a/src/assets/icons/people.svg b/src/assets/icons/people.svg new file mode 100644 index 0000000..7b03b9e --- /dev/null +++ b/src/assets/icons/people.svg @@ -0,0 +1,4 @@ + + + + diff --git a/src/features/Calendar/components/CustomCalendar/CalendarModals.tsx b/src/features/Calendar/components/CustomCalendar/CalendarModals.tsx index 6d9bedd..3bf41dc 100644 --- a/src/features/Calendar/components/CustomCalendar/CalendarModals.tsx +++ b/src/features/Calendar/components/CustomCalendar/CalendarModals.tsx @@ -18,6 +18,7 @@ type CalendarModalsProps = { eventActions: { onEventColorChange: (eventId: CalendarEvent['id'], color: CalendarEvent['color']) => void onEventTitleConfirm: (eventId: CalendarEvent['id'], title: CalendarEvent['title']) => void + onEventSharedChange: (eventId: CalendarEvent['id'], isShared: boolean) => void onEventTypeChange: (eventId: CalendarEvent['id'], type: 'todo' | 'schedule') => void onEventTimingChange: ( eventId: CalendarEvent['id'], @@ -91,6 +92,7 @@ const DraftBackedModal = ({ onDraftChange={setDraftValues} onEventColorChange={eventActions.onEventColorChange} onEventTitleConfirm={eventActions.onEventTitleConfirm} + onEventSharedChange={eventActions.onEventSharedChange} onEventTypeChange={eventActions.onEventTypeChange} onEventTimingChange={eventActions.onEventTimingChange} /> diff --git a/src/features/Calendar/components/CustomCalendar/CustomCalendar.tsx b/src/features/Calendar/components/CustomCalendar/CustomCalendar.tsx index 2e59791..8f17620 100644 --- a/src/features/Calendar/components/CustomCalendar/CustomCalendar.tsx +++ b/src/features/Calendar/components/CustomCalendar/CustomCalendar.tsx @@ -100,6 +100,7 @@ const CustomCalendar = ({ onSelectedDateChange }: CustomCalendarProps) => { updateEventTiming, updateEventType, updateEventTitle, + updateEventShared, toggleEventDone, removeEvent, } = useCalendarEvents({ initialEvents: apiEvents }) @@ -494,10 +495,11 @@ const CustomCalendar = ({ onSelectedDateChange }: CustomCalendarProps) => { () => ({ onEventColorChange: updateEventColor, onEventTitleConfirm: updateEventTitle, + onEventSharedChange: updateEventShared, onEventTypeChange: updateEventType, onEventTimingChange: updateEventTiming, }), - [updateEventColor, updateEventTitle, updateEventType, updateEventTiming], + [updateEventColor, updateEventShared, updateEventTitle, updateEventType, updateEventTiming], ) useEffect(() => { onSelectedDateChange?.(selectedDate ?? date) diff --git a/src/features/Calendar/components/CustomEvent/CustomEvent.style.ts b/src/features/Calendar/components/CustomEvent/CustomEvent.style.ts index 7cf1ca3..d067623 100644 --- a/src/features/Calendar/components/CustomEvent/CustomEvent.style.ts +++ b/src/features/Calendar/components/CustomEvent/CustomEvent.style.ts @@ -98,7 +98,7 @@ export const WeekEventContainer = styled.div<{ export const EventTitle = styled.div` font-weight: 400; font-size: 12px; - width: 38px; + width: 75px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; diff --git a/src/features/Calendar/components/CustomEvent/CustomMonthEvent.tsx b/src/features/Calendar/components/CustomEvent/CustomMonthEvent.tsx index 960d96c..8f8b7f0 100644 --- a/src/features/Calendar/components/CustomEvent/CustomMonthEvent.tsx +++ b/src/features/Calendar/components/CustomEvent/CustomMonthEvent.tsx @@ -3,6 +3,8 @@ import { type MouseEvent, useRef, useState } from 'react' import type { EventProps } from 'react-big-calendar' import { createPortal } from 'react-dom' +import People from '@/assets/icons/people.svg?react' + import { getColorPalette } from '../../utils/colorPalette' import type { CalendarEvent } from '../CustomView/CustomDayView' import * as S from './CustomEvent.style' @@ -116,6 +118,14 @@ const CustomMonthEvent = ({ onToggleTodo?.(event.id) }} /> + ) : event.isShared ? ( +