deactivate bookcases

This commit is contained in:
HolgerHatGarKeineNode
2023-02-16 21:21:45 +01:00
parent ab56630227
commit d90af476bc
7 changed files with 16 additions and 8 deletions

View File

@@ -31,7 +31,7 @@ class BookCaseTable extends Component
'icon_size' => [42, 42],
])
->toArray(),
'bookCases' => BookCase::get(),
'bookCases' => BookCase::query()->active()->get(),
'countries' => Country::query()
->select(['code', 'name'])
->get(),

View File

@@ -13,11 +13,13 @@ class Heatmap extends Component
public function render()
{
$data = BookCase::query()
->active()
->whereHas('orangePills')
->get()->map(fn($bookCase) => [
'lat' => $bookCase->latitude,
'lng' => $bookCase->longitude,
]);
->get()
->map(fn($bookCase) => [
'lat' => $bookCase->latitude,
'lng' => $bookCase->longitude,
]);
return view('livewire.book-case.heatmap', [
'heatmap_data' => $data->toArray(),

View File

@@ -17,6 +17,7 @@ class WorldMap extends Component
'mapData' => BookCase::query()
->select(['id', 'latitude', 'longitude'])
->withCount('orangePills')
->active()
->get()
->map(fn($bookCase) => [
'lat' => $bookCase->latitude,