wip
This commit is contained in:
1 parent
28882bfdb5
commit
36584b8de4
4 files changed
+6
-37
No files matched your search
@@ -4,11 +4,9 @@ namespace App\Filament\Widgets\Boxes;
|
|||||||
|
|
||||||
use App\Filament\Widgets\Boxes\Helper\ExpectationCalculation;
|
use App\Filament\Widgets\Boxes\Helper\ExpectationCalculation;
|
||||||
use App\Filament\Widgets\Boxes\Helper\ExpectationCollecting;
|
use App\Filament\Widgets\Boxes\Helper\ExpectationCollecting;
|
||||||
use App\Filament\Widgets\Boxes\Helper\ExpectationCounting;
|
|
||||||
use App\Filament\Widgets\Charts\LoadEvents\LoadEventsQueryAll;
|
use App\Filament\Widgets\Charts\LoadEvents\LoadEventsQueryAll;
|
||||||
use App\Filament\Widgets\Charts\LoadEvents\LoadEventsQueryTP;
|
use App\Filament\Widgets\Charts\LoadEvents\LoadEventsQueryTP;
|
||||||
use App\Utilities\Round;
|
use App\Utilities\Round;
|
||||||
use Illuminate\Support\Facades\Log;
|
|
||||||
|
|
||||||
class ExpectationsTeam
|
class ExpectationsTeam
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,29 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
namespace App\Filament\Widgets\Boxes\Helper;
|
|
||||||
|
|
||||||
class ExpectationCounting
|
|
||||||
{
|
|
||||||
public static function count(string $team_position, int $team_id, object $res)
|
|
||||||
{
|
|
||||||
$count = 0;
|
|
||||||
foreach ($res as $value) {
|
|
||||||
switch ($team_position) {
|
|
||||||
case 'home':
|
|
||||||
if ($value->home_id == $team_id)
|
|
||||||
$count++;
|
|
||||||
break;
|
|
||||||
case 'away':
|
|
||||||
if ($value->away_id == $team_id)
|
|
||||||
$count++;
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
|
||||||
$count++;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return $count;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -38,9 +38,9 @@ class ChartPlayer extends ChartWidget
|
|||||||
c0.211,0.1782,0.5264,0.1516,0.7046-0.0593C13.0037,6.5523,13.0018,6.2761,12.84,6.09z"></path>
|
c0.211,0.1782,0.5264,0.1516,0.7046-0.0593C13.0037,6.5523,13.0018,6.2761,12.84,6.09z"></path>
|
||||||
</g>
|
</g>
|
||||||
</svg>
|
</svg>
|
||||||
'.$this->player.'
|
' . $this->player . '
|
||||||
</span>
|
</span>
|
||||||
<span>'.$this->type.'</span>
|
<span>' . $this->type . '</span>
|
||||||
</span>
|
</span>
|
||||||
');
|
');
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -21,20 +21,20 @@
|
|||||||
<div x-data="{ activeTab: 'tab1' }" id="charttabs">
|
<div x-data="{ activeTab: 'tab1' }" id="charttabs">
|
||||||
<!-- Tab Navigation -->
|
<!-- Tab Navigation -->
|
||||||
<x-filament::tabs label="Statistics" class="mb-4 justify-center rounded-lg grid grid-cols-2 md:grid-cols-4">
|
<x-filament::tabs label="Statistics" class="mb-4 justify-center rounded-lg grid grid-cols-2 md:grid-cols-4">
|
||||||
<x-filament::tabs.item x-on:click="activeTab = 'tab1'" :alpine-active="'activeTab === \'' . 'tab1' . '\''" icon="phosphor-trophy">
|
<x-filament::tabs.item x-on:click="activeTab = 'tab1'" :alpine-active="'activeTab === \'' . 'tab1' . '\''">
|
||||||
Events
|
Events
|
||||||
</x-filament::tabs.item>
|
</x-filament::tabs.item>
|
||||||
|
|
||||||
<x-filament::tabs.item x-on:click="activeTab = 'tab2'" :alpine-active="'activeTab === \'' . 'tab2' . '\''" icon="phosphor-trophy">
|
<x-filament::tabs.item x-on:click="activeTab = 'tab2'" :alpine-active="'activeTab === \'' . 'tab2' . '\''">
|
||||||
Events Performance
|
Events Performance
|
||||||
</x-filament::tabs.item>
|
</x-filament::tabs.item>
|
||||||
|
|
||||||
@if ($player_name)
|
@if ($player_name)
|
||||||
<x-filament::tabs.item x-on:click="activeTab = 'tab3'" :alpine-active="'activeTab === \'' . 'tab3' . '\''" icon="icon-player">
|
<x-filament::tabs.item x-on:click="activeTab = 'tab3'" :alpine-active="'activeTab === \'' . 'tab3' . '\''">
|
||||||
{{ $player_name }}
|
{{ $player_name }}
|
||||||
</x-filament::tabs.item>
|
</x-filament::tabs.item>
|
||||||
|
|
||||||
<x-filament::tabs.item x-on:click="activeTab = 'tab4'" :alpine-active="'activeTab === \'' . 'tab4' . '\''" icon="icon-player">
|
<x-filament::tabs.item x-on:click="activeTab = 'tab4'" :alpine-active="'activeTab === \'' . 'tab4' . '\''">
|
||||||
{{ $player_name }} Performance
|
{{ $player_name }} Performance
|
||||||
</x-filament::tabs.item>
|
</x-filament::tabs.item>
|
||||||
@endif
|
@endif
|
||||||
|
|||||||
Reference in new issue
Block a user