index.blade.php 2.6 KB

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