index.blade.php 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. @extends('layouts.app')
  2. @section('content')
  3. <div class="row mb-2">
  4. <div class="col-md-6">
  5. <h3>Рекламации</h3>
  6. </div>
  7. <div class="col-md-6 text-end">
  8. @if(hasRole('admin'))
  9. <button type="button" class="btn btn-sm btn-primary" data-bs-toggle="modal" data-bs-target="#exportReclamationsModal">Экспорт</button>
  10. @endif
  11. </div>
  12. </div>
  13. @if(hasRole('admin'))
  14. <div class="modal fade" id="exportReclamationsModal" tabindex="-1" aria-labelledby="exportReclamationsModalLabel" aria-hidden="true">
  15. <div class="modal-dialog modal-fullscreen-sm-down modal-lg">
  16. <div class="modal-content">
  17. <div class="modal-header">
  18. <h1 class="modal-title fs-5" id="exportReclamationsModalLabel">Экспорт рекламаций</h1>
  19. <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Закрыть"></button>
  20. </div>
  21. <div class="modal-body">
  22. <form method="post" action="{{ route('reclamations.export') }}">
  23. @csrf
  24. @include('partials.checkbox', ['title' => 'С учётом текущего фильтра и поиска', 'name' => 'withFilter', 'type' => 'checkbox', 'value' => 'yes', 'checked' => false])
  25. <div class="d-none">
  26. @if(request()->s)
  27. @include('partials.input', ['name' => 's', 'title' => 'поиск', 'value' => request()->s])
  28. @endif
  29. @if(request()->filters)
  30. @foreach(request()->filters as $filterName => $filterValue)
  31. @include('partials.input', ['name' => 'filters[' . $filterName .']', 'title' => $filterName, 'value' => $filterValue])
  32. @endforeach
  33. @endif
  34. </div>
  35. @include('partials.submit', ['name' => 'Экспорт'])
  36. </form>
  37. </div>
  38. </div>
  39. </div>
  40. </div>
  41. @endif
  42. @include('partials.table', [
  43. 'id' => $id,
  44. 'header' => $header,
  45. 'strings' => $reclamations,
  46. 'routeName' => 'reclamations.show',
  47. 'routeParam' => 'reclamation',
  48. ])
  49. @include('partials.pagination', ['items' => $reclamations])
  50. @endsection