panel updated

This commit is contained in:
Thekindbull 2025-03-06 16:06:00 +08:00
parent 2ad20c004f
commit b30b032ec2
7 changed files with 362 additions and 68 deletions

View File

@ -17,10 +17,14 @@ class ClientsTable extends Component
use WithPagination, WithoutUrlPagination;
public $status;
public $count;
public $mode;//short || full
public function mount($status = null)
public function mount($status = null, $count = 10, $mode = 'full')
{
$this->status = $status;
$this->count = $count;
$this->mode = $mode;
}
public function getDeals()
@ -49,17 +53,17 @@ public function render()
{
$deals = $deals
->whereIn('status', [DealStatus::UNIQUE])
->orderBy('id', 'desc')->paginate(10, ['*'], 'unique_clients');
->orderBy('id', 'desc')->paginate($this->count, ['*'], 'unique_clients');
}
elseif ($this->status && $this->status == DealStatus::NOT_UNIQUE)
{
$deals = $deals
->whereIn('status', [DealStatus::MODERATION, DealStatus::NEW , DealStatus::NOT_UNIQUE])
->orderBy('id', 'desc')->paginate(10, ['*'], 'not_unique_clients');
->orderBy('id', 'desc')->paginate($this->count, ['*'], 'not_unique_clients');
}
else
{
$deals = $deals->orderBy('id', 'desc')->paginate(10, ['*'], 'all_clients');
$deals = $deals->orderBy('id', 'desc')->paginate($this->count, ['*'], 'all_clients');
}
;

View File

