| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950 |
- @extends('layouts.app')
- @section('content')
- <div class="row mb-2">
- <div class="col-6">
- <h3>Пользователи</h3>
- </div>
- <div class="col-6 text-end">
- <button type="button" class="btn btn-sm btn-primary" data-bs-toggle="modal" data-bs-target="#addModal">
- Добавить
- </button>
- </div>
- </div>
- @include('partials.table', [
- 'id' => $id,
- 'header' => $header,
- 'strings' => $users,
- 'routeName' => 'user.show',
- 'routeParam' => 'user',
- ])
- @include('partials.pagination', ['items' => $users])
- <!-- Модальное окно добавления-->
- <div class="modal fade" id="addModal" tabindex="-1" aria-labelledby="exampleModalLabel" 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="addModalLabel">Добавить заказ МАФ</h1>
- <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Закрыть"></button>
- </div>
- <div class="modal-body">
- <form action="{{ route('user.store') }}" method="post">
- @csrf
- @include('partials.input', ['name' => 'email', 'type' => 'text', 'title' => 'Логин/email', 'required' => true])
- @include('partials.input', ['name' => 'name', 'title' => 'Имя', 'required' => true])
- @include('partials.input', ['name' => 'phone', 'title' => 'Телефон'])
- @include('partials.input', ['name' => 'password', 'type' => 'password', 'title' => 'Пароль', 'required' => true])
- @include('partials.select', ['name' => 'role', 'title' => 'Роль', 'options' => getRoles(), 'value' => $user->role ?? \App\Models\Role::MANAGER])
- @include('partials.submit', ['name' => 'Добавить'])
- </form>
- </div>
- </div>
- </div>
- </div>
- @endsection
|