From bb78d1e6561134fd1365ff2c6bdf95ec43a7d73d Mon Sep 17 00:00:00 2001 From: Kjiw0n Date: Fri, 19 Jul 2024 06:46:59 +0900 Subject: [PATCH] =?UTF-8?q?refactor:=20=EC=BA=98=EB=A6=B0=EB=8D=94?= =?UTF-8?q?=EC=9D=98=20events=20=EB=A6=AC=ED=84=B4=20=EA=B0=9C=EC=84=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/common/fullCalendar/processEvents.tsx | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/components/common/fullCalendar/processEvents.tsx b/src/components/common/fullCalendar/processEvents.tsx index 66bedb79..a3622ca9 100644 --- a/src/components/common/fullCalendar/processEvents.tsx +++ b/src/components/common/fullCalendar/processEvents.tsx @@ -6,6 +6,10 @@ interface EventData { end: string; allDay?: boolean; classNames: string; + extendedProps: { + taskId: number; + timeBlockId: number | null; + }; } const processEvents = (timeBlockData: TimeBlockData): EventData[] => { @@ -19,6 +23,10 @@ const processEvents = (timeBlockData: TimeBlockData): EventData[] => { start: timeBlock.startTime, end: timeBlock.endTime, classNames: 'tasks', + extendedProps: { + taskId: task.id, + timeBlockId: timeBlock.id, + }, }); }); }); @@ -32,6 +40,10 @@ const processEvents = (timeBlockData: TimeBlockData): EventData[] => { end: schedule.endTime, allDay: schedule.allDay, classNames: 'schedule', + extendedProps: { + taskId: -1, // 구글 캘린더 이벤트에는 taskId가 없으므로 -1로 설정 + timeBlockId: null, + }, }); }); });