This commit is contained in:
salam committed 2026-10-11 19:12:25 +02:00
1 parent f9c0c5aec5
commit e0c1baf849
6 files changed
+32 -22

No files matched your search

+4 -4
View File
@@ -26,11 +26,11 @@ class LoadGridPositions
$arr[] = 'DM';
$arr[] = 0;
$arr[] = 'MR';
$arr[] = 'MC';
$arr[] = 'MC';
$arr[] = 'MC';
$arr[] = 'ML';
$arr[] = 'MC';
$arr[] = 'MC';
$arr[] = 'MC';
$arr[] = 'MR';
$arr[] = 0;
$arr[] = 'AM';
+5 -2
View File
@@ -4,6 +4,7 @@ namespace App\Livewire;
use App\Filament\Pages\Selections\LoadPositions;
use App\Models\SofaScorePlayerPerSeason;
use App\Models\StatistikoDetail;
use Livewire\Component;
class PlayerCalculator extends Component
@@ -12,10 +13,12 @@ class PlayerCalculator extends Component
{
$positions_map = LoadPositions::load();
$player = SofaScorePlayerPerSeason::with('details')->where('season', 'total')->where('ss_team_id', $team_id)->get();
$team_player_ids = StatistikoDetail::where('ss_team_id', $team_id)->pluck('ss_player_id')->toArray();
$players = SofaScorePlayerPerSeason::with('details')->where('season', 'total')->whereIn('ss_player_id', $team_player_ids)->get();
$result = [];
foreach ($player as $val) {
foreach ($players as $val) {
if ($val->details != null && $val->details->is_active) {
$tmp = [];