apps.blade.php 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. @extends('layout')
  2. @section('content')
  3. <main class="container mx-auto px-5">
  4. <h1 class="text-4xl font-bold text-center my-4">Ваши заявки</h1>
  5. <article>
  6. @if($applications->isNotEmpty())
  7. <ul class="grid xl:grid-cols-5 lg:grid-cols-3 md:grid-cols-2 grid-cols-1 gap-6 xl:mb-72 lg:mb-64 md:mb-32">
  8. @foreach($applications as $app)
  9. <li class="p-5 rounded-xl border-2 border-indigo-800 flex flex-col gap-5">
  10. <article class="flex flex-col">
  11. <p class="text-sm text-gray-400">Курс</p>
  12. <p class="text-xl font-medium text-indigo-800">{{ $app->course_name }}</p>
  13. </article>
  14. <article class="flex flex-col">
  15. <p class="text-sm text-gray-400">Дата</p>
  16. <p class="">{{ $app->date }}</p>
  17. </article>
  18. <article class="flex flex-col">
  19. <p class="text-sm text-gray-400">Статус заявки</p>
  20. @if($app->status == 'new')
  21. <p class="">Новая</p>
  22. @elseif($app->status == 'continue')
  23. <p class="">Продолжается</p>
  24. @else
  25. <p class="">Закончено</p>
  26. @endif
  27. </article>
  28. @if($app->status == 'end' && $app->review == '')
  29. <form action="{{ route('apps.review', $app->id) }}" method="POST">
  30. @csrf
  31. <textarea class="w-full border border-gray-300 rounded-xl p-3" name="review" id="" placeholder="Напишите отзыв"></textarea>
  32. <button class="py-2 px-2 rounded-xl bg-green-500 text-white font-semibold">Отправить</button>
  33. </form>
  34. @endif
  35. @if($app->review)
  36. <article class="flex flex-col">
  37. <p class="text-sm text-gray-400">Ваш отзыв:</p>
  38. <p>"{{ $app->review }}"</p>
  39. </article>
  40. @endif
  41. </li>
  42. @endforeach
  43. </ul>
  44. @else
  45. <p class='text-center italic md:text-xl text-base xl:mt-48 lg:mt-32 md:mt-24 mt-6 mb-96'>У вас нет никакой заявки на обучение!</p>
  46. @endif
  47. </article>
  48. </main>
  49. @endsection