wip player app
This commit is contained in:
1 parent
f9712cbd25
commit
6b1a68e738
13 files changed
+537
-311
No files matched your search
@@ -7,7 +7,6 @@ use App\Filament\Pages\Selections\LoadPositions;
|
||||
use App\Models\SofaScorePlayerCache;
|
||||
use App\Models\SofaScorePlayerPerSeason;
|
||||
use App\Models\StatistikoEvent;
|
||||
use Filament\Schemas\Components\Utilities\Get;
|
||||
|
||||
class LoadPlayer
|
||||
{
|
||||
@@ -18,7 +17,7 @@ class LoadPlayer
|
||||
$hash = hash('crc32', $team_id . $team_position . $sofascore_category_id . serialize($season));
|
||||
$cached_players = SofaScorePlayerCache::where('hash', $hash)->value('players');
|
||||
if ($cached_players) {
|
||||
return $cached_players;
|
||||
// return $cached_players;
|
||||
}
|
||||
|
||||
$matches = StatistikoEvent::whereIn('season', $season)
|
||||
@@ -93,7 +92,6 @@ class LoadPlayer
|
||||
} else if (in_array($val['player_position'], $positions_map['GOALKEEPER'])) {
|
||||
$position = 'GOALKEEPER';
|
||||
} else {
|
||||
$player_position = $val['player_position'];
|
||||
$position = 'NO SPECIFIC POSITION';
|
||||
}
|
||||
|
||||
|
||||
@@ -91,6 +91,8 @@ class Statistic extends BaseDashboard
|
||||
->modalSubmitAction(false) // Hides the submit button
|
||||
->modalCancelAction(false) // Optional: hides the cancel button too
|
||||
->label('Calculate')
|
||||
->stickyModalHeader()
|
||||
->modalHeading('Calculate Player ASG')
|
||||
->icon('icon-player')
|
||||
->color(fn(): string => $this->filters['team_id'] ? 'primary' : 'gray')
|
||||
->disabled(fn(): string => $this->filters['team_id'] ? false : true)
|
||||
|
||||
Reference in new issue
Block a user