style(admin-schedule): 날짜미정 연/월 선택을 CustomSelect로 교체
네이티브 select 대신 공통 커스텀 드롭다운 사용 (앱 스타일 통일). Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
parent
71b678a90b
commit
7786a4a5c5
1 changed files with 13 additions and 20 deletions
|
|
@ -2,7 +2,7 @@ import { useState, useEffect, useMemo } from 'react';
|
|||
import { useNavigate, Link, useParams, useSearchParams } from 'react-router-dom';
|
||||
import { useQuery } from '@tanstack/react-query';
|
||||
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 { MemberSelector } from '@/components/pc/admin/schedule';
|
||||
import { useAdminAuth } from '@/hooks/pc/admin';
|
||||
|
|
@ -277,25 +277,18 @@ function ScheduleForm() {
|
|||
// 날짜 미정: 연 + 월 드롭다운
|
||||
<div>
|
||||
<label className="block text-sm font-medium text-gray-700 mb-2">연 / 월 *</label>
|
||||
<div className="flex gap-3">
|
||||
<select
|
||||
value={selYear || yearNow}
|
||||
onChange={(e) => setMonthDate(e.target.value, parseInt(selMonth, 10))}
|
||||
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"
|
||||
>
|
||||
{YEAR_OPTIONS.map((y) => (
|
||||
<option key={y} value={y}>{y}년</option>
|
||||
))}
|
||||
</select>
|
||||
<select
|
||||
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 className="grid grid-cols-2 gap-3">
|
||||
<CustomSelect
|
||||
value={String(selYear || yearNow)}
|
||||
onChange={(v) => setMonthDate(v, parseInt(selMonth, 10) || 1)}
|
||||
options={YEAR_OPTIONS.map((y) => ({ value: String(y), label: `${y}년` }))}
|
||||
/>
|
||||
<CustomSelect
|
||||
value={String(parseInt(selMonth, 10) || '')}
|
||||
onChange={(v) => setMonthDate(selYear || yearNow, v)}
|
||||
options={Array.from({ length: 12 }, (_, i) => ({ value: String(i + 1), label: `${i + 1}월` }))}
|
||||
placeholder="월 선택"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
) : (
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue