index.blade.php 2.9 KB

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