исправил баг с выводом жк в таблице клиентов
This commit is contained in:
parent
3f13943c4a
commit
1475bbed61
@ -117,7 +117,7 @@ function getClients()
|
|||||||
|
|
||||||
if (array_key_exists('search', $this->filter) && $searchString = trim($this->filter['search'])) {
|
if (array_key_exists('search', $this->filter) && $searchString = trim($this->filter['search'])) {
|
||||||
$searchString = mb_strtolower(trim($this->filter['search']));
|
$searchString = mb_strtolower(trim($this->filter['search']));
|
||||||
$clients->whereFullText(['name', 'phone', 'email'], $searchString);
|
// $clients->whereFullText(['name', 'phone', 'email', 'normalized_name', 'normalized_phone'], $searchString);
|
||||||
$clients->orWhere('normalized_name', 'like', "%{$searchString}%")
|
$clients->orWhere('normalized_name', 'like', "%{$searchString}%")
|
||||||
->orWhere('normalized_phone', 'like', "%{$searchString}%")
|
->orWhere('normalized_phone', 'like', "%{$searchString}%")
|
||||||
->orWhere('email', 'like', "%{$searchString}%");
|
->orWhere('email', 'like', "%{$searchString}%");
|
||||||
|
|||||||
@ -115,6 +115,7 @@ protected static function booted()
|
|||||||
$user->normalized_name = mb_strtolower($user->name);
|
$user->normalized_name = mb_strtolower($user->name);
|
||||||
$user->normalized_phone = str_replace('+7', '8', $user->phone);
|
$user->normalized_phone = str_replace('+7', '8', $user->phone);
|
||||||
$user->normalized_phone = str_replace([' ', '-', '+', '(', ')'], '', $user->normalized_phone);
|
$user->normalized_phone = str_replace([' ', '-', '+', '(', ')'], '', $user->normalized_phone);
|
||||||
|
$user->normalized_phone = preg_replace("/[^0-9]/", "", $user->normalized_phone);
|
||||||
});
|
});
|
||||||
|
|
||||||
static::deleted(function (User $user) {
|
static::deleted(function (User $user) {
|
||||||
|
|||||||
@ -87,8 +87,8 @@ class="d-none d-flex position-absolute w-100 h-100 top-0 start-0 align-items-cen
|
|||||||
{{ count($complexesNames) - 1 }}
|
{{ count($complexesNames) - 1 }}
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
@else
|
@elseif(count($complexesNames) == 1)
|
||||||
|
{!! $complexesNames[0] !!}
|
||||||
@endif
|
@endif
|
||||||
</td>
|
</td>
|
||||||
@if (auth()->user()->isCityManager())
|
@if (auth()->user()->isCityManager())
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user