wip
This commit is contained in:
1 parent
c394f7afba
commit
44af3f2caa
21 files changed
+222
-151
No files matched your search
+3
-3
@@ -18,14 +18,14 @@ class StatistikoDetailForm
|
||||
'xl' => 4,
|
||||
])->schema([
|
||||
TextInput::make('ss_player_id')->required(),
|
||||
TextInput::make('ss_team_id')->required(),
|
||||
TextInput::make('tx_team_id'),
|
||||
TextInput::make('player_name')->required(),
|
||||
DatePicker::make('ss_national_team_id'),
|
||||
DatePicker::make('birthdate'),
|
||||
TextInput::make('height'),
|
||||
TextInput::make('nationality'),
|
||||
TextInput::make('position'),
|
||||
TextInput::make('ss_national_team_id'),
|
||||
TextInput::make('tx_team_id'),
|
||||
TextInput::make('team_name'),
|
||||
TextInput::make('preferred_foot'),
|
||||
DatePicker::make('last_update'),
|
||||
]),
|
||||
|
||||
-1
@@ -19,7 +19,6 @@ class StatistikoPlayerForm
|
||||
TextInput::make('sport_id'),
|
||||
TextInput::make('match_id'),
|
||||
TextInput::make('ss_player_id'),
|
||||
TextInput::make('ss_player_id'),
|
||||
TextInput::make('activeteam_id'),
|
||||
TextInput::make('playersubstitute_id'),
|
||||
TextInput::make('goals'),
|
||||
|
||||
+2
-3
@@ -21,12 +21,11 @@ class StatistikoPlayersTable
|
||||
return $table
|
||||
->columns([
|
||||
TextColumn::make('match_id')->searchable(),
|
||||
TextColumn::make('details.name')
|
||||
TextColumn::make('ss_player_id')->label('SofaScore Id')->searchable(),
|
||||
TextColumn::make('details.player_name')
|
||||
->label('Player')
|
||||
->searchable()
|
||||
->tooltip(fn($record) => $record->details->full_name),
|
||||
TextColumn::make('ss_player_id')->label('TM Id')->searchable(),
|
||||
TextColumn::make('ss_player_id')->label('SS Id')->searchable(),
|
||||
TextColumn::make('event.home.name')->searchable()->color('primary'),
|
||||
TextColumn::make('event.away.name')->searchable()->color('success'),
|
||||
])
|
||||
|
||||
@@ -23,6 +23,7 @@ class ImportDetails
|
||||
$row = array_values($row);
|
||||
|
||||
// ss_player_id
|
||||
//
|
||||
// ss_team_id
|
||||
// tx_team_id
|
||||
// player_name
|
||||
|
||||
@@ -77,7 +77,7 @@ class ImportPlayer
|
||||
'penaltyshoutout_missed',
|
||||
'player_position',
|
||||
'playerrating_value',
|
||||
'ss_player_id'
|
||||
'tm_player_id'
|
||||
];
|
||||
|
||||
SimpleExcelReader::create(storage_path('app/public/' . $filePath))
|
||||
@@ -89,15 +89,12 @@ class ImportPlayer
|
||||
|
||||
$row = array_values($row);
|
||||
|
||||
$sport_id = 1;
|
||||
$match_id = 0;
|
||||
$ss_player_id = 0;
|
||||
|
||||
$update_array = [];
|
||||
foreach ($fieldnames as $key => $name) {
|
||||
if ($key == 0)
|
||||
$sport_id = (int) $row[$key];
|
||||
else if ($key == 1)
|
||||
if ($key == 1)
|
||||
$match_id = (int) $row[$key];
|
||||
else if ($key == 2)
|
||||
$ss_player_id = (int) $row[$key];
|
||||
@@ -107,7 +104,6 @@ class ImportPlayer
|
||||
|
||||
StatistikoPlayer::updateOrCreate(
|
||||
[
|
||||
'sport_id' => $sport_id,
|
||||
'match_id' => $match_id,
|
||||
'ss_player_id' => $ss_player_id,
|
||||
],
|
||||
|
||||
@@ -7,6 +7,7 @@ use App\Actions\LoadStatisticFixturesMatchOptions;
|
||||
use App\Actions\Selections\LoadPlayer;
|
||||
use App\Actions\Selections\LoadSeasons;
|
||||
use App\Models\Element;
|
||||
use App\Models\SofaScoreRosa;
|
||||
use App\Models\StatisticFixtures;
|
||||
use BackedEnum;
|
||||
use BezhanSalleh\FilamentShield\Traits\HasPageShield;
|
||||
@@ -108,9 +109,12 @@ class Statistic extends BaseDashboard
|
||||
if ($get('match_id')) {
|
||||
$res = StatisticFixtures::where('id', $get('match_id'))->first();
|
||||
|
||||
|
||||
$arr = [];
|
||||
$arr[$res->home_id] = Element::query()->where('id', $res->home_id)->value('name');
|
||||
$arr[$res->away_id] = Element::query()->where('id', $res->away_id)->value('name');
|
||||
if ($res) {
|
||||
$arr[$res->home_id] = SofaScoreRosa::query()->where('ss_team_id', $res->home_id)->value('ss_team_name');
|
||||
$arr[$res->away_id] = SofaScoreRosa::query()->where('ss_team_id', $res->away_id)->value('ss_team_name');
|
||||
}
|
||||
|
||||
return $arr;
|
||||
}
|
||||
|
||||
@@ -15,7 +15,6 @@ class LoadPerformance
|
||||
|
||||
public static function load(array $filter, bool $hasdots)
|
||||
{
|
||||
// dd($filter);
|
||||
|
||||
$league_id = (int) $filter['league_id'] ?? 0;
|
||||
|
||||
@@ -34,8 +33,12 @@ class LoadPerformance
|
||||
|
||||
$match = StatisticFixtures::with('home')->with('away')->where('id', $match_id)->first();
|
||||
|
||||
$home_id = $match->home_id;
|
||||
$away_id = $match->away_id;
|
||||
if (! $match) {
|
||||
return [];
|
||||
}
|
||||
|
||||
$home_id = $match->home_id ?? 0;
|
||||
$away_id = $match->away_id ?? 0;
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -46,7 +46,7 @@ class LoadPlayer
|
||||
$statistic_type = 'gls';
|
||||
}
|
||||
|
||||
$player_name = StatistikoDetail::where('ss_player_id', (int) $ss_player_id)->value('name');
|
||||
$player_name = StatistikoDetail::where('ss_player_id', (int) $ss_player_id)->value('player_name');
|
||||
|
||||
$res = StatistikoPlayer::with('event')->where('ss_player_id', (int) $ss_player_id)->get();
|
||||
|
||||
|
||||
Reference in new issue
Block a user