feat: добавляет файл инициализации данных, DTO для категорий списка желаний и компонент формы для создания событий.
This commit is contained in:
@@ -51,11 +51,10 @@ export function EventForm({ onEventCreated }: EventFormProps) {
|
||||
setEventType('recurring');
|
||||
setFormData({ ...formData, startYear: undefined, endYear: undefined, endMonth: undefined, endDay: undefined });
|
||||
}}
|
||||
className={`px-4 py-2 rounded-lg font-medium transition-colors ${
|
||||
eventType === 'recurring'
|
||||
className={`px-4 py-2 rounded-lg font-medium transition-colors ${eventType === 'recurring'
|
||||
? 'bg-blue-600 text-white'
|
||||
: 'bg-gray-800 text-gray-400 hover:bg-gray-700'
|
||||
}`}
|
||||
}`}
|
||||
>
|
||||
Праздник (ежегодно)
|
||||
</button>
|
||||
@@ -65,22 +64,20 @@ export function EventForm({ onEventCreated }: EventFormProps) {
|
||||
setEventType('anniversary');
|
||||
setFormData({ ...formData, endYear: undefined, endMonth: undefined, endDay: undefined });
|
||||
}}
|
||||
className={`px-4 py-2 rounded-lg font-medium transition-colors ${
|
||||
eventType === 'anniversary'
|
||||
className={`px-4 py-2 rounded-lg font-medium transition-colors ${eventType === 'anniversary'
|
||||
? 'bg-blue-600 text-white'
|
||||
: 'bg-gray-800 text-gray-400 hover:bg-gray-700'
|
||||
}`}
|
||||
}`}
|
||||
>
|
||||
Годовщина (с годом)
|
||||
</button>
|
||||
<button
|
||||
type="button"
|
||||
onClick={() => setEventType('duration')}
|
||||
className={`px-4 py-2 rounded-lg font-medium transition-colors ${
|
||||
eventType === 'duration'
|
||||
className={`px-4 py-2 rounded-lg font-medium transition-colors ${eventType === 'duration'
|
||||
? 'bg-blue-600 text-white'
|
||||
: 'bg-gray-800 text-gray-400 hover:bg-gray-700'
|
||||
}`}
|
||||
}`}
|
||||
>
|
||||
Продолжительное
|
||||
</button>
|
||||
@@ -116,7 +113,7 @@ export function EventForm({ onEventCreated }: EventFormProps) {
|
||||
<label className="block text-sm font-medium mb-2">Год начала</label>
|
||||
<input
|
||||
type="number"
|
||||
required={eventType !== 'recurring'}
|
||||
required
|
||||
value={formData.startYear || ''}
|
||||
onChange={(e) =>
|
||||
setFormData({
|
||||
|
||||
Reference in New Issue
Block a user