wip
This commit is contained in:
1 parent
75b38d8044
commit
dd51d927dc
3 files changed
+34
-12
No files matched your search
+14
-8
@@ -29,14 +29,20 @@ class ListStatistikoPlayers extends ListRecords
|
|||||||
Action::make('double')
|
Action::make('double')
|
||||||
->icon('phosphor-magnifying-glass')
|
->icon('phosphor-magnifying-glass')
|
||||||
->color('gray')
|
->color('gray')
|
||||||
->schema([
|
->modalContent(function () {
|
||||||
TextEntry::make('created_at')
|
$arr = [];
|
||||||
->dateTime(),
|
$doubles = [];
|
||||||
TextEntry::make('updated_at')
|
$events = StatistikoPlayer::query()->select('match_id', 'ss_player_id')->get()->toArray();
|
||||||
->dateTime(),
|
foreach ($events as $value) {
|
||||||
])
|
$match_id = $value['match_id'];
|
||||||
->action(function () {
|
$player_id = $value['ss_player_id'];
|
||||||
// StatistikoPlayer::truncate();
|
|
||||||
|
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')
|
Action::make('truncate')
|
||||||
->icon('phosphor-trash')
|
->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>
|
||||||
{{-- <div class="p-2 border text-md">Player missing {{ \count($players)}}</div> --}}
|
{{-- <div class="p-2 border text-md">Player missing {{ \count($players)}}</div> --}}
|
||||||
<x-filament::fieldset>
|
<x-filament::section>
|
||||||
<x-slot name="label">
|
<x-slot name="heading">
|
||||||
Player missing {{ \count($players)}}
|
{{ \count($players)}} players in table "players" but missing in tavle "details"
|
||||||
</x-slot>
|
</x-slot>
|
||||||
|
|
||||||
<div class= "flex flex-wrap gap-2">
|
<div class= "flex flex-wrap gap-2">
|
||||||
@@ -12,5 +12,5 @@
|
|||||||
|
|
||||||
@endforeach
|
@endforeach
|
||||||
</div>
|
</div>
|
||||||
</x-filament::fieldset>
|
</x-filament::section>
|
||||||
</div>
|
</div>
|
||||||
Reference in new issue
Block a user