From 0c278597c03571f8c872a7ea56899b2625504d34 Mon Sep 17 00:00:00 2001 From: caadiq Date: Wed, 21 Jan 2026 11:50:13 +0900 Subject: [PATCH] =?UTF-8?q?=EB=8B=AC=EB=A0=A5=EC=97=90=EC=84=9C=20?= =?UTF-8?q?=EC=B9=B4=ED=85=8C=EA=B3=A0=EB=A6=AC=20=ED=95=84=ED=84=B0=20?= =?UTF-8?q?=EC=A0=81=EC=9A=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - PC/모바일 일정 페이지 달력의 점에 카테고리 필터 적용 - 선택된 카테고리의 일정만 달력에 점으로 표시 Co-Authored-By: Claude Opus 4.5 --- frontend/src/pages/mobile/public/Schedule.jsx | 8 ++++++-- frontend/src/pages/pc/public/Schedule.jsx | 6 ++++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/frontend/src/pages/mobile/public/Schedule.jsx b/frontend/src/pages/mobile/public/Schedule.jsx index f833d5e..e6ba6c3 100644 --- a/frontend/src/pages/mobile/public/Schedule.jsx +++ b/frontend/src/pages/mobile/public/Schedule.jsx @@ -686,9 +686,13 @@ function MobileSchedule() { const day = String(date.getDate()).padStart(2, '0'); const dateStr = `${year}-${month}-${day}`; - // 해당 날짜의 일정 목록 (최대 3개) + // 해당 날짜의 일정 목록 (최대 3개, 카테고리 필터 적용) const daySchedules = schedules - .filter(s => s.date?.split('T')[0] === dateStr) + .filter(s => { + const matchesDate = s.date?.split('T')[0] === dateStr; + const matchesCategory = selectedCategories.length === 0 || selectedCategories.includes(s.category_id); + return matchesDate && matchesCategory; + }) .slice(0, 3); return ( diff --git a/frontend/src/pages/pc/public/Schedule.jsx b/frontend/src/pages/pc/public/Schedule.jsx index c04d0d1..d32a097 100644 --- a/frontend/src/pages/pc/public/Schedule.jsx +++ b/frontend/src/pages/pc/public/Schedule.jsx @@ -804,11 +804,13 @@ function Schedule() { const dayOfWeek = (firstDay + i) % 7; const isToday = new Date().toDateString() === new Date(year, month, day).toDateString(); - // 해당 날짜의 일정 목록 (점 표시용, 최대 3개) + // 해당 날짜의 일정 목록 (점 표시용, 최대 3개, 카테고리 필터 적용) const daySchedules = schedules.filter(s => { const scheduleDate = s.date ? s.date.split('T')[0] : ''; const dateStr = `${year}-${String(month + 1).padStart(2, '0')}-${String(day).padStart(2, '0')}`; - return scheduleDate === dateStr; + const matchesDate = scheduleDate === dateStr; + const matchesCategory = selectedCategories.length === 0 || selectedCategories.includes(s.category_id); + return matchesDate && matchesCategory; }).slice(0, 3); return (