| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105 |
- <x-app-layout>
- <div class="py-12">
- <div class="max-w-7xl mx-auto sm:px-6 lg:px-8">
- <div class="bg-white overflow-hidden shadow-sm sm:rounded-lg">
- <div class="p-6 text-gray-900">
- <h1 class="text-xl font-medium">Мои заявки</h1>
- @if (session('success'))
- <span class="btn btn-success mt-4 mb-4">{{session('success')}}</span>
- @endif
- <table class="w-full text-center mt-4">
- <thead>
- <tr>
- <th>
- №
- </th>
- <th>
- Курс
- </th>
- <th>
- Дата начала обучения
- </th>
- <th>
- Способ оплаты
- </th>
- <th>
- Статус
- </th>
- </tr>
- <tr style="height: 15px;"></tr>
- </thead>
- <tbody>
- @foreach ($applications as $app)
- <tr style="height: 50px; border-block: 1px solid #6b7280;">
- <td>{{$app->id}}</td>
- <td>{{$app->course->name}}</td>
- <td>{{$app->date_start}}</td>
- <td>{{$app->payment_method}}</td>
- <td>
- @if ($app->status === 'Новая')
- <span style="background-color: lightblue; color: #ffffff; padding: 5px; border-radius: 6px;">
- {{$app->status}}
- </span>
- @endif
-
- @if ($app->status === 'Идет обучение')
- <span style="background-color: blue; color: #ffffff; padding: 5px; border-radius: 6px;">
- {{$app->status}}
- </span>
- @endif
- @if ($app->status === 'Обучение завершено')
- <span style="background-color: purple; color: #ffffff; padding: 5px; border-radius: 6px;">
- {{$app->status}}
- </span>
- @endif
- </td>
-
- @if ($app->status === 'Обучение завершено')
- <td>
- <x-primary-button type="button" data-bs-toggle="modal" data-bs-target="#reviewModal{{ $app->id }}">Отзыв</x-primary-button>
- <form method="POST" action="{{ route('applications.set-review', $app->id) }}">
- @csrf
- <div class="modal fade" id="reviewModal{{ $app->id }}" tabindex="-1" aria-labelledby="exampleModalLabel" aria-hidden="true">
- <div class="modal-dialog">
- <div class="modal-content">
- <div class="modal-header">
- <h5 class="modal-title" id="exampleModalLabel">Ваш отзыв на курс</h5>
- <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
- </div>
- <div class="modal-body">
- <textarea
- name="review"
- class="border-gray-300 focus:border-indigo-500 focus:ring-indigo-500 rounded-md shadow-sm"
- style="resize: none; height: 200px; width: 100%;"
- {{ empty($app->review) ? '' : 'disabled' }}
- >{{$app->review}}</textarea>
- </div>
- <div class="modal-footer">
- <x-primary-button type="button" data-bs-dismiss="modal" style="background-color: #6b7280;">Закрыть</x-primary-button>
- @if (empty($app->review))
- <x-primary-button type="submit">Отправить</x-primary-button>
- @endif
- </div>
- </div>
- </div>
- </div>
- </form>
- </td>
- @endif
-
- </tr>
- @endforeach
- </tbody>
- </table>
- </div>
- </div>
- </div>
- </div>
- </x-app-layout>
|