| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576 |
- @extends('layouts.app')
- @section('content')
- <div class="row mb-2 page-header-row">
- <div class="col-12 col-md-6 page-header-title">
- <h3>Рекламации</h3>
- </div>
- <div class="col-auto ms-md-auto page-header-actions">
- @if(hasPermission('reclamations.export'))
- <button type="button" class="btn btn-sm btn-primary page-action-btn" data-bs-toggle="modal" data-bs-target="#exportReclamationsModal" aria-label="Экспорт">
- <i class="bi bi-download page-action-btn__icon"></i>
- <span class="page-action-btn__label">Экспорт</span>
- </button>
- @endif
- </div>
- </div>
- @php
- $tabQuery = \Illuminate\Support\Arr::except(request()->query(), ['tab', 'page']);
- @endphp
- <ul class="nav nav-tabs mb-3">
- <li class="nav-item">
- <a class="nav-link @if(($tab ?? 'all') === 'all') active @endif"
- href="{{ route('reclamations.index', $tabQuery) }}">Все</a>
- </li>
- <li class="nav-item">
- <a class="nav-link @if(($tab ?? 'all') === 'dkr') active @endif"
- href="{{ route('reclamations.index', array_merge($tabQuery, ['tab' => 'dkr'])) }}">ДКР</a>
- </li>
- </ul>
- @if(hasPermission('reclamations.export'))
- <div class="modal fade" id="exportReclamationsModal" tabindex="-1" aria-labelledby="exportReclamationsModalLabel" aria-hidden="true">
- <div class="modal-dialog modal-fullscreen-sm-down modal-lg">
- <div class="modal-content">
- <div class="modal-header">
- <h1 class="modal-title fs-5" id="exportReclamationsModalLabel">Экспорт рекламаций</h1>
- <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Закрыть"></button>
- </div>
- <div class="modal-body">
- <form method="post" action="{{ route('reclamations.export') }}">
- @csrf
- @include('partials.checkbox', ['title' => 'С учётом текущего фильтра и поиска', 'name' => 'withFilter', 'type' => 'checkbox', 'value' => 'yes', 'checked' => false])
- <div class="d-none">
- @if(($tab ?? 'all') === 'dkr')
- <input type="hidden" name="tab" value="dkr">
- @endif
- @if(request()->s)
- @include('partials.input', ['name' => 's', 'title' => 'поиск', 'value' => request()->s])
- @endif
- @if(request()->filters)
- @foreach(request()->filters as $filterName => $filterValue)
- @include('partials.input', ['name' => 'filters[' . $filterName .']', 'title' => $filterName, 'value' => $filterValue])
- @endforeach
- @endif
- </div>
- @include('partials.submit', ['name' => 'Экспорт'])
- </form>
- </div>
- </div>
- </div>
- </div>
- @endif
- @include('partials.table', [
- 'id' => $id,
- 'header' => $header,
- 'strings' => $reclamations,
- 'routeName' => 'reclamations.show',
- 'routeParam' => 'reclamation',
- ])
- @include('partials.pagination', ['items' => $reclamations])
- @endsection
|