modifications details

This commit is contained in:
salam committed 2026-07-28 21:37:18 +02:00
1 parent c143dcf727
commit c1892e86aa
21 files changed
+99 -108

No files matched your search

@@ -17,21 +17,17 @@ class StatistikoDetailForm
'default' => 2,
'xl' => 4,
])->schema([
TextInput::make('tm_player_id')->required(),
TextInput::make('name')->required(),
TextInput::make('full_name'),
TextInput::make('ss_player_id')->required(),
TextInput::make('player_name')->required(),
DatePicker::make('birthdate'),
TextInput::make('height'),
TextInput::make('nationality'),
TextInput::make('position'),
TextInput::make('sport_radar_id'),
TextInput::make('id_squadra_tm'),
TextInput::make('rigorist'),
TextInput::make('national_team_id'),
DatePicker::make('last_update'),
TextInput::make('league_code'),
TextInput::make('team_code'),
TextInput::make('ss_national_team_id'),
TextInput::make('tx_team_id'),
TextInput::make('team_name'),
TextInput::make('preferred_foot'),
DatePicker::make('last_update'),
]),
])->columns(1);
}
@@ -26,7 +26,7 @@ class StatistikoDetailResource extends Resource
protected static ?int $navigationSort = 4;
protected static ?string $recordTitleAttribute = 'giocatore';
protected static ?string $recordTitleAttribute = 'player_name';
public static function form(Schema $schema): Schema
{
@@ -24,23 +24,19 @@ class StatistikoDetailsTable
->paginationPageOptions([8, 16, 24, 36])
->columns([
Stack::make([
TextColumn::make('tm_player_id')->prefix('Id: ')->searchable()->color('success')->icon('phosphor-copy')->copyable(),
TextColumn::make('name')->searchable()->prefix('Name: ')->color('primary')->icon('phosphor-copy')->copyable(),
TextColumn::make('full_name')->color('gray')->searchable(),
TextColumn::make('ss_player_id')->prefix('Id: ')->searchable()->color('success')->icon('phosphor-copy')->copyable(),
TextColumn::make('player_name')->searchable()->prefix('Name: ')->color('primary')->icon('phosphor-copy')->copyable(),
TextColumn::make('birthdate')->date()->prefix('Birthdate: '),
TextColumn::make('height')->prefix('Height: ')->suffix(' cm'),
TextColumn::make('nationality')->prefix('Nationality: '),
TextColumn::make('position')->prefix('Position: '),
TextColumn::make('sport_radar_id')->searchable()->prefix('Sport Radar Id: ')->icon('phosphor-copy')->copyable(),
TextColumn::make('id_squadra_tm')->prefix('Team Id TM: '),
TextColumn::make('rigorist')->prefix('Rigorist: '),
TextColumn::make('national_team_id')->prefix('National Team Id: '),
TextColumn::make('ss_national_team_id')->prefix('National Team Id: '),
TextColumn::make('tx_team_id')->prefix('Team Id: '),
TextColumn::make('team_name')->prefix('Team Name: '),
TextColumn::make('preferred_foot')->prefix('Preferred Foot: '),
TextColumn::make('last_update')->date()->prefix('Last Update: '),
TextColumn::make('created_at')->date()->prefix('Created: '),
TextColumn::make('updated_at')->date()->prefix('Updated: '),
// TextColumn::make('league_code')->prefix('League: '),
// TextColumn::make('team_code')->prefix('Team Code: '),
// TextColumn::make('team_name')->prefix('Team Name: '),
]),
])
->emptyStateHeading('No double player in details')
@@ -56,12 +52,12 @@ class StatistikoDetailsTable
return $query->when(
$data['find_double'],
function (Builder $query) {
$pDetails = StatistikoDetail::pluck('tm_player_id')->toArray();
$pDetails = StatistikoDetail::pluck('ss_player_id')->toArray();
$doublpDetails = array_diff_assoc(
$pDetails,
array_unique($pDetails)
);
$query->whereIn('tm_player_id', $doublpDetails)->orderBy('tm_player_id');
$query->whereIn('ss_player_id', $doublpDetails)->orderBy('ss_player_id');
}
);
})->indicateUsing(function (array $data): ?string {
@@ -19,7 +19,7 @@ class StatistikoPlayerForm
TextInput::make('sport_id'),
TextInput::make('match_id'),
TextInput::make('ss_player_id'),
TextInput::make('tm_player_id'),
TextInput::make('ss_player_id'),
TextInput::make('activeteam_id'),
TextInput::make('playersubstitute_id'),
TextInput::make('goals'),
@@ -25,7 +25,7 @@ class StatistikoPlayersTable
->label('Player')
->searchable()
->tooltip(fn($record) => $record->details->full_name),
TextColumn::make('tm_player_id')->label('TM Id')->searchable(),
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'),