обновил страницу договоров: вывел столбцы, переформатировал сборку таблицы
This commit is contained in:
parent
45517f7d1b
commit
068a417695
187
resources/views/livewire/clients-table.blade copy.php
Normal file
187
resources/views/livewire/clients-table.blade copy.php
Normal file
@ -0,0 +1,187 @@
|
|||||||
|
<div class="position-relative">
|
||||||
|
<div wire:loading.class.remove="d-none"
|
||||||
|
class="d-none d-flex position-absolute w-100 h-100 top-0 start-0 align-items-center justify-content-center rounded-4"
|
||||||
|
style="background-color:#ffffffb5">
|
||||||
|
<div class="spinner-border text-secondary" style="width: 3rem; height: 3rem;" role="status">
|
||||||
|
<span class="visually-hidden">Loading...</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="fs-5 bg-light p-0 m-0 border border-1 rounded-4">
|
||||||
|
@if ($clients->count() == 0)
|
||||||
|
<div class="text-center py-5">Нет данных для отображения</div>
|
||||||
|
@endif
|
||||||
|
<div class="vstack gap-2">
|
||||||
|
@foreach ($clients as $client)
|
||||||
|
<?php
|
||||||
|
$complexesNames = [];
|
||||||
|
$companiesNames = [];
|
||||||
|
$agentsNames = [];
|
||||||
|
$filterRow = [];
|
||||||
|
$clientDeals = $client->deals();
|
||||||
|
if (array_key_exists('status', $filter)) {
|
||||||
|
$clientDeals->where('status', $filter['status']);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (array_key_exists('complexes', $filter)) {
|
||||||
|
$complexes = [];
|
||||||
|
foreach ($filter['complexes'] as $selectedComplex) {
|
||||||
|
$complexes[] = $selectedComplex['id'];
|
||||||
|
}
|
||||||
|
$clientDeals->whereIn('complex_id', $complexes);
|
||||||
|
}
|
||||||
|
//echo 'cId:' . $client->id;
|
||||||
|
foreach ($clientDeals->get() as $deal) {
|
||||||
|
//echo 'dId:' . $deal->id;
|
||||||
|
$filterRow[] = 'filter[deal_id][]=' . $deal->id;
|
||||||
|
$complexesNames[] = '<span>'
|
||||||
|
. $deal->complex?->name
|
||||||
|
. (($deal->unique_until) ? '<span class="ms-1" title="Срок уникальности истечет ' . \Carbon\Carbon::parse($deal->unique_until)->format('d.m.Y') . '">' . '<i class="bi bi-info-circle-fill"></i>' . '</span>' : '')
|
||||||
|
. '</span>';
|
||||||
|
$companiesNames[] = $deal->agent?->company?->name;
|
||||||
|
$agentsNames[] = $deal->agent?->user?->name;
|
||||||
|
}
|
||||||
|
$filterRow = implode('&', $filterRow);
|
||||||
|
$complexesNames = array_unique($complexesNames);
|
||||||
|
$companiesNames = array_unique($companiesNames);
|
||||||
|
$companiesNames = implode('<br>', $companiesNames);
|
||||||
|
$agentsNames = array_unique($agentsNames);
|
||||||
|
$agentsNames = implode('<br>', $agentsNames);
|
||||||
|
$dealsWithContracts = $client->deals()->whereHas('contract');
|
||||||
|
?>
|
||||||
|
@if ($mode == 'full')
|
||||||
|
<div class="d-flex flex-row m-0 my-2 px-2 client-row">
|
||||||
|
<div class="d-flex flex-column flex-md-row w-100">
|
||||||
|
<div class="col fw-semibold fs-5 align-middle text-start">
|
||||||
|
{{ $client->name }}
|
||||||
|
@if (env('APP_DEBUG'))
|
||||||
|
<div class="d-none">
|
||||||
|
@foreach($client->deals as $deal)
|
||||||
|
<div class="text-secondary fs-6 fw-light">Bitrix ID: {{ $deal->bitrixId() }} </div>
|
||||||
|
@endforeach
|
||||||
|
</div>
|
||||||
|
@endif
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col position-relative">
|
||||||
|
<div class="clients-table_complexes position-md-absolute rounded p-1">
|
||||||
|
@if(count($complexesNames) > 1)
|
||||||
|
<div class="table_complexes_complexes_main">{!! $complexesNames[0] !!}
|
||||||
|
+ <span class="text-center d-inline-block bg-secondary rounded-circle fs-6 text-light"
|
||||||
|
style="width:1.3rem;height:1.3rem">{{ count($complexesNames) - 1 }}</span>
|
||||||
|
</div>
|
||||||
|
@endif
|
||||||
|
{!! implode('<br>', array: $complexesNames) !!}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
@if (auth()->user()->isCityManager())
|
||||||
|
<div class="col col-md-2 align-middle text-truncate">
|
||||||
|
{!! $companiesNames !!}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col col-md-2 align-middle text-truncate">
|
||||||
|
{!! $agentsNames !!}
|
||||||
|
</div>
|
||||||
|
@endif
|
||||||
|
|
||||||
|
<div class="col col-md-2 align-middle">
|
||||||
|
{{ $client->phone }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col col-md-1 text-end contracts-link">
|
||||||
|
@if ($dealsWithContracts->count() == 1)
|
||||||
|
<a href="{{ route('contract', ['contract' => $dealsWithContracts->first()->contract]) }}"
|
||||||
|
class="icon-link icon-link-hover">
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" fill="currentColor"
|
||||||
|
class="bi bi-file-earmark-text" viewBox="0 0 16 16">
|
||||||
|
<path
|
||||||
|
d="M5.5 7a.5.5 0 0 0 0 1h5a.5.5 0 0 0 0-1zM5 9.5a.5.5 0 0 1 .5-.5h5a.5.5 0 0 1 0 1h-5a.5.5 0 0 1-.5-.5m0 2a.5.5 0 0 1 .5-.5h2a.5.5 0 0 1 0 1h-2a.5.5 0 0 1-.5-.5" />
|
||||||
|
<path
|
||||||
|
d="M9.5 0H4a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2V4.5zm0 1v2A1.5 1.5 0 0 0 11 4.5h2V14a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V2a1 1 0 0 1 1-1z" />
|
||||||
|
</svg>
|
||||||
|
</a>
|
||||||
|
@elseif($dealsWithContracts->count() > 1)
|
||||||
|
<a href="{{ route('contracts', [$filterRow]) }}" class="icon-link icon-link-hover">
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" fill="currentColor"
|
||||||
|
class="bi bi-arrow-right" viewBox="0 0 16 16">
|
||||||
|
<path fill-rule="evenodd"
|
||||||
|
d="M1 8a.5.5 0 0 1 .5-.5h11.793l-3.147-3.146a.5.5 0 0 1 .708-.708l4 4a.5.5 0 0 1 0 .708l-4 4a.5.5 0 0 1-.708-.708L13.293 8.5H1.5A.5.5 0 0 1 1 8" />
|
||||||
|
</svg>
|
||||||
|
</a>
|
||||||
|
@endif
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
@else
|
||||||
|
<div class="m-2 my-1">
|
||||||
|
@if ($dealsWithContracts->count() == 1)
|
||||||
|
<a href="{{ route('contract', ['contract' => $dealsWithContracts->first()->contract]) }}"
|
||||||
|
class="icon-link icon-link-hover w-100 hstack gap-2 text-decoration-none">
|
||||||
|
<span class="col-8 text-dark">{{ $client->name }}</span>
|
||||||
|
@if (auth()->user()->isCityManager())
|
||||||
|
<div class="col align-middle text-truncate">
|
||||||
|
{!! $companiesNames !!}
|
||||||
|
</div>
|
||||||
|
@endif
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" fill="currentColor"
|
||||||
|
class="bi bi-file-earmark-text ms-auto" viewBox="0 0 16 16">
|
||||||
|
<path
|
||||||
|
d="M5.5 7a.5.5 0 0 0 0 1h5a.5.5 0 0 0 0-1zM5 9.5a.5.5 0 0 1 .5-.5h5a.5.5 0 0 1 0 1h-5a.5.5 0 0 1-.5-.5m0 2a.5.5 0 0 1 .5-.5h2a.5.5 0 0 1 0 1h-2a.5.5 0 0 1-.5-.5" />
|
||||||
|
<path
|
||||||
|
d="M9.5 0H4a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2V4.5zm0 1v2A1.5 1.5 0 0 0 11 4.5h2V14a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V2a1 1 0 0 1 1-1z" />
|
||||||
|
</svg>
|
||||||
|
</a>
|
||||||
|
@elseif($dealsWithContracts->count() > 1)
|
||||||
|
<?php
|
||||||
|
$filterRow = [];
|
||||||
|
foreach ($client->deals as $deal) {
|
||||||
|
$filterRow[] = 'filter[deal_id][]=' . $deal->id;
|
||||||
|
}
|
||||||
|
$filterRow = implode('&', $filterRow);
|
||||||
|
?>
|
||||||
|
<a href="{{ route('contracts', [$filterRow]) }}"
|
||||||
|
class="icon-link icon-link-hover w-100 hstack gap-2 text-decoration-none">
|
||||||
|
<span class="col-8 text-dark">{{ $client->name }}</span>
|
||||||
|
@if (auth()->user()->isCityManager())
|
||||||
|
<div class="col align-middle text-truncate">
|
||||||
|
{!! $companiesNames !!}
|
||||||
|
</div>
|
||||||
|
@endif
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" fill="currentColor"
|
||||||
|
class="bi bi-arrow-right ms-auto" viewBox="0 0 16 16">
|
||||||
|
<path fill-rule="evenodd"
|
||||||
|
d="M1 8a.5.5 0 0 1 .5-.5h11.793l-3.147-3.146a.5.5 0 0 1 .708-.708l4 4a.5.5 0 0 1 0 .708l-4 4a.5.5 0 0 1-.708-.708L13.293 8.5H1.5A.5.5 0 0 1 1 8" />
|
||||||
|
</svg>
|
||||||
|
</a>
|
||||||
|
@else
|
||||||
|
<a href="" class=" icon-link icon-link-hover w-100 hstack gap-2 text-decoration-none">
|
||||||
|
<span class="col-8 text-truncate text-dark">{{ $client->name }}</span>
|
||||||
|
@if (auth()->user()->isCityManager())
|
||||||
|
<div class="col align-middle text-truncate">
|
||||||
|
{!! $companiesNames !!}
|
||||||
|
</div>
|
||||||
|
@endif
|
||||||
|
</a>
|
||||||
|
@endif
|
||||||
|
</div>
|
||||||
|
@endif
|
||||||
|
@endforeach
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
@if($mode == 'full')
|
||||||
|
@if($clientsCount > $count)
|
||||||
|
<div class="d-flex justify-content-end mt-2">
|
||||||
|
<ul class="pagination">
|
||||||
|
<li class="d-none page-item {{ ($currentPage == 1) ? 'disabled' : ''}}" aria-label="« Назад">
|
||||||
|
<span class="page-link" aria-hidden="true">‹</span>
|
||||||
|
</li>
|
||||||
|
@for($pageNum = 1; $pageNum <= $clientsCount / $count; $pageNum++)
|
||||||
|
<li wire:click="goToPage({{ $pageNum }})" class="page-item {{ ($pageNum == $currentPage) ? 'active' : '' }}"
|
||||||
|
aria-current="page" style="cursor:pointer"><span class="page-link">{{ $pageNum }}</span></li>
|
||||||
|
@endfor
|
||||||
|
<li class="d-none page-item">
|
||||||
|
<a class="page-link" rel="next" aria-label="Вперед »">›</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
@endif
|
||||||
|
@endif
|
||||||
|
</div>
|
||||||
@ -6,11 +6,25 @@ class="d-none d-flex position-absolute w-100 h-100 top-0 start-0 align-items-cen
|
|||||||
<span class="visually-hidden">Loading...</span>
|
<span class="visually-hidden">Loading...</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="fs-5 bg-light p-0 m-0 border border-1 rounded-4">
|
<div class="fs-5 bg-light p-0 m-0 border border-1 rounded-4 overflow-hidden">
|
||||||
@if ($clients->count() == 0)
|
@if ($clients->count() == 0)
|
||||||
<div class="text-center py-5">Нет данных для отображения</div>
|
<div class="text-center py-5">Нет данных для отображения</div>
|
||||||
@endif
|
@endif
|
||||||
<div class="vstack gap-2">
|
<table class="m-0 @if($clients->count() == 0) d-none @endif table table-striped table-hover">
|
||||||
|
@if ($mode == 'full')
|
||||||
|
<thead>
|
||||||
|
<tr class="d-none d-lg-table-row" scope="col">
|
||||||
|
<th>Клиент
|
||||||
|
<th>ЖК
|
||||||
|
@if (auth()->user()->isCityManager())
|
||||||
|
<th>Агентства
|
||||||
|
<th>Агенты
|
||||||
|
@endif
|
||||||
|
<th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
@endif
|
||||||
|
<tbody>
|
||||||
@foreach ($clients as $client)
|
@foreach ($clients as $client)
|
||||||
<?php
|
<?php
|
||||||
$complexesNames = [];
|
$complexesNames = [];
|
||||||
@ -33,10 +47,10 @@ class="d-none d-flex position-absolute w-100 h-100 top-0 start-0 align-items-cen
|
|||||||
foreach ($clientDeals->get() as $deal) {
|
foreach ($clientDeals->get() as $deal) {
|
||||||
//echo 'dId:' . $deal->id;
|
//echo 'dId:' . $deal->id;
|
||||||
$filterRow[] = 'filter[deal_id][]=' . $deal->id;
|
$filterRow[] = 'filter[deal_id][]=' . $deal->id;
|
||||||
$complexesNames[] = '<span>'
|
$complexesNames[] = ''
|
||||||
. $deal->complex?->name
|
. $deal->complex?->name
|
||||||
. (($deal->unique_until) ? '<span class="ms-1" title="Срок уникальности истечет ' . \Carbon\Carbon::parse($deal->unique_until)->format('d.m.Y') . '">' . '<i class="bi bi-info-circle-fill"></i>' . '</span>' : '')
|
. (($deal->unique_until) ? '<span class="ms-1" title="Срок уникальности истечет ' . \Carbon\Carbon::parse($deal->unique_until)->format('d.m.Y') . '">' . '<i class="bi bi-info-circle-fill"></i>' . '</span>' : '')
|
||||||
. '</span>';
|
. '';
|
||||||
$companiesNames[] = $deal->agent?->company?->name;
|
$companiesNames[] = $deal->agent?->company?->name;
|
||||||
$agentsNames[] = $deal->agent?->user?->name;
|
$agentsNames[] = $deal->agent?->user?->name;
|
||||||
}
|
}
|
||||||
@ -48,11 +62,11 @@ class="d-none d-flex position-absolute w-100 h-100 top-0 start-0 align-items-cen
|
|||||||
$agentsNames = implode('<br>', $agentsNames);
|
$agentsNames = implode('<br>', $agentsNames);
|
||||||
$dealsWithContracts = $client->deals()->whereHas('contract');
|
$dealsWithContracts = $client->deals()->whereHas('contract');
|
||||||
?>
|
?>
|
||||||
|
<tr class="d-flex d-lg-table-row flex-column flex-md-row my-4 my-lg-0" scope="row">
|
||||||
@if ($mode == 'full')
|
@if ($mode == 'full')
|
||||||
<div class="d-flex flex-row m-0 my-2 px-2 client-row">
|
<td class="align-middle d-flex flex-column d-lg-table-cell">
|
||||||
<div class="d-flex flex-column flex-md-row w-100">
|
|
||||||
<div class="col fw-semibold fs-5 align-middle text-start">
|
|
||||||
{{ $client->name }}
|
{{ $client->name }}
|
||||||
|
<div class="fw-bold text-nowrap">{{ $client->phone }}</div>
|
||||||
@if (env('APP_DEBUG'))
|
@if (env('APP_DEBUG'))
|
||||||
<div class="d-none">
|
<div class="d-none">
|
||||||
@foreach($client->deals as $deal)
|
@foreach($client->deals as $deal)
|
||||||
@ -60,38 +74,65 @@ class="d-none d-flex position-absolute w-100 h-100 top-0 start-0 align-items-cen
|
|||||||
@endforeach
|
@endforeach
|
||||||
</div>
|
</div>
|
||||||
@endif
|
@endif
|
||||||
</div>
|
</td>
|
||||||
|
<td class="d-block d-lg-table-cell">
|
||||||
<div class="col position-relative">
|
<span class="d-block d-md-none fs-6 text-secondary">Жилой комплекс</span>
|
||||||
<div class="clients-table_complexes position-md-absolute rounded p-1">
|
|
||||||
@if(count($complexesNames) > 1)
|
@if(count($complexesNames) > 1)
|
||||||
<div class="table_complexes_complexes_main">{!! $complexesNames[0] !!}
|
<div class="table_complexes_complexes_main">{!! $complexesNames[0] !!}
|
||||||
+ <span class="text-center d-inline-block bg-secondary rounded-circle fs-6 text-light"
|
+ <span class="text-center d-inline-block bg-secondary rounded-circle fs-6 text-light"
|
||||||
style="width:1.3rem;height:1.3rem">{{ count($complexesNames) - 1 }}</span>
|
style="width:1.3rem;height:1.3rem;cursor:pointer"
|
||||||
|
title="{{ implode(', ', $complexesNames) }}">{{ count($complexesNames) - 1 }}</span>
|
||||||
</div>
|
</div>
|
||||||
@endif
|
@endif
|
||||||
{!! implode('<br>', array: $complexesNames) !!}
|
</td>
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
@if (auth()->user()->isCityManager())
|
@if (auth()->user()->isCityManager())
|
||||||
<div class="col col-md-2 align-middle text-truncate">
|
<td class="d-block d-lg-table-cell">
|
||||||
|
<span class="d-block d-md-none fs-6 text-secondary">Агентство</span>
|
||||||
{!! $companiesNames !!}
|
{!! $companiesNames !!}
|
||||||
</div>
|
</td>
|
||||||
|
<td class="d-block d-lg-table-cell">
|
||||||
<div class="col col-md-2 align-middle text-truncate">
|
<span class="d-block d-md-none fs-6 text-secondary">Агент</span>
|
||||||
{!! $agentsNames !!}
|
{!! $agentsNames !!}
|
||||||
</div>
|
</td>
|
||||||
|
@endif
|
||||||
|
<td>
|
||||||
|
@php($contractRoute = "")
|
||||||
|
@if ($dealsWithContracts->count() == 1)
|
||||||
|
@php($contractRoute = route('contract', ['contract' => $dealsWithContracts->first()->contract]))
|
||||||
|
@elseif($dealsWithContracts->count() > 1)
|
||||||
|
@php($contractRoute = route('contracts', [$filterRow]))
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
<div class="col col-md-2 align-middle">
|
<div class="d-block d-md-none text-end fs-6">
|
||||||
{{ $client->phone }}
|
<a class="icon-link icon-link-hover text-decoration-none w-100" style="--bs-link-hover-color-rgb: 25, 135, 84;"
|
||||||
|
href="{{ $contractRoute }}">
|
||||||
|
Перейти к сделке
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" class="bi" viewBox="0 0 16 16"
|
||||||
|
aria-hidden="true">
|
||||||
|
<path
|
||||||
|
d="M1 8a.5.5 0 0 1 .5-.5h11.793l-3.147-3.146a.5.5 0 0 1 .708-.708l4 4a.5.5 0 0 1 0 .708l-4 4a.5.5 0 0 1-.708-.708L13.293 8.5H1.5A.5.5 0 0 1 1 8z" />
|
||||||
|
</svg>
|
||||||
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="d-none d-md-block" style="">
|
||||||
|
<a target="_blank" href="{{ $contractRoute }}"
|
||||||
|
class="icon-link icon-link-hover text-decoration-none w-100">
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" width="30" height="30" fill="currentColor"
|
||||||
|
class="bi bi-arrow-right" viewBox="0 0 16 16">
|
||||||
|
<path fill-rule="evenodd"
|
||||||
|
d="M1 8a.5.5 0 0 1 .5-.5h11.793l-3.147-3.146a.5.5 0 0 1 .708-.708l4 4a.5.5 0 0 1 0 .708l-4 4a.5.5 0 0 1-.708-.708L13.293 8.5H1.5A.5.5 0 0 1 1 8" />
|
||||||
|
</svg>
|
||||||
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="col col-md-1 text-end contracts-link">
|
</td>
|
||||||
|
@else
|
||||||
|
<td class="align-middle d-flex flex-column d-lg-table-cell">
|
||||||
@if ($dealsWithContracts->count() == 1)
|
@if ($dealsWithContracts->count() == 1)
|
||||||
<a href="{{ route('contract', ['contract' => $dealsWithContracts->first()->contract]) }}"
|
<a target="_blank"
|
||||||
class="icon-link icon-link-hover">
|
href="{{ route('contract', ['contract' => $dealsWithContracts->first()->contract]) }}"
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" fill="currentColor"
|
class="icon-link icon-link-hover text-decoration-none w-100 justify-content-between">
|
||||||
|
{{ $client->name }}
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" width="30" height="30" fill="currentColor"
|
||||||
class="bi bi-file-earmark-text" viewBox="0 0 16 16">
|
class="bi bi-file-earmark-text" viewBox="0 0 16 16">
|
||||||
<path
|
<path
|
||||||
d="M5.5 7a.5.5 0 0 0 0 1h5a.5.5 0 0 0 0-1zM5 9.5a.5.5 0 0 1 .5-.5h5a.5.5 0 0 1 0 1h-5a.5.5 0 0 1-.5-.5m0 2a.5.5 0 0 1 .5-.5h2a.5.5 0 0 1 0 1h-2a.5.5 0 0 1-.5-.5" />
|
d="M5.5 7a.5.5 0 0 0 0 1h5a.5.5 0 0 0 0-1zM5 9.5a.5.5 0 0 1 .5-.5h5a.5.5 0 0 1 0 1h-5a.5.5 0 0 1-.5-.5m0 2a.5.5 0 0 1 .5-.5h2a.5.5 0 0 1 0 1h-2a.5.5 0 0 1-.5-.5" />
|
||||||
@ -100,71 +141,24 @@ class="bi bi-file-earmark-text" viewBox="0 0 16 16">
|
|||||||
</svg>
|
</svg>
|
||||||
</a>
|
</a>
|
||||||
@elseif($dealsWithContracts->count() > 1)
|
@elseif($dealsWithContracts->count() > 1)
|
||||||
<a href="{{ route('contracts', [$filterRow]) }}" class="icon-link icon-link-hover">
|
<a target="_blank" href="{{ route('contracts', [$filterRow]) }}"
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" fill="currentColor"
|
class="icon-link icon-link-hover text-decoration-none w-100 d-flex justify-content-between">
|
||||||
|
{{ $client->name }}
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" width="30" height="30" fill="currentColor"
|
||||||
class="bi bi-arrow-right" viewBox="0 0 16 16">
|
class="bi bi-arrow-right" viewBox="0 0 16 16">
|
||||||
<path fill-rule="evenodd"
|
<path fill-rule="evenodd"
|
||||||
d="M1 8a.5.5 0 0 1 .5-.5h11.793l-3.147-3.146a.5.5 0 0 1 .708-.708l4 4a.5.5 0 0 1 0 .708l-4 4a.5.5 0 0 1-.708-.708L13.293 8.5H1.5A.5.5 0 0 1 1 8" />
|
d="M1 8a.5.5 0 0 1 .5-.5h11.793l-3.147-3.146a.5.5 0 0 1 .708-.708l4 4a.5.5 0 0 1 0 .708l-4 4a.5.5 0 0 1-.708-.708L13.293 8.5H1.5A.5.5 0 0 1 1 8" />
|
||||||
</svg>
|
</svg>
|
||||||
</a>
|
</a>
|
||||||
@endif
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
@else
|
@else
|
||||||
<div class="m-2 my-1">
|
{{ $client->name }}
|
||||||
@if ($dealsWithContracts->count() == 1)
|
|
||||||
<a href="{{ route('contract', ['contract' => $dealsWithContracts->first()->contract]) }}"
|
|
||||||
class="icon-link icon-link-hover w-100 hstack gap-2 text-decoration-none">
|
|
||||||
<span class="col-8 text-dark">{{ $client->name }}</span>
|
|
||||||
@if (auth()->user()->isCityManager())
|
|
||||||
<div class="col align-middle text-truncate">
|
|
||||||
{!! $companiesNames !!}
|
|
||||||
</div>
|
|
||||||
@endif
|
@endif
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" fill="currentColor"
|
</td>
|
||||||
class="bi bi-file-earmark-text ms-auto" viewBox="0 0 16 16">
|
|
||||||
<path
|
|
||||||
d="M5.5 7a.5.5 0 0 0 0 1h5a.5.5 0 0 0 0-1zM5 9.5a.5.5 0 0 1 .5-.5h5a.5.5 0 0 1 0 1h-5a.5.5 0 0 1-.5-.5m0 2a.5.5 0 0 1 .5-.5h2a.5.5 0 0 1 0 1h-2a.5.5 0 0 1-.5-.5" />
|
|
||||||
<path
|
|
||||||
d="M9.5 0H4a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2V4.5zm0 1v2A1.5 1.5 0 0 0 11 4.5h2V14a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V2a1 1 0 0 1 1-1z" />
|
|
||||||
</svg>
|
|
||||||
</a>
|
|
||||||
@elseif($dealsWithContracts->count() > 1)
|
|
||||||
<?php
|
|
||||||
$filterRow = [];
|
|
||||||
foreach ($client->deals as $deal) {
|
|
||||||
$filterRow[] = 'filter[deal_id][]=' . $deal->id;
|
|
||||||
}
|
|
||||||
$filterRow = implode('&', $filterRow);
|
|
||||||
?>
|
|
||||||
<a href="{{ route('contracts', [$filterRow]) }}"
|
|
||||||
class="icon-link icon-link-hover w-100 hstack gap-2 text-decoration-none">
|
|
||||||
<span class="col-8 text-dark">{{ $client->name }}</span>
|
|
||||||
@if (auth()->user()->isCityManager())
|
|
||||||
<div class="col align-middle text-truncate">
|
|
||||||
{!! $companiesNames !!}
|
|
||||||
</div>
|
|
||||||
@endif
|
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" fill="currentColor"
|
|
||||||
class="bi bi-arrow-right ms-auto" viewBox="0 0 16 16">
|
|
||||||
<path fill-rule="evenodd"
|
|
||||||
d="M1 8a.5.5 0 0 1 .5-.5h11.793l-3.147-3.146a.5.5 0 0 1 .708-.708l4 4a.5.5 0 0 1 0 .708l-4 4a.5.5 0 0 1-.708-.708L13.293 8.5H1.5A.5.5 0 0 1 1 8" />
|
|
||||||
</svg>
|
|
||||||
</a>
|
|
||||||
@else
|
|
||||||
<a href="" class=" icon-link icon-link-hover w-100 hstack gap-2 text-decoration-none">
|
|
||||||
<span class="col-8 text-truncate text-dark">{{ $client->name }}</span>
|
|
||||||
@if (auth()->user()->isCityManager())
|
|
||||||
<div class="col align-middle text-truncate">
|
|
||||||
{!! $companiesNames !!}
|
|
||||||
</div>
|
|
||||||
@endif
|
|
||||||
</a>
|
|
||||||
@endif
|
|
||||||
</div>
|
|
||||||
@endif
|
@endif
|
||||||
|
</tr>
|
||||||
@endforeach
|
@endforeach
|
||||||
</div>
|
</tbody>
|
||||||
|
</table>
|
||||||
</div>
|
</div>
|
||||||
@if($mode == 'full')
|
@if($mode == 'full')
|
||||||
@if($clientsCount > $count)
|
@if($clientsCount > $count)
|
||||||
|
|||||||
@ -34,7 +34,7 @@ class="btn list-group-item list-group-item-action p-3 bg-white rounded border bo
|
|||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
@endif
|
@endif
|
||||||
<div class="bg-light px-2 flex-fill rounded">
|
<div class="bg-light px-2 flex-fill rounded overflow-hidden" style="max-height:380px">
|
||||||
<div class="hstack gap-2">
|
<div class="hstack gap-2">
|
||||||
<div class="fs-5 fw-bold">Клиенты</div>
|
<div class="fs-5 fw-bold">Клиенты</div>
|
||||||
<div class="ms-auto p-2">
|
<div class="ms-auto p-2">
|
||||||
@ -42,7 +42,7 @@ class="btn list-group-item list-group-item-action p-3 bg-white rounded border bo
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
@livewire('clientsTable', ['count' => 4, 'mode' => 'short'])
|
@livewire('clientsTable', ['count' => 10, 'mode' => 'short'])
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user