book search 25km

This commit is contained in:
Benjamin Takats
2023-01-14 18:49:28 +01:00
parent f21bd3e15f
commit 8120b13bff
4 changed files with 26 additions and 4 deletions

View File

@@ -105,7 +105,7 @@ class CityTable extends DataTableComponent
{ {
$city = City::query() $city = City::query()
->find($id); ->find($id);
$query = BookCase::radius($city->latitude, $city->longitude, 5); $query = BookCase::radius($city->latitude, $city->longitude, 25);
$ids = $query->pluck('id'); $ids = $query->pluck('id');
if ($ids->isEmpty()) { if ($ids->isEmpty()) {
$this->notification() $this->notification()

View File

@@ -7,8 +7,10 @@
<img class="aspect-auto max-h-12" src="{{ asset('img/social_credit_minus.webp') }}" alt=""> <img class="aspect-auto max-h-12" src="{{ asset('img/social_credit_minus.webp') }}" alt="">
@endif @endif
<div class="flex items-center space-x-1"> <div class="flex items-center space-x-1">
<x-button class="whitespace-nowrap" primary class="text-21gray whitespace-nowrap" wire:click="viewHistoryModal({{ $row->id }})">{{ __('💊 Orange Pill Now') }}</x-button> <x-button class="whitespace-nowrap" primary class="text-21gray whitespace-nowrap"
<x-button class="whitespace-nowrap" :href="route('bookCases.comment.bookcase', ['bookCase' => $row->id, 'country' => $country])">{{ __('Details') }}</x-button> wire:click="viewHistoryModal({{ $row->id }})">{{ __('💊 Orange Pill Now') }}</x-button>
<x-button class="whitespace-nowrap"
:href="route('bookCases.comment.bookcase', ['bookCase' => $row->id, 'country' => $country])">{{ __('Details') }}</x-button>
</div> </div>
@else @else
<div> <div>

View File

@@ -19,7 +19,7 @@
<div> <div>
<x-button amber wire:click="proximitySearchForBookCases({{ $row->id }})" class="text-21gray"> <x-button amber wire:click="proximitySearchForBookCases({{ $row->id }})" class="text-21gray">
<i class="fa fa-thin fa-book mr-2"></i> <i class="fa fa-thin fa-book mr-2"></i>
{{ __('Perimeter search bookcase :name (5km)', ['name' => $row->name]) }} {{ __('Perimeter search bookcase :name (25km)', ['name' => $row->name]) }}
</x-button> </x-button>
</div> </div>
@endif @endif

View File

@@ -14,6 +14,26 @@
<p class="px-0 mb-6 text-lg text-gray-600 md:text-xl"> <p class="px-0 mb-6 text-lg text-gray-600 md:text-xl">
{{ __('Search out a public bookcase') }} {{ __('Search out a public bookcase') }}
</p> </p>
<div class="w-1/2">
<div class="rounded" wire:ignore>
@if($markers[0] ?? false)
<style>
.gnw-map-service {
z-index: 0 !important;
}
</style>
<div>
@map([
'lat' => $markers[0]['lat'],
'lng' => $markers[0]['lng'],
'zoom' => 12,
'markers' => $markers
])
</div>
@endif
</div>
</div>
</div> </div>
<livewire:tables.book-case-table :country="$country->code"/> <livewire:tables.book-case-table :country="$country->code"/>