From 7ad06e85fa6e3b54b2b349ca1c9ec94fb6e287cd Mon Sep 17 00:00:00 2001 From: mirivlad Date: Wed, 1 Apr 2026 16:07:43 +0800 Subject: [PATCH] =?UTF-8?q?Feat:=20=D0=97=D0=B0=D1=8F=D0=B2=D0=BA=D0=B8=20?= =?UTF-8?q?=E2=80=94=20Blade=20=D1=88=D0=B0=D0=B1=D0=BB=D0=BE=D0=BD=D1=8B?= =?UTF-8?q?=20(create,=20show,=20edit)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ✅ create.blade.php — создание с элементами ✅ show.blade.php — просмотр с статистикой ✅ edit.blade.php — редактирование элементов ✅ Кнопки approve/reject на show Co-authored-by: Qwen-Coder --- .../admin/course-requests/create.blade.php | 170 ++++++++++++++++++ .../admin/course-requests/edit.blade.php | 135 ++++++++++++++ .../admin/course-requests/show.blade.php | 139 ++++++++++++++ 3 files changed, 444 insertions(+) create mode 100644 resources/views/admin/course-requests/create.blade.php create mode 100644 resources/views/admin/course-requests/edit.blade.php create mode 100644 resources/views/admin/course-requests/show.blade.php diff --git a/resources/views/admin/course-requests/create.blade.php b/resources/views/admin/course-requests/create.blade.php new file mode 100644 index 0000000..3444356 --- /dev/null +++ b/resources/views/admin/course-requests/create.blade.php @@ -0,0 +1,170 @@ +@extends('layouts.app') +@section('title', 'Создать заявку') +@section('content') +
+
+ +
+
+

Создать заявку

+ Назад +
+ +
+ @csrf +
+
+
+
Курсы и получатели
+
+
+ + + @error('organization_id')
{{ $message }}
@enderror +
+ +
+ +
Элементы заявки
+
+
+
+
+ + +
+
+ + + Или +
+
+ + +
+
+ + +
+
+ + +
+
+ +
+
+ + +
+
+
+ +
+
+
Дополнительно
+
+
+ + + Admin/Manager/Curator могут создать сразу одобренную заявку +
+ +
+ + +
+
+
+
+
+ + + Отмена +
+
+
+
+ +@push('scripts') + +@endpush +@endsection diff --git a/resources/views/admin/course-requests/edit.blade.php b/resources/views/admin/course-requests/edit.blade.php new file mode 100644 index 0000000..e22b038 --- /dev/null +++ b/resources/views/admin/course-requests/edit.blade.php @@ -0,0 +1,135 @@ +@extends('layouts.app') +@section('title', 'Редактировать заявку #' . $courseRequest->id) +@section('content') +
+
+ +
+
+

Редактировать заявку #{{ $courseRequest->id }}

+ Назад +
+ +
+ @csrf + @method('PUT') +
+
+
+
Элементы заявки
+
+
+ @foreach($courseRequest->items as $index => $item) +
+ +
+
+ + +
+
+ + + Или +
+
+ + +
+
+ + +
+
+ + +
+
+ +
+ @endforeach +
+ + +
+
+
+ +
+
+
Дополнительно
+
+
+ + +
+
+
+
+
+ + + Отмена +
+
+
+
+ +@push('scripts') + +@endpush +@endsection diff --git a/resources/views/admin/course-requests/show.blade.php b/resources/views/admin/course-requests/show.blade.php new file mode 100644 index 0000000..14af752 --- /dev/null +++ b/resources/views/admin/course-requests/show.blade.php @@ -0,0 +1,139 @@ +@extends('layouts.app') +@section('title', 'Заявка #' . $courseRequest->id) +@section('content') +
+
+ +
+
+

Заявка #{{ $courseRequest->id }}

+
+ @if($courseRequest->isPending()) +
+ @csrf + +
+
+ @csrf + +
+ Редактировать + @endif + Назад +
+
+ +
+
+
+
Информация
+
+
Организация: {{ $courseRequest->organization->name }}
+
Статус: + @if($courseRequest->isPending()) + Ожидает + @elseif($courseRequest->isApproved()) + Одобрена + @else + Отклонена + @endif +
+
Создана: {{ $courseRequest->created_at->format('d.m.Y H:i') }}
+
Кем: {{ $courseRequest->requestedBy->name }}
+ @if($courseRequest->approved_by) +
{{ $courseRequest->isApproved() ? 'Одобрена' : 'Отклонена' }}: {{ $courseRequest->approvedBy?->name }} {{ $courseRequest->approved_at->format('d.m.Y H:i') }}
+ @endif + @if($courseRequest->note) +
Заметка:
{{ $courseRequest->note }}
+ @endif +
+
+
+
+
+
Статистика
+
+
+
+
{{ $courseRequest->items->count() }}
+
Курсов
+
+
+
{{ $courseRequest->items->where('user_id')->count() }}
+
Пользователей
+
+
+
{{ $courseRequest->items->where('group_id')->count() }}
+
Групп
+
+
+
+
+
+
+ +
+
Элементы заявки
+
+ @if($courseRequest->items->count() > 0) +
+ + + + + + + + + + + @foreach($courseRequest->items as $item) + + + + + + + @endforeach + +
КурсТипПолучательПериод
{{ $item->course->title }} + @if($item->user_id) + Индивидуально + @elseif($item->group_id) + Группе + @else + Организации + @endif + + @if($item->user_id) + {{ $item->user?->name ?? '—' }} + @elseif($item->group_id) + {{ $item->group?->name ?? '—' }} + @else + {{ $courseRequest->organization->name }} + @endif + + {{ $item->start_date->format('d.m.Y') }} + @if($item->end_date) +
→ {{ $item->end_date->format('d.m.Y') }} + @endif +
+
+ @else +

В заявке нет элементов

+ @endif +
+
+ + @if($courseRequest->isApproved()) +
+
Назначения созданы
+
+

По этой заявке были созданы назначения. Проверить их можно в разделе Назначения курсов.

+
+
+ @endif +
+
+
+@endsection