mirror of
https://github.com/HolgerHatGarKeineNode/einundzwanzig-app.git
synced 2025-12-13 23:56:47 +00:00
⚙️ Raise top‑meetup and top‑country limits from 10 → 15; add guard for empty sparkline data before rendering chart.
This commit is contained in:
@@ -16,7 +16,7 @@ class extends Component {
|
|||||||
->groupBy('countries.id')
|
->groupBy('countries.id')
|
||||||
->selectRaw('COUNT(DISTINCT meetup_user.user_id) as user_count')
|
->selectRaw('COUNT(DISTINCT meetup_user.user_id) as user_count')
|
||||||
->orderBy('user_count', 'desc')
|
->orderBy('user_count', 'desc')
|
||||||
->limit(10)
|
->limit(15)
|
||||||
->get()
|
->get()
|
||||||
->map(function ($country) {
|
->map(function ($country) {
|
||||||
// Optimierte Query: Hole alle User-Erstellungsdaten für dieses Land auf einmal
|
// Optimierte Query: Hole alle User-Erstellungsdaten für dieses Land auf einmal
|
||||||
@@ -104,11 +104,13 @@ class extends Component {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</a>
|
</a>
|
||||||
<flux:chart :value="$country->sparkline" class="w-[5rem] aspect-[3/1]">
|
@if(count($country->sparkline) > 1)
|
||||||
<flux:chart.svg gutter="0">
|
<flux:chart :value="$country->sparkline" class="w-[5rem] aspect-[3/1]">
|
||||||
<flux:chart.line class="text-green-500 dark:text-green-400"/>
|
<flux:chart.svg gutter="0">
|
||||||
</flux:chart.svg>
|
<flux:chart.line class="text-green-500 dark:text-green-400"/>
|
||||||
</flux:chart>
|
</flux:chart.svg>
|
||||||
|
</flux:chart>
|
||||||
|
@endif
|
||||||
</div>
|
</div>
|
||||||
@endforeach
|
@endforeach
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ class extends Component {
|
|||||||
$topMeetups = Meetup::withCount('users')
|
$topMeetups = Meetup::withCount('users')
|
||||||
->with(['city.country'])
|
->with(['city.country'])
|
||||||
->orderBy('users_count', 'desc')
|
->orderBy('users_count', 'desc')
|
||||||
->limit(10)
|
->limit(15)
|
||||||
->get()
|
->get()
|
||||||
->map(function ($meetup) {
|
->map(function ($meetup) {
|
||||||
// Optimierte Query: Hole alle User-Erstellungsdaten für dieses Meetup auf einmal
|
// Optimierte Query: Hole alle User-Erstellungsdaten für dieses Meetup auf einmal
|
||||||
|
|||||||
Reference in New Issue
Block a user