style(admin-schedule): 날짜미정 연/월 선택을 CustomSelect로 교체

네이티브 select 대신 공통 커스텀 드롭다운 사용 (앱 스타일 통일).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
caadiq 2026-06-16 22:14:33 +09:00
parent 71b678a90b
commit 7786a4a5c5

View file

@ -2,7 +2,7 @@ import { useState, useEffect, useMemo } from 'react';
import { useNavigate, Link, useParams, useSearchParams } from 'react-router-dom'; import { useNavigate, Link, useParams, useSearchParams } from 'react-router-dom';
import { useQuery } from '@tanstack/react-query'; import { useQuery } from '@tanstack/react-query';
import { Home, ChevronRight, Save, Settings } from 'lucide-react'; import { Home, ChevronRight, Save, Settings } from 'lucide-react';
import { AdminLayout, DatePicker, TimePicker } from '@/components/pc/admin'; import { AdminLayout, DatePicker, TimePicker, CustomSelect } from '@/components/pc/admin';
import { Toast } from '@/components/common'; import { Toast } from '@/components/common';
import { MemberSelector } from '@/components/pc/admin/schedule'; import { MemberSelector } from '@/components/pc/admin/schedule';
import { useAdminAuth } from '@/hooks/pc/admin'; import { useAdminAuth } from '@/hooks/pc/admin';
@ -277,25 +277,18 @@ function ScheduleForm() {
// : + // : +
<div> <div>
<label className="block text-sm font-medium text-gray-700 mb-2"> / *</label> <label className="block text-sm font-medium text-gray-700 mb-2"> / *</label>
<div className="flex gap-3"> <div className="grid grid-cols-2 gap-3">
<select <CustomSelect
value={selYear || yearNow} value={String(selYear || yearNow)}
onChange={(e) => setMonthDate(e.target.value, parseInt(selMonth, 10))} onChange={(v) => setMonthDate(v, parseInt(selMonth, 10) || 1)}
className="flex-1 px-4 py-3 border border-gray-200 rounded-xl bg-white focus:outline-none focus:ring-2 focus:ring-primary focus:border-transparent" options={YEAR_OPTIONS.map((y) => ({ value: String(y), label: `${y}` }))}
> />
{YEAR_OPTIONS.map((y) => ( <CustomSelect
<option key={y} value={y}>{y}</option> value={String(parseInt(selMonth, 10) || '')}
))} onChange={(v) => setMonthDate(selYear || yearNow, v)}
</select> options={Array.from({ length: 12 }, (_, i) => ({ value: String(i + 1), label: `${i + 1}` }))}
<select placeholder="월 선택"
value={parseInt(selMonth, 10) || ''} />
onChange={(e) => setMonthDate(selYear || yearNow, e.target.value)}
className="flex-1 px-4 py-3 border border-gray-200 rounded-xl bg-white focus:outline-none focus:ring-2 focus:ring-primary focus:border-transparent"
>
{Array.from({ length: 12 }, (_, i) => i + 1).map((m) => (
<option key={m} value={m}>{m}</option>
))}
</select>
</div> </div>
</div> </div>
) : ( ) : (