@ -34,16 +34,24 @@ input[type="radio"]:checked+label {
}
/*pagination*/
.page-item,
.page-link {
.page-item>.page-link,
.page-item:first-child .page-link,
.page-item:last-child .page-link {
color: #ccc;
border-color: #ccc
border-color: #ccc;
border-radius: 12px;
margin: 0 6px 0px 6px !important;
padding-top: 8px;
width: 40px;
height: 40px;
text-align: center;
}
.active>.page-link {
background-color: #e6662a !important;
color: white !important;
border-color: #e6662a !important;
background-color: #ffffff !important;
color: rgb(44, 44, 44) !important;
border-color: #b6b6b6 !important;
}
.page-item:not(.active)>.page-link:hover {

View File

@ -11,6 +11,12 @@ class="nav-link d-flex align-items-center gap-2 fs-5 border rounded-4 active" ar
<i class="bi bi-person"></i> <span class="d-none d-lg-inline">Клиенты</span>
</a>
</li>
<li class="nav-item text-center m-2">
<a href="/projects"
class="nav-link d-flex align-items-center gap-2 fs-5 border rounded-4 active" aria-current="page">
<i class="bi bi-book"></i> <span class="d-none d-lg-inline">Проекты</span>
</a>
</li>
<li class="nav-item text-center m-2">
<a href="{{ route('company.agents.table') }}"
class="nav-link d-flex align-items-center gap-2 fs-5 border rounded-4 active" aria-current="page">

View File

@ -1,5 +1,8 @@
<div>
<div class="fs-5 bg-light p-0 m-0 border border-1 rounded-4 overflow-hidden">
@if ($deals->count() == 0)
<div class="text-center py-5">Нет данных для отображения</div>
@endif
<table class="table m-0">
<tbody class="">
@foreach ($deals as $deal)
@ -9,29 +12,42 @@
</td>
<td class="fw-semibold fs-5 align-middle">
{{ $deal->user->name }}
@if($deal->status == $statuses::MODERATION)
@if ($deal->status == $statuses::MODERATION)
<div>
<span class="badge text-bg-secondary">
На проверке уникальности
На проверке уникальности
</span>
</div>
@endif
</td>
<td class="align-middle">
{{ $deal->user->phone }}
</td>
<td class="align-middle">
{{ $deal->user->email }}
</td>
<td class="align-middle">
{{ $deal->complex->city->name }}
</td>
@if ($mode == 'full')
<td class="align-middle">
{{ $deal->user->phone }}
</td>
<td class="align-middle">
{{ $deal->user->email }}
</td>
<td class="align-middle">
{{ $deal->complex->city->name }}
</td>
<td class="align-middle">
<a href="#" class="btn">
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16"
fill="currentColor" class="bi bi-three-dots-vertical" viewBox="0 0 16 16">
<path
d="M9.5 13a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0m0-5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0m0-5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0" />
</svg>
</a>
</td>
@endif
</tr>
@endforeach
</tbody>
</table>
</div>
<div class="mt-3">
{{ $deals->links('vendor.pagination.bootstrap-5', ['scrollTo' => false]) }}
</div>
@if ($mode == 'full')
<div class="mt-3">
{{ $deals->links('vendor.pagination.bootstrap-5', ['scrollTo' => false]) }}
</div>
@endif
</div>

View File

@ -0,0 +1,297 @@
@extends('layouts.app')
@section('content')
<style>
.btn-check:checked+.btn {
background-color: rgb(231, 117, 11);
color: white;
}
td,
h4 {
color: #333c4e !important
}
</style>
<div class="container">
<div>
<div class="d-flex mb-3">
<div class="p-2 border rounded-3 border-1 p-1 bg-white">
<input type="radio" class="btn-check" name="options-base" id="option5" autocomplete="off" checked>
<label class="btn p-2 fs-5" for="option5">Все</label>
<input type="radio" class="btn-check" name="options-base" id="option6" autocomplete="off">
<label class="btn p-2 fs-5" for="option6">Забронированные</label>
<input type="radio" class="btn-check" name="options-base" id="option7" autocomplete="off">
<label class="btn p-2 fs-5" for="option7">Приобретенные</label>
</div>
<div class="ms-auto p-2 hstack gap-2">
<select class="form-select form-select-lg bg-white" aria-label="Large select example">
<option selected>Город: любой</option>
<option value="1">Иркутск</option>
<option value="2">Владивосток</option>
<option value="3">Красноярск</option>
</select>
<select class="form-select form-select-lg bg-white" aria-label="Large select example">
<option selected>Вид: квартиры</option>
<option value="1">Квартиры</option>
<option value="2">Кладовые</option>
<option value="3">Офисы</option>
</select>
</div>
</div>
<div class="d-flex mb-3">
<div class="me-2">
<div class="fw-bold fs-6 text-secondary">
Комнатность
</div>
<div class="border rounded-3 bg-white p-1">
<input type="radio" class="btn-check" name="options-base1" id="option10" autocomplete="off" checked>
<label class="btn p-2 fs-5" for="option10">Студия</label>
<div class="vr"></div>
<input type="radio" class="btn-check" name="options-base1" id="option11" autocomplete="off">
<label class="btn p-2 fs-5" for="option11">1</label>
<div class="vr"></div>
<input type="radio" class="btn-check" name="options-base1" id="option12" autocomplete="off">
<label class="btn p-2 fs-5" for="option12">2</label>
<div class="vr"></div>
<input type="radio" class="btn-check" name="options-base1" id="option13" autocomplete="off">
<label class="btn p-2 fs-5" for="option13">3</label>
<div class="vr"></div>
<input type="radio" class="btn-check" name="options-base1" id="option14" autocomplete="off">
<label class="btn p-2 fs-5" for="option14">4+</label>
</div>
</div>
<div class="mx-2">
<div class="fw-bold fs-6 text-secondary">
Стоимость, млн. Р
</div>
<div class="border rounded-3 bg-white pt-2 pb-1">
<div class="input-group bg-white border-0 fs-5">
<span class="input-group-text bg-white border-0 fs-5">от</span>
<input type="text" class="form-control bg-white border-0 fs-5 fw-semibold"
style="max-width:70px" placeholder="from" value="5.5" aria-label="Username">
<span class="input-group-text bg-white border-0 fs-5">до</span>
<input type="text" class="form-control bg-white border-0 fs-5 fw-semibold" placeholder="to"
style="max-width:70px" value="35.4" aria-label="Server">
</div>
</div>
</div>
<div class="mx-2">
<div class="fw-bold fs-6 text-secondary">
Срок заселения
</div>
<div class="border rounded-3 bg-white p-1">
<input type="radio" class="btn-check" name="options-base2" id="option20" autocomplete="off" checked>
<label class="btn p-2 fs-5" for="option20">Сдан</label>
<div class="vr"></div>
<input type="radio" class="btn-check" name="options-base2" id="option21" autocomplete="off">
<label class="btn p-2 fs-5" for="option21">2024</label>
<div class="vr"></div>
<input type="radio" class="btn-check" name="options-base2" id="option22" autocomplete="off">
<label class="btn p-2 fs-5" for="option22">2025</label>
<div class="vr"></div>
<input type="radio" class="btn-check" name="options-base2" id="option23" autocomplete="off">
<label class="btn p-2 fs-5" for="option23">2026+</label>
</div>
</div>
<div class="ms-2 ms-auto">
<div class="fw-bold fs-6 text-secondary">
&nbsp;
</div>
<div class="border rounded-3 bg-white p-1">
<input type="radio" class="btn-check" name="options-base3" id="option30" autocomplete="off" checked>
<label class="btn p-2 fs-5" for="option30">
<i class="bi bi-grid-fill"></i>
</label>
<input type="radio" class="btn-check" name="options-base3" id="option31" autocomplete="off">
<label class="btn p-2 fs-5" for="option31">
<i class="bi bi-geo-alt-fill"></i>
</label>
</div>
</div>
</div>
</div>
<div>
<div class="d-flex">
<div class="card flex-fill me-2" style="">
<div class="card-img-top ratio ratio-16x9">
<img src="https://img3.sibdom.ru/images/photo_crop_282_212/houses/photo_main/97/97be/97be2371dd0bba9c4605c3ea6f06e213.jpg"
class="" alt="...">
<div class="position-absolute bottom-0 start-0 m-3">
<span class="badge bg-light text-dark border-secondary bg-opacity-75 fs-6 rounded-pill">Новые
корпуса</span>
<span class="badge bg-light text-dark border-secondary bg-opacity-75 fs-6 rounded-pill">Ипотека
5%</span>
</div>
</div>
<div class="card-body">
<h5 class="d-flex card-title fw-bold">
<span class="">Пионер</span>
<span class="ms-auto fw-bold fs-6" style="color:#e6662a">от 4,5 млн. Р</span>
</h5>
<p class="card-text">Иркутск, ул. 4-я Совесткая, 11</p>
</div>
</div>
<div class="card flex-fill mx-2" style="">
<div class="card-img-top ratio ratio-16x9">
<img src="https://img3.sibdom.ru/images/photo_crop_282_212/houses/photo_main/97/97be/97be2371dd0bba9c4605c3ea6f06e213.jpg"
class="" alt="...">
<div class="position-absolute bottom-0 start-0 m-3">
<span class="badge bg-light text-dark border-secondary bg-opacity-75 fs-6 rounded-pill">Новые
корпуса</span>
<span class="badge bg-light text-dark border-secondary bg-opacity-75 fs-6 rounded-pill">Ипотека
5%</span>
</div>
</div>
<div class="card-body">
<h5 class="d-flex card-title fw-bold">
<span class="">Пионер</span>
<span class="ms-auto fw-bold fs-6" style="color:#e6662a">от 4,5 млн. Р</span>
</h5>
<p class="card-text">Иркутск, ул. 4-я Совесткая, 11</p>
</div>
</div>
<div class="card flex-fill ms-2" style="">
<div class="card-img-top ratio ratio-16x9">
<img src="https://img3.sibdom.ru/images/photo_crop_282_212/houses/photo_main/97/97be/97be2371dd0bba9c4605c3ea6f06e213.jpg"
class="" alt="...">
<div class="position-absolute bottom-0 start-0 m-3">
<span class="badge bg-light text-dark border-secondary bg-opacity-75 fs-6 rounded-pill">Новые
корпуса</span>
<span class="badge bg-light text-dark border-secondary bg-opacity-75 fs-6 rounded-pill">Ипотека
5%</span>
</div>
</div>
<div class="card-body">
<h5 class="d-flex card-title fw-bold">
<span class="">Пионер</span>
<span class="ms-auto fw-bold fs-6" style="color:#e6662a">от 4,5 млн. Р</span>
</h5>
<p class="card-text">Иркутск, ул. 4-я Совесткая, 11</p>
</div>
</div>
</div>
<div class="d-flex mt-3">
<div class="card flex-fill me-2" style="">
<div class="card-img-top ratio ratio-16x9">
<img src="https://img3.sibdom.ru/images/photo_crop_282_212/houses/photo_main/97/97be/97be2371dd0bba9c4605c3ea6f06e213.jpg"
class="" alt="...">
<div class="position-absolute bottom-0 start-0 m-3">
<span class="badge bg-light text-dark border-secondary bg-opacity-75 fs-6 rounded-pill">Новые
корпуса</span>
<span class="badge bg-light text-dark border-secondary bg-opacity-75 fs-6 rounded-pill">Ипотека
5%</span>
</div>
</div>
<div class="card-body">
<h5 class="d-flex card-title fw-bold">
<span class="">Пионер</span>
<span class="ms-auto fw-bold fs-6" style="color:#e6662a">от 4,5 млн. Р</span>
</h5>
<p class="card-text">Иркутск, ул. 4-я Совесткая, 11</p>
</div>
</div>
<div class="card flex-fill mx-2" style="">
<div class="card-img-top ratio ratio-16x9">
<img src="https://img3.sibdom.ru/images/photo_crop_282_212/houses/photo_main/97/97be/97be2371dd0bba9c4605c3ea6f06e213.jpg"
class="" alt="...">
<div class="position-absolute bottom-0 start-0 m-3">
<span class="badge bg-light text-dark border-secondary bg-opacity-75 fs-6 rounded-pill">Новые
корпуса</span>
<span class="badge bg-light text-dark border-secondary bg-opacity-75 fs-6 rounded-pill">Ипотека
5%</span>
</div>
</div>
<div class="card-body">
<h5 class="d-flex card-title fw-bold">
<span class="">Пионер</span>
<span class="ms-auto fw-bold fs-6" style="color:#e6662a">от 4,5 млн. Р</span>
</h5>
<p class="card-text">Иркутск, ул. 4-я Совесткая, 11</p>
</div>
</div>
<div class="card flex-fill ms-2" style="">
<div class="card-img-top ratio ratio-16x9">
<img src="https://img3.sibdom.ru/images/photo_crop_282_212/houses/photo_main/97/97be/97be2371dd0bba9c4605c3ea6f06e213.jpg"
class="" alt="...">
<div class="position-absolute bottom-0 start-0 m-3">
<span class="badge bg-light text-dark border-secondary bg-opacity-75 fs-6 rounded-pill">Новые
корпуса</span>
<span class="badge bg-light text-dark border-secondary bg-opacity-75 fs-6 rounded-pill">Ипотека
5%</span>
</div>
</div>
<div class="card-body">
<h5 class="d-flex card-title fw-bold">
<span class="">Пионер</span>
<span class="ms-auto fw-bold fs-6" style="color:#e6662a">от 4,5 млн. Р</span>
</h5>
<p class="card-text">Иркутск, ул. 4-я Совесткая, 11</p>
</div>
</div>
</div>
<div class="d-flex mt-3">
<div class="card flex-fill me-2" style="">
<div class="card-img-top ratio ratio-16x9">
<img src="https://img3.sibdom.ru/images/photo_crop_282_212/houses/photo_main/97/97be/97be2371dd0bba9c4605c3ea6f06e213.jpg"
class="" alt="...">
<div class="position-absolute bottom-0 start-0 m-3">
<span class="badge bg-light text-dark border-secondary bg-opacity-75 fs-6 rounded-pill">Новые
корпуса</span>
<span class="badge bg-light text-dark border-secondary bg-opacity-75 fs-6 rounded-pill">Ипотека
5%</span>
</div>
</div>
<div class="card-body">
<h5 class="d-flex card-title fw-bold">
<span class="">Пионер</span>
<span class="ms-auto fw-bold fs-6" style="color:#e6662a">от 4,5 млн. Р</span>
</h5>
<p class="card-text">Иркутск, ул. 4-я Совесткая, 11</p>
</div>
</div>
<div class="card flex-fill mx-2" style="">
<div class="card-img-top ratio ratio-16x9">
<img src="https://img3.sibdom.ru/images/photo_crop_282_212/houses/photo_main/97/97be/97be2371dd0bba9c4605c3ea6f06e213.jpg"
class="" alt="...">
<div class="position-absolute bottom-0 start-0 m-3">
<span class="badge bg-light text-dark border-secondary bg-opacity-75 fs-6 rounded-pill">Новые
корпуса</span>
<span class="badge bg-light text-dark border-secondary bg-opacity-75 fs-6 rounded-pill">Ипотека
5%</span>
</div>
</div>
<div class="card-body">
<h5 class="d-flex card-title fw-bold">
<span class="">Пионер</span>
<span class="ms-auto fw-bold fs-6" style="color:#e6662a">от 4,5 млн. Р</span>
</h5>
<p class="card-text">Иркутск, ул. 4-я Совесткая, 11</p>
</div>
</div>
<div class="card flex-fill ms-2" style="">
<div class="card-img-top ratio ratio-16x9">
<img src="https://img3.sibdom.ru/images/photo_crop_282_212/houses/photo_main/97/97be/97be2371dd0bba9c4605c3ea6f06e213.jpg"
class="" alt="...">
<div class="position-absolute bottom-0 start-0 m-3">
<span class="badge bg-light text-dark border-secondary bg-opacity-75 fs-6 rounded-pill">Новые
корпуса</span>
<span class="badge bg-light text-dark border-secondary bg-opacity-75 fs-6 rounded-pill">Ипотека
5%</span>
</div>
</div>
<div class="card-body">
<h5 class="d-flex card-title fw-bold">
<span class="">Пионер</span>
<span class="ms-auto fw-bold fs-6" style="color:#e6662a">от 4,5 млн. Р</span>
</h5>
<p class="card-text">Иркутск, ул. 4-я Совесткая, 11</p>
</div>
</div>
</div>
</div>
</div>
@endsection

View File

@ -29,50 +29,7 @@ class="list-group-item list-group-item-action p-3 bg-white rounded border border
<a href="{{ route('clients.table') }}">Смотреть все</a>
</div>
</div>
<div class="list-group">
<a href="#" class="list-group-item list-group-item-action" aria-current="true">
<div class="d-flex flex-row">
<div class="p-2">
<img src="../../images/icons/user.png" class="img-fluid align-middle"
style="height: 50px;">
</div>
<div class="align-self-center">
<div class="d-flex w-100 justify-content-between">
<h5 class="mb-1">Федор Петров</h5>
</div>
<p class="mb-1">+7 999 999 99 99</p>
</div>
</div>
</a>
<a href="#" class="list-group-item list-group-item-action" aria-current="true">
<div class="d-flex flex-row">
<div class="p-2">
<img src="../../images/icons/user.png" class="img-fluid align-middle"
style="height: 50px;">
</div>
<div class="align-self-center">
<div class="d-flex w-100 justify-content-between">
<h5 class="mb-1">Федор Петров</h5>
</div>
<p class="mb-1">+7 999 999 99 99</p>
</div>
</div>
</a>
<a href="#" class="list-group-item list-group-item-action" aria-current="true">
<div class="d-flex flex-row">
<div class="p-2">
<img src="../../images/icons/user.png" class="img-fluid align-middle"
style="height: 50px;">
</div>
<div class="align-self-center">
<div class="d-flex w-100 justify-content-between">
<h5 class="mb-1">Федор Петров</h5>
</div>
<p class="mb-1">+7 999 999 99 99</p>
</div>
</div>
</a>
</div>
@livewire('clientsTable', ['count' => 3, 'mode' => 'short'])
</div>
</div>
<div class="col-12 col-lg-6">

View File

@ -44,4 +44,10 @@
Route::get('/agents/table', [App\Http\Controllers\Company\AgentsTableController::class, 'index'])->name('company.agents.table');
Route::post('/company/details/', App\Http\Controllers\Company\CreateAgentController::class)->name('company.agents.store');
});
//МАКЕТЫ
Route::get('projects', function ()
{
return view(view: 'projects.index');
});