68 lines
3.0 KiB
PHP
68 lines
3.0 KiB
PHP
@php($title = 'Менеджеры')
|
||
@extends('layouts.admin')
|
||
@section('content')
|
||
<style>
|
||
.collapsing {
|
||
transition: none !important;
|
||
}
|
||
</style>
|
||
<div class="d-flex mb-3">
|
||
<form class="p-2 border rounded-3 border-1 bg-white" method="GET" action="{{ route('admin.cities.managers') }}">
|
||
<input type="radio" class="btn-check" name="filter" value="all" id="option_all" autocomplete="off"
|
||
onclick="this.form.submit()" {{ $filter == 'all' || !$filter ? 'checked' : '' }}>
|
||
<label class="btn p-2 fs-5" for="option_all">Все</label>
|
||
@foreach ($cities as $city)
|
||
<input type="radio" class="btn-check" name="filter" value="{{ $city->id }}"
|
||
id="option_city_{{ $city->id }}" autocomplete="off" onclick="this.form.submit()"
|
||
{{ $filter == $city->id ? 'checked' : '' }}>
|
||
<label class="btn p-2 fs-5" for="option_city_{{ $city->id }}">{{ $city->name }}</label>
|
||
@endforeach
|
||
</form>
|
||
|
||
|
||
<div class="ms-auto p-2">
|
||
<button class="btn btn-primary py-2 px-3 fs-5" data-bs-toggle="modal" data-bs-target="#createCityManagerModal">
|
||
<i class="bi bi-plus"></i> Добавить менеджера
|
||
</button>
|
||
</div>
|
||
</div>
|
||
<div class="fs-5 bg-light p-0 m-0 border border-1 rounded-4 py-3">
|
||
|
||
</div>
|
||
|
||
<!-- Modal -->
|
||
<div class="modal fade" id="createCityManagerModal" tabindex="-1" aria-labelledby="createCityModalLabel"
|
||
aria-hidden="true">
|
||
|
||
<form class="modal-dialog modal-dialog-centered" action="{{ route('admin.cities.create') }}" method="post">
|
||
<div class="modal-content">
|
||
<div class="modal-header">
|
||
<h1 class="modal-title fs-5" id="createCityModalLabel">Новый менеджер</h1>
|
||
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
||
</div>
|
||
<div class="modal-body">
|
||
|
||
<div class="my-3">
|
||
@csrf
|
||
<div class="form-floating">
|
||
<select name="city" class="form-select" id="floatingSelectCity" aria-label="Укажите город">
|
||
@foreach ($cities as $city)
|
||
<option value="{{ $city->id }}" @if ($filter == $city->id) selected @endif>
|
||
{{ $city->name }}</option>
|
||
@endforeach
|
||
</select>
|
||
<label for="floatingSelectCity">Укажите город</label>
|
||
</div>
|
||
|
||
@livewire('user-selector')
|
||
</div>
|
||
|
||
</div>
|
||
<div class="modal-footer">
|
||
<button type="submit" class="btn btn-primary">Добавить</button>
|
||
</div>
|
||
</div>
|
||
</form>
|
||
</div>
|
||
@endsection
|