This commit is contained in:
salam committed 2026-08-05 12:39:03 +02:00
1 parent 75b38d8044
commit dd51d927dc
3 files changed
+34 -12

No files matched your search

@@ -29,14 +29,20 @@ class ListStatistikoPlayers extends ListRecords
Action::make('double')
->icon('phosphor-magnifying-glass')
->color('gray')
->schema([
TextEntry::make('created_at')
->dateTime(),
TextEntry::make('updated_at')
->dateTime(),
])
->action(function () {
// StatistikoPlayer::truncate();
->modalContent(function () {
$arr = [];
$doubles = [];
$events = StatistikoPlayer::query()->select('match_id', 'ss_player_id')->get()->toArray();
foreach ($events as $value) {
$match_id = $value['match_id'];
$player_id = $value['ss_player_id'];
if (isset($arr[$match_id]) && in_array($player_id, $arr[$match_id])) {
$doubles[] = ['match_id' => $match_id, 'player_id' => $player_id];
}
$arr[$match_id][] = $player_id;
}
return view('filament.pages.list-doubles-player', ['doubles' => $doubles]);
}),
Action::make('truncate')
->icon('phosphor-trash')
@@ -0,0 +1,16 @@
<div>
<x-filament::fieldset>
<x-slot name="label">
Double players {{ \count($doubles)}}
</x-slot>
<div class= "flex flex-wrap gap-2">
@foreach ($doubles as $double)
<div>Match ID: {{ $double['match_id'] }}</div>
<div>Player ID: {{ $double['player_id'] }}</div>
@endforeach
</div>
</x-filament::fieldset>
</div>
@@ -1,8 +1,8 @@
<div>
{{-- <div class="p-2 border text-md">Player missing {{ \count($players)}}</div> --}}
<x-filament::fieldset>
<x-slot name="label">
Player missing {{ \count($players)}}
<x-filament::section>
<x-slot name="heading">
{{ \count($players)}} players in table "players" but missing in tavle "details"
</x-slot>
<div class= "flex flex-wrap gap-2">
@@ -12,5 +12,5 @@
@endforeach
</div>
</x-filament::fieldset>
</x-filament::section>
</div>