{{-- Add/edit form + list, rendered both by holidays/index.blade.php (initial load) and by HolidayController::save()'s AJAX branch, which re-renders this partial after add/edit and returns it as data.html for the js-ajax-form handler (layouts/app.blade.php) to swap in via data-replace-target="#holidaysCard" — needed because a successful edit must flip the form back to "Add" mode, which non-AJAX only happens via the ?edit_id= query param reloading the page. Params: $holidays, $editHoliday. --}}
{{ $editHoliday ? 'Редактировать праздник' : 'Добавить праздник' }}
@csrf @if ($editHoliday) @endif
@error('date')
{{ $message }}
@enderror
@error('description')
{{ $message }}
@enderror
@if ($editHoliday) Отмена @endif
Список праздников
@foreach ($holidays as $holiday) @endforeach @if ($holidays->isEmpty()) @endif
Дата Описание Действия
{{ $holiday->date }} {!! nl2br(e($holiday->description)) !!} Редактировать
@csrf
Нет праздников