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')