| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152 |
- @extends('layouts.app')
- @section('content')
- <div class="row mb-3">
- <div class="col-6">
- <h3>Импорт</h3>
- </div>
- @if(hasRole('admin'))
- <div class="col-6 text-end">
- <button type="button" class="btn btn-sm mb-1 btn-primary" data-bs-toggle="modal" data-bs-target="#importModal">
- Импорт
- </button>
- </div>
- @endif
- </div>
- @include('partials.table', [
- 'id' => $id,
- 'header' => $header,
- 'strings' => $imports,
- 'routeName' => 'import.show',
- ])
- @include('partials.pagination', ['items' => $imports])
- <!-- Модальное окно импорта-->
- <div class="modal fade" id="importModal" tabindex="-1" aria-labelledby="exampleModalLabel" aria-hidden="true">
- <div class="modal-dialog modal-fullscreen-sm-down">
- <div class="modal-content">
- <div class="modal-header">
- <h1 class="modal-title fs-5" id="exampleModalLabel">Выберите файл для импорта</h1>
- <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Закрыть"></button>
- </div>
- <div class="modal-body">
- <form action="{{ route('import.create') }}" method="post" enctype="multipart/form-data">
- @csrf
- @include('partials.select', ['title' => 'Вкладка', 'name' => 'type', 'options' => ['orders' => 'Площадки', 'reclamations' => 'Рекламации', 'mafs' => 'МАФы']])
- @include('partials.input', ['title' => 'XLSX файл', 'name' => 'import_file', 'type' => 'file', 'required' => true])
- @include('partials.submit', ['name' => 'Импорт'])
- </form>
- </div>
- </div>
- </div>
- </div>
- @if($errors->any())
- @dump($errors)
- @endif
- @endsection
|