доработка компоненты вывода клиентов: обновлена строка фильров
This commit is contained in:
parent
1dfd1570a4
commit
403e009ad0
@ -1,55 +1,44 @@
|
||||
<?php
|
||||
use Modules\Main\Models\Deal\DealStatus;
|
||||
?>
|
||||
<div class="d-flex gap-2 flex-column flex-lg-row">
|
||||
<div class="d-flex flex-row col-12 col-lg-auto border rounded-3 border-1 p-0 bg-white" style="">
|
||||
<input wire:model.live="filter.status" type="radio" class="btn-check" name="status"
|
||||
value="{{ DealStatus::MODERATION }}" id="option5" autocomplete="off" {{ (array_key_exists('status', $filter) && $filter['status'] == DealStatus::MODERATION) ? 'checked' : '' }}>
|
||||
<label class="btn p-2 fs-5 text-truncate" for="option5">На проверке</label>
|
||||
<input wire:model.live="filter.status" type="radio" class="btn-check" name="status"
|
||||
value="{{ DealStatus::UNIQUE }}" id="option6" autocomplete="off" {{ (array_key_exists('status', $filter) && $filter['status'] == DealStatus::UNIQUE) ? 'checked' : '' }}>
|
||||
<label class="btn p-2 fs-5 text-truncate" for="option6">Уникальные</label>
|
||||
<input wire:model.live="filter.status" type="radio" class="btn-check" name="status"
|
||||
value="{{ DealStatus::NOT_UNIQUE }}" id="option7" autocomplete="off" {{ (array_key_exists('status', $filter) && $filter['status'] == DealStatus::NOT_UNIQUE) ? 'checked' : '' }}>
|
||||
<label class="btn p-2 fs-5 text-truncate" for="option7">Не уникальные</label>
|
||||
</div>
|
||||
<div class="input-group flex-fill">
|
||||
<span class="input-group-text" id="basic-addon1">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-search"
|
||||
viewBox="0 0 16 16">
|
||||
<path
|
||||
d="M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398h-.001q.044.06.098.115l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85a1 1 0 0 0-.115-.1zM12 6.5a5.5 5.5 0 1 1-11 0 5.5 5.5 0 0 1 11 0">
|
||||
</path>
|
||||
</svg>
|
||||
</span>
|
||||
<input wire:model.live="filter.search" type="text" class="form-control form-control-lg" placeholder="Поиск по имени, телефону, электронной почте">
|
||||
</div>
|
||||
<!-- Выбор ЖК-->
|
||||
<div class="btn-group bg-light d-flex rounded-4 ">
|
||||
<button type="button" class="p-0 btn bg-light text-primary border overflow-hidden w-100 rounded-start-3 pe-0"
|
||||
style="mask-image: linear-gradient(to right, black, black 90%, transparent);">
|
||||
<div class="mx-1 text-truncate fs-5">
|
||||
@if(array_key_exists('complexes', $filter))
|
||||
<div class="">
|
||||
<span class="text-truncate">{{ $filter['complexes'][0]['name'] }}</span>
|
||||
@if(count($filter['complexes']) > 1)
|
||||
<span>
|
||||
+ <span class="d-inline-block bg-secondary rounded-circle fs-6 text-light"
|
||||
style="width:1.3rem;height:1.3rem">{{ count($filter['complexes']) - 1 }}</span>
|
||||
</span>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
@else
|
||||
<div class="m-2">ЖК</div>
|
||||
<div>
|
||||
<div class="input-group mb-3 d-none">
|
||||
<button class="btn btn-outline-secondary dropdown-toggle" type="button" data-bs-toggle="dropdown"
|
||||
aria-expanded="false">
|
||||
{{ (array_key_exists('status', $filter)) ? __('deal.' . $filter['status']) : 'Статус' }}
|
||||
</button>
|
||||
<ul class="dropdown-menu p-2">
|
||||
<li>
|
||||
<input wire:model.live="filter.status" type="radio" class="btn-check" name="status"
|
||||
value="{{ DealStatus::MODERATION }}" id="option5" autocomplete="off" {{ (array_key_exists('status', $filter) && $filter['status'] == DealStatus::MODERATION) ? 'checked' : '' }}>
|
||||
<label class="" for="option5">На проверке</label>
|
||||
</li>
|
||||
<li>
|
||||
<input wire:model.live="filter.status" type="radio" class="btn-check" name="status"
|
||||
value="{{ DealStatus::UNIQUE }}" id="option6" autocomplete="off" {{ (array_key_exists('status', $filter) && $filter['status'] == DealStatus::UNIQUE) ? 'checked' : '' }}>
|
||||
<label class="" for="option6">Уникальные</label>
|
||||
</li>
|
||||
<li>
|
||||
<input wire:model.live="filter.status" type="radio" class="btn-check" name="status"
|
||||
value="{{ DealStatus::NOT_UNIQUE }}" id="option7" autocomplete="off" {{ (array_key_exists('status', $filter) && $filter['status'] == DealStatus::NOT_UNIQUE) ? 'checked' : '' }}>
|
||||
<label class="" for="option7">Не уникальные</label>
|
||||
</li>
|
||||
</ul>
|
||||
<button class="btn btn-outline-secondary dropdown-toggle" type="button" data-bs-toggle="dropdown"
|
||||
aria-expanded="false">
|
||||
@if(array_key_exists('complexes', $filter))
|
||||
<span class="text-truncate">{{ $filter['complexes'][0]['name'] }}</span>
|
||||
@if(count($filter['complexes']) > 1)
|
||||
<span>
|
||||
+ <span class="d-inline-block bg-secondary rounded-circle fs-6 text-light"
|
||||
style="width:1.3rem;height:1.3rem">{{ count($filter['complexes']) - 1 }}</span>
|
||||
</span>
|
||||
@endif
|
||||
</div>
|
||||
@else
|
||||
Жилой комплекс
|
||||
@endif
|
||||
</button>
|
||||
<button type="button" style="width:30px" class="btn btn-secondary dropdown-toggle dropdown-toggle-split show"
|
||||
data-bs-toggle="dropdown" aria-expanded="true" data-bs-reference="parent">
|
||||
<span class="visually-hidden">Toggle Dropdown</span>
|
||||
</button>
|
||||
<ul class="dropdown-menu dropdown-menu-end">
|
||||
<ul class="dropdown-menu">
|
||||
@foreach ($complexes as $complex)
|
||||
<li>
|
||||
<div class="dropdown-item">
|
||||
@ -61,25 +50,77 @@
|
||||
</div>
|
||||
</li>
|
||||
@endforeach
|
||||
@if(1 == 2 && array_key_exists('complexes', $filter) && count($filter['complexes']) > 1)
|
||||
<div class="text-end fs-6 text-secondary">
|
||||
<span>Убрать все</span>
|
||||
</div>
|
||||
@endif
|
||||
</ul>
|
||||
<input type="text" class="form-control" aria-label="Text input with dropdown button">
|
||||
</div>
|
||||
<div class="d-flex gap-2 flex-column flex-lg-row">
|
||||
<div class="d-flex flex-row col-12 col-lg-auto p-0" style="">
|
||||
<input wire:model.live="filter.status" type="radio" class="btn-check" name="status"
|
||||
value="{{ DealStatus::MODERATION }}" id="option5" autocomplete="off" {{ (array_key_exists('status', $filter) && $filter['status'] == DealStatus::MODERATION) ? 'checked' : '' }}>
|
||||
<label class="btn btn-secondary py-2 px-1 rounded-0 rounded-start fs-5 text-truncate" for="option5">На проверке</label>
|
||||
<input wire:model.live="filter.status" type="radio" class="btn-check" name="status"
|
||||
value="{{ DealStatus::UNIQUE }}" id="option6" autocomplete="off" {{ (array_key_exists('status', $filter) && $filter['status'] == DealStatus::UNIQUE) ? 'checked' : '' }}>
|
||||
<label class="btn btn-secondary py-2 px-1 rounded-0 fs-5 text-truncate" for="option6">Уникальные</label>
|
||||
<input wire:model.live="filter.status" type="radio" class="btn-check" name="status"
|
||||
value="{{ DealStatus::NOT_UNIQUE }}" id="option7" autocomplete="off" {{ (array_key_exists('status', $filter) && $filter['status'] == DealStatus::NOT_UNIQUE) ? 'checked' : '' }}>
|
||||
<label class="btn btn-secondary py-2 px-1 rounded-0 rounded-end fs-5 text-truncate" for="option7">Не уникальные</label>
|
||||
</div>
|
||||
<div class="input-group flex-fill">
|
||||
<span class="input-group-text" id="basic-addon1">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-search"
|
||||
viewBox="0 0 16 16">
|
||||
<path
|
||||
d="M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398h-.001q.044.06.098.115l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85a1 1 0 0 0-.115-.1zM12 6.5a5.5 5.5 0 1 1-11 0 5.5 5.5 0 0 1 11 0">
|
||||
</path>
|
||||
</svg>
|
||||
</span>
|
||||
<input wire:model.live="filter.search" type="text" class="form-control form-control-lg"
|
||||
placeholder="Поиск по имени, телефону, электронной почте">
|
||||
</div>
|
||||
<!-- Выбор ЖК-->
|
||||
<div class="btn-group bg-light d-flex rounded-4 ">
|
||||
<button type="button"
|
||||
class="p-0 btn bg-light text-primary border overflow-hidden w-100 rounded-start-3 pe-0"
|
||||
style="mask-image: linear-gradient(to right, black, black 90%, transparent);">
|
||||
<div class="mx-1 text-truncate fs-5">
|
||||
@if(array_key_exists('complexes', $filter))
|
||||
<div class="">
|
||||
<span class="text-truncate">{{ $filter['complexes'][0]['name'] }}</span>
|
||||
@if(count($filter['complexes']) > 1)
|
||||
<span>
|
||||
+ <span class="d-inline-block bg-secondary rounded-circle fs-6 text-light"
|
||||
style="width:1.3rem;height:1.3rem">{{ count($filter['complexes']) - 1 }}</span>
|
||||
</span>
|
||||
@endif
|
||||
</div>
|
||||
@else
|
||||
<div class="m-2">ЖК</div>
|
||||
@endif
|
||||
</div>
|
||||
</button>
|
||||
<button type="button" style="width:30px"
|
||||
class="btn btn-secondary dropdown-toggle dropdown-toggle-split show" data-bs-toggle="dropdown"
|
||||
aria-expanded="true" data-bs-reference="parent">
|
||||
<span class="visually-hidden">Toggle Dropdown</span>
|
||||
</button>
|
||||
<ul class="dropdown-menu dropdown-menu-end">
|
||||
@foreach ($complexes as $complex)
|
||||
<li>
|
||||
<div class="dropdown-item">
|
||||
<input wire:change="toggleComplex({{ $complex['id'] }})" class="form-check-input"
|
||||
type="checkbox" id="complex_selector_{{ $complex['id'] }}">
|
||||
<label class="form-check-label" for="complex_selector_{{ $complex['id'] }}">
|
||||
{{ $complex['name'] }}
|
||||
</label>
|
||||
</div>
|
||||
</li>
|
||||
@endforeach
|
||||
@if(1 == 2 && array_key_exists('complexes', $filter) && count($filter['complexes']) > 1)
|
||||
<div class="text-end fs-6 text-secondary">
|
||||
<span>Убрать все</span>
|
||||
</div>
|
||||
@endif
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<style>
|
||||
.form-search__container {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.form-search__container::before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
left: 0;
|
||||
height: 3rem;
|
||||
width: 3rem;
|
||||
background-image: ""
|
||||
}
|
||||
</style>
|
||||
</div>
|
||||
7
lang/ru/deal.php
Normal file
7
lang/ru/deal.php
Normal file
@ -0,0 +1,7 @@
|
||||
<?php
|
||||
return [
|
||||
'NEW' => 'Новый',
|
||||
'MODERATION' => 'На проверке',
|
||||
'UNIQUE' => 'Уникальный',
|
||||
'NOT UNIQUE' => 'Не уникальный',
|
||||
];
|
||||
@ -7,8 +7,8 @@
|
||||
<div class="w-100">
|
||||
@livewire('clients.search.input')
|
||||
</div>
|
||||
<div class="ms-auto py-1 d-none d-md-block">
|
||||
<button type="button" class="btn btn-primary py-2 px-3 fs-5" data-bs-toggle="modal"
|
||||
<div class="ms-auto p-0 d-none d-md-block">
|
||||
<button type="button" class="btn btn-primary h-100 py-2 px-3 fs-5" data-bs-toggle="modal"
|
||||
data-bs-target="#createClientModal">
|
||||
<i class="bi bi-person-plus"></i> <span class="d-inline d-none">Добавить клиента</span>
|
||||
</button>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user