From 8e15cd6d2cbc146faa3fe1928ae41b436140e053 Mon Sep 17 00:00:00 2001 From: caadiq Date: Tue, 20 Jan 2026 16:17:54 +0900 Subject: [PATCH] =?UTF-8?q?refactor:=20UI=20=EA=B0=9C=EC=84=A0=20=EB=B0=8F?= =?UTF-8?q?=20=EB=82=A0=EC=A7=9C=20=EC=A0=9C=ED=95=9C=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 멤버 페이지에서 포지션 영역 제거 (PC/모바일) - 모바일 일정 페이지 멤버 표시 로직 API 응답에 맞게 수정 - 데이트픽커 연도 제한 2025 → 2017로 변경 - 2017년 1월에서 이전 달 버튼 비활성화 Co-Authored-By: Claude Opus 4.5 --- frontend/src/pages/mobile/public/Members.jsx | 9 +-- frontend/src/pages/mobile/public/Schedule.jsx | 70 ++++++++++--------- frontend/src/pages/pc/admin/AdminSchedule.jsx | 14 ++-- frontend/src/pages/pc/public/Members.jsx | 12 ++-- frontend/src/pages/pc/public/Schedule.jsx | 11 ++- 5 files changed, 59 insertions(+), 57 deletions(-) diff --git a/frontend/src/pages/mobile/public/Members.jsx b/frontend/src/pages/mobile/public/Members.jsx index cf4127e..5d46f17 100644 --- a/frontend/src/pages/mobile/public/Members.jsx +++ b/frontend/src/pages/mobile/public/Members.jsx @@ -178,16 +178,9 @@ function MobileMembers() { {member.name} - {/* 포지션 */} - {member.position && ( -

- {member.position} -

- )} - {/* 생일 정보 */} {member.birth_date && ( -
+
{member.birth_date?.slice(0, 10).replaceAll('-', '.')} diff --git a/frontend/src/pages/mobile/public/Schedule.jsx b/frontend/src/pages/mobile/public/Schedule.jsx index 09e9d3c..f833d5e 100644 --- a/frontend/src/pages/mobile/public/Schedule.jsx +++ b/frontend/src/pages/mobile/public/Schedule.jsx @@ -324,11 +324,16 @@ function MobileSchedule() { } }, [schedules, loading]); + // 2017년 1월 이전으로 이동 불가 + const canGoPrevMonth = !(selectedDate.getFullYear() === 2017 && selectedDate.getMonth() === 0); + // 월 변경 const changeMonth = (delta) => { + if (delta < 0 && !canGoPrevMonth) return; + const newDate = new Date(selectedDate); newDate.setMonth(newDate.getMonth() + delta); - + // 이번 달이면 오늘 날짜, 다른 달이면 1일 선택 const today = new Date(); if (newDate.getFullYear() === today.getFullYear() && newDate.getMonth() === today.getMonth()) { @@ -336,7 +341,7 @@ function MobileSchedule() { } else { newDate.setDate(1); } - + setSelectedDate(newDate); setCalendarViewDate(newDate); }; @@ -643,7 +648,11 @@ function MobileSchedule() { > -
@@ -1012,20 +1021,14 @@ function ScheduleCard({ schedule, categoryColor, categories, delay = 0, onClick {/* 멤버 */} {memberList.length > 0 && (
- {memberList.length >= 5 ? ( - - 프로미스나인 + {memberList.map((name, i) => ( + + {name.trim()} - ) : ( - memberList.map((name, i) => ( - - {name.trim()} - - )) - )} + ))}
)}
@@ -1091,20 +1094,14 @@ function TimelineScheduleCard({ schedule, categoryColor, categories, delay = 0, {/* 멤버 */} {memberList.length > 0 && (
- {memberList.length >= 5 ? ( - - 프로미스나인 + {memberList.map((name, i) => ( + + {name.trim()} - ) : ( - memberList.map((name, i) => ( - - {name.trim()} - - )) - )} + ))}
)} @@ -1166,7 +1163,10 @@ function CalendarPicker({ const year = viewDate.getFullYear(); const month = viewDate.getMonth(); - + + // 2017년 1월 이전으로 이동 불가 + const canGoPrevMonth = !(year === 2017 && month === 0); + // 달력 데이터 생성 함수 const getCalendarDays = useCallback((y, m) => { const firstDay = new Date(y, m, 1); @@ -1209,10 +1209,11 @@ function CalendarPicker({ }, []); const changeMonth = useCallback((delta) => { + if (delta < 0 && !canGoPrevMonth) return; const newDate = new Date(viewDate); newDate.setMonth(newDate.getMonth() + delta); setViewDate(newDate); - }, [viewDate]); + }, [viewDate, canGoPrevMonth]); const isToday = (date) => { const today = new Date(); @@ -1239,7 +1240,7 @@ function CalendarPicker({ } }; - const MIN_YEAR = 2025; + const MIN_YEAR = 2017; const [yearRangeStart, setYearRangeStart] = useState(MIN_YEAR); const yearRange = Array.from({ length: 12 }, (_, i) => yearRangeStart + i); const canGoPrevYearRange = yearRangeStart > MIN_YEAR; @@ -1450,9 +1451,10 @@ function CalendarPicker({ {/* 달력 헤더 - hideHeader일 때 숨김 */} {!hideHeader && (
- diff --git a/frontend/src/pages/pc/admin/AdminSchedule.jsx b/frontend/src/pages/pc/admin/AdminSchedule.jsx index 377b01c..1765c4d 100644 --- a/frontend/src/pages/pc/admin/AdminSchedule.jsx +++ b/frontend/src/pages/pc/admin/AdminSchedule.jsx @@ -291,8 +291,8 @@ function AdminSchedule() { const days = ['일', '월', '화', '수', '목', '금', '토']; const monthNames = ['1월', '2월', '3월', '4월', '5월', '6월', '7월', '8월', '9월', '10월', '11월', '12월']; - // 년도 범위 (2025년부터 시작, 12년 단위) - const MIN_YEAR = 2025; + // 년도 범위 (2017년부터 시작, 12년 단위) + const MIN_YEAR = 2017; const startYear = Math.max(MIN_YEAR, Math.floor(year / 12) * 12 - 1); const yearRange = Array.from({ length: 12 }, (_, i) => startYear + i); const canGoPrevYearRange = startYear > MIN_YEAR; @@ -456,8 +456,12 @@ function AdminSchedule() { return () => document.removeEventListener('mousedown', handleClickOutside); }, [showYearMonthPicker, showCategoryTooltip]); + // 2017년 1월 이전으로 이동 불가 + const canGoPrevMonth = !(year === 2017 && month === 0); + // 월 이동 const prevMonth = () => { + if (!canGoPrevMonth) return; setSlideDirection(-1); const newDate = new Date(year, month - 1, 1); setCurrentDate(newDate); @@ -485,7 +489,7 @@ function AdminSchedule() { } }; - // 년도 범위 이동 (12년 단위, 2025년 이전 불가) + // 년도 범위 이동 (12년 단위, 2017년 이전 불가) const prevYearRange = () => canGoPrevYearRange && setCurrentDate(new Date(Math.max(MIN_YEAR, year - 12), month, 1)); const nextYearRange = () => setCurrentDate(new Date(year + 12, month, 1)); @@ -698,8 +702,8 @@ function AdminSchedule() {
diff --git a/frontend/src/pages/pc/public/Members.jsx b/frontend/src/pages/pc/public/Members.jsx index a641b35..9f1fd85 100644 --- a/frontend/src/pages/pc/public/Members.jsx +++ b/frontend/src/pages/pc/public/Members.jsx @@ -64,10 +64,9 @@ function Members() { {/* 정보 */}
-

{member.name}

-

{member.position || '\u00A0'}

- -
+

{member.name}

+ +
{formatDate(member.birth_date, 'YYYY.MM.DD')}
@@ -123,9 +122,8 @@ function Members() { {/* 정보 */}
-

{member.name}

-

{member.position || '\u00A0'}

- +

{member.name}

+
{formatDate(member.birth_date, 'YYYY.MM.DD')} diff --git a/frontend/src/pages/pc/public/Schedule.jsx b/frontend/src/pages/pc/public/Schedule.jsx index 0c5c966..c04d0d1 100644 --- a/frontend/src/pages/pc/public/Schedule.jsx +++ b/frontend/src/pages/pc/public/Schedule.jsx @@ -395,7 +395,11 @@ function Schedule() { return scheduleDateMap.has(dateStr); }; + // 2017년 1월 이전으로 이동 불가 + const canGoPrevMonth = !(year === 2017 && month === 0); + const prevMonth = () => { + if (!canGoPrevMonth) return; setSlideDirection(-1); const newDate = new Date(year, month - 1, 1); setCurrentDate(newDate); @@ -567,8 +571,8 @@ function Schedule() { return year === now.getFullYear() && m === now.getMonth(); }; - // 연도 선택 범위 (2025년부터 시작) - const MIN_YEAR = 2025; + // 연도 선택 범위 + const MIN_YEAR = 2017; const [yearRangeStart, setYearRangeStart] = useState(MIN_YEAR); const yearRange = Array.from({ length: 12 }, (_, i) => yearRangeStart + i); const monthNames = ['1월', '2월', '3월', '4월', '5월', '6월', '7월', '8월', '9월', '10월', '11월', '12월']; @@ -652,7 +656,8 @@ function Schedule() {