fix: Schedule 페이지 오류 수정 및 년월 선택 스타일 통일
- Schedule.jsx: yearRange, monthNames 변수 누락 수정 - Schedule.jsx, AdminSchedule.jsx: 현재 년도/월 테두리 제거, 글씨색만 유지 - CustomDatePicker.jsx: 동일 스타일 적용
This commit is contained in:
parent
7867eb8928
commit
8424c3422d
2 changed files with 8 additions and 6 deletions
|
|
@ -794,7 +794,7 @@ function AdminSchedule() {
|
||||||
year === y
|
year === y
|
||||||
? 'bg-primary text-white'
|
? 'bg-primary text-white'
|
||||||
: isCurrentYear(y) && year !== y
|
: isCurrentYear(y) && year !== y
|
||||||
? 'border border-primary text-primary hover:bg-primary/10'
|
? 'text-primary font-medium hover:bg-primary/10'
|
||||||
: 'hover:bg-gray-100 text-gray-700'
|
: 'hover:bg-gray-100 text-gray-700'
|
||||||
}`}
|
}`}
|
||||||
>
|
>
|
||||||
|
|
@ -814,7 +814,7 @@ function AdminSchedule() {
|
||||||
month === i
|
month === i
|
||||||
? 'bg-primary text-white'
|
? 'bg-primary text-white'
|
||||||
: isCurrentMonth(i) && month !== i
|
: isCurrentMonth(i) && month !== i
|
||||||
? 'border border-primary text-primary hover:bg-primary/10'
|
? 'text-primary font-medium hover:bg-primary/10'
|
||||||
: 'hover:bg-gray-100 text-gray-700'
|
: 'hover:bg-gray-100 text-gray-700'
|
||||||
}`}
|
}`}
|
||||||
>
|
>
|
||||||
|
|
@ -844,7 +844,7 @@ function AdminSchedule() {
|
||||||
month === i
|
month === i
|
||||||
? 'bg-primary text-white'
|
? 'bg-primary text-white'
|
||||||
: isCurrentMonth(i) && month !== i
|
: isCurrentMonth(i) && month !== i
|
||||||
? 'border border-primary text-primary hover:bg-primary/10'
|
? 'text-primary font-medium hover:bg-primary/10'
|
||||||
: 'hover:bg-gray-100 text-gray-700'
|
: 'hover:bg-gray-100 text-gray-700'
|
||||||
}`}
|
}`}
|
||||||
>
|
>
|
||||||
|
|
|
||||||
|
|
@ -327,6 +327,8 @@ function Schedule() {
|
||||||
|
|
||||||
// 연도 선택 범위
|
// 연도 선택 범위
|
||||||
const [yearRangeStart, setYearRangeStart] = useState(currentYear - 1);
|
const [yearRangeStart, setYearRangeStart] = useState(currentYear - 1);
|
||||||
|
const yearRange = Array.from({ length: 12 }, (_, i) => yearRangeStart + i);
|
||||||
|
const monthNames = ['1월', '2월', '3월', '4월', '5월', '6월', '7월', '8월', '9월', '10월', '11월', '12월'];
|
||||||
const prevYearRange = () => setYearRangeStart(prev => prev - 3);
|
const prevYearRange = () => setYearRangeStart(prev => prev - 3);
|
||||||
const nextYearRange = () => setYearRangeStart(prev => prev + 3);
|
const nextYearRange = () => setYearRangeStart(prev => prev + 3);
|
||||||
|
|
||||||
|
|
@ -455,7 +457,7 @@ function Schedule() {
|
||||||
onClick={() => selectYear(y)}
|
onClick={() => selectYear(y)}
|
||||||
className={`py-2 text-sm rounded-lg transition-colors ${
|
className={`py-2 text-sm rounded-lg transition-colors ${
|
||||||
year === y ? 'bg-primary text-white' :
|
year === y ? 'bg-primary text-white' :
|
||||||
isCurrentYear(y) && year !== y ? 'border border-primary text-primary hover:bg-primary/10' :
|
isCurrentYear(y) && year !== y ? 'text-primary font-medium hover:bg-primary/10' :
|
||||||
'hover:bg-gray-100 text-gray-700'
|
'hover:bg-gray-100 text-gray-700'
|
||||||
}`}
|
}`}
|
||||||
>
|
>
|
||||||
|
|
@ -471,7 +473,7 @@ function Schedule() {
|
||||||
onClick={() => selectMonth(i)}
|
onClick={() => selectMonth(i)}
|
||||||
className={`py-2 text-sm rounded-lg transition-colors ${
|
className={`py-2 text-sm rounded-lg transition-colors ${
|
||||||
month === i ? 'bg-primary text-white' :
|
month === i ? 'bg-primary text-white' :
|
||||||
isCurrentMonth(i) && month !== i ? 'border border-primary text-primary hover:bg-primary/10' :
|
isCurrentMonth(i) && month !== i ? 'text-primary font-medium hover:bg-primary/10' :
|
||||||
'hover:bg-gray-100 text-gray-700'
|
'hover:bg-gray-100 text-gray-700'
|
||||||
}`}
|
}`}
|
||||||
>
|
>
|
||||||
|
|
@ -491,7 +493,7 @@ function Schedule() {
|
||||||
onClick={() => selectMonth(i)}
|
onClick={() => selectMonth(i)}
|
||||||
className={`py-2.5 text-sm rounded-lg transition-colors ${
|
className={`py-2.5 text-sm rounded-lg transition-colors ${
|
||||||
month === i ? 'bg-primary text-white' :
|
month === i ? 'bg-primary text-white' :
|
||||||
isCurrentMonth(i) && month !== i ? 'border border-primary text-primary hover:bg-primary/10' :
|
isCurrentMonth(i) && month !== i ? 'text-primary font-medium hover:bg-primary/10' :
|
||||||
'hover:bg-gray-100 text-gray-700'
|
'hover:bg-gray-100 text-gray-700'
|
||||||
}`}
|
}`}
|
||||||
>
|
>
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue