| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172 |
- @extends('layouts.app')
- @section('content')
- <div class="row mb-3">
- <div class="col-6">
- <h3>Каталог</h3>
- </div>
- <div class="col-6 text-end">
- <button type="button" class="btn btn-primary" data-bs-toggle="modal" data-bs-target="#importModal">
- Импорт
- </button>
- </div>
- </div>
- @include('partials.table', [
- 'id' => 'products',
- 'header' => [
- 'id' => 'ID',
- 'year' => 'Год',
- 'nomenclature_number' => 'Номер номенклатуры',
- 'article' => 'Артикул',
- 'manufacturer' => 'Производитель',
- 'name_tz' => 'Наименование ТЗ',
- 'type_tz' => 'Тип по ТЗ',
- 'type' => 'Тип',
- 'manufacturer_name' => 'Наименование производителя',
- 'sizes' => 'Размеры',
- 'price_status' => 'Статус цены',
- 'product_price_txt' => 'Цена товара',
- 'installation_price_txt' => 'Цена установки',
- 'service_price_txt' => 'Цена обслуживания',
- 'total_price_txt' => 'Итоговая цена',
- 'note' => 'Примечания',
- 'created_at' => 'Дата создания',
- ],
- 'data' => $products
- ])
- <div class="row pt-3 px-3">
- <div class="col-12 pagination">
- {{ $products->links() }}
- </div>
- </div>
- <!-- Модальное окно -->
- <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('catalog.import') }}" method="post" enctype="multipart/form-data">
- @csrf
- @include('partials.input', ['title' => 'Год', 'name' => 'year', 'type' => 'number', 'min' => 2000, 'max' => (int) date('Y') + 1, 'value' => date('Y')])
- @include('partials.input', ['title' => 'XLSX файл', 'name' => 'import_file', 'type' => 'file'])
- @include('partials.submit', ['name' => 'Импорт'])
- </form>
- </div>
- </div>
- </div>
- </div>
- @if($errors->count())
- @dump($errors)
- @endif
- @endsection
|