index.blade.php 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. @extends('layouts.app')
  2. @section('content')
  3. <div class="row mb-3">
  4. <div class="col-6">
  5. <h3>Ответственные</h3>
  6. </div>
  7. <div class="col-6 text-end">
  8. <button type="button" class="btn btn-primary" data-bs-toggle="modal" data-bs-target="#addModal">
  9. Добавить
  10. </button>
  11. </div>
  12. </div>
  13. @include('partials.table', [
  14. 'id' => $id,
  15. 'header' => $header,
  16. 'strings' => $responsibles
  17. ])
  18. <div class="row pt-3 px-3">
  19. <div class="col-12 pagination">
  20. {{ $responsibles->links() }}
  21. </div>
  22. </div>
  23. <!-- Модальное окно добавления-->
  24. <div class="modal fade" id="addModal" tabindex="-1" aria-labelledby="exampleModalLabel" aria-hidden="true">
  25. <div class="modal-dialog modal-fullscreen-sm-down modal-lg">
  26. <div class="modal-content">
  27. <div class="modal-header">
  28. <h1 class="modal-title fs-5" id="addModalLabel">Добавить заказ МАФ</h1>
  29. <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Закрыть"></button>
  30. </div>
  31. <div class="modal-body">
  32. <form action="{{ route('responsible.store') }}" method="post">
  33. @csrf
  34. @include('partials.select', ['name' => 'area_id', 'title' => 'Район', 'options' => $areas])
  35. @include('partials.input', ['name' => 'name', 'title' => 'ФИО', 'required' => true])
  36. @include('partials.input', ['name' => 'phone', 'title' => 'Телефон', 'required' => true])
  37. @include('partials.submit', ['name' => 'Добавить'])
  38. </form>
  39. </div>
  40. </div>
  41. </div>
  42. </div>
  43. @if($errors->count())
  44. @dump($errors)
  45. @endif
  46. @endsection
  47. @push('scripts')
  48. {{-- <script type="module">--}}
  49. {{-- $('#select_maf').on('change', function () {--}}
  50. {{-- $('#product_id').val($(this).val());--}}
  51. {{-- $('#product_name').val($('#select_maf option:selected').text()).slideDown();--}}
  52. {{-- $('#select_maf_form').slideUp();--}}
  53. {{-- $('#sku_form').slideDown();--}}
  54. {{-- });--}}
  55. {{-- </script>--}}
  56. @endpush