events wip
This commit is contained in:
1 parent
8d623755ca
commit
a7e09c6590
25 files changed
+1112
-384
No files matched your search
@@ -3,8 +3,6 @@
|
||||
namespace App\Filament\Clusters\Maintenance\Resources\Events;
|
||||
|
||||
use App\Filament\Clusters\Maintenance\MaintenanceCluster;
|
||||
use App\Filament\Clusters\Maintenance\Resources\Events\Pages\CreateEvent;
|
||||
use App\Filament\Clusters\Maintenance\Resources\Events\Pages\EditEvent;
|
||||
use App\Filament\Clusters\Maintenance\Resources\Events\Pages\ListEvents;
|
||||
use App\Filament\Clusters\Maintenance\Resources\Events\Schemas\EventForm;
|
||||
use App\Filament\Clusters\Maintenance\Resources\Events\Tables\EventsTable;
|
||||
@@ -48,8 +46,6 @@ class EventResource extends Resource
|
||||
{
|
||||
return [
|
||||
'index' => ListEvents::route('/'),
|
||||
'create' => CreateEvent::route('/create'),
|
||||
'edit' => EditEvent::route('/{record}/edit'),
|
||||
];
|
||||
}
|
||||
}
|
||||
@@ -10,54 +10,67 @@ class EventForm
|
||||
{
|
||||
public static function configure(Schema $schema): Schema
|
||||
{
|
||||
// `starttime` datetime DEFAULT NULL,
|
||||
// `sport_id` int(11) NOT NULL,
|
||||
// `provider_id` int(11) DEFAULT 0,
|
||||
// `txodds_id` int(11) DEFAULT 0,
|
||||
// `betaid_id` int(11) DEFAULT 0,
|
||||
// `betradar_id` int(11) DEFAULT 0,
|
||||
// `magnig_id` int(11) DEFAULT 0,
|
||||
// `magken_id` int(11) DEFAULT 0,
|
||||
// `lognig_id` int(11) DEFAULT 0,
|
||||
// `logcol_id` int(11) DEFAULT 0,
|
||||
// `liga_id` int(11) DEFAULT 0,
|
||||
// `home_id` int(11) DEFAULT 0,
|
||||
// `away_id` int(11) DEFAULT 0,
|
||||
return $schema
|
||||
->components([
|
||||
DateTimePicker::make('time'),
|
||||
TextInput::make('spid')
|
||||
DateTimePicker::make('starttime')
|
||||
->aboveContent(['UTC time +1h']),
|
||||
TextInput::make('sport_id')
|
||||
->required()
|
||||
->numeric(),
|
||||
TextInput::make('prid')
|
||||
->numeric()
|
||||
->aboveContent(fn ($record): string => $record->sport->name),
|
||||
TextInput::make('liga_id')
|
||||
->numeric()
|
||||
->default(0)
|
||||
->aboveContent(fn ($record): string => $record->liga->name),
|
||||
TextInput::make('home_id')
|
||||
->required()
|
||||
->aboveContent(fn ($record): string => $record->home->name),
|
||||
TextInput::make('away_id')
|
||||
->required()
|
||||
->aboveContent(fn ($record): string => $record->away->name),
|
||||
TextInput::make('provider_id')
|
||||
->aboveContent(['1 TXOdds', '2 BetsApi', '3 Direct'])
|
||||
->required()
|
||||
->numeric()
|
||||
->default(0),
|
||||
TextInput::make('txid')
|
||||
->required()
|
||||
TextInput::make('txodds_id')
|
||||
->numeric()
|
||||
->default(0),
|
||||
TextInput::make('brid')
|
||||
->required()
|
||||
TextInput::make('betaid_id')
|
||||
->numeric()
|
||||
->default(0),
|
||||
TextInput::make('baid')
|
||||
->required()
|
||||
TextInput::make('betradar_id')
|
||||
->numeric()
|
||||
->default(0),
|
||||
TextInput::make('cnid')
|
||||
->required()
|
||||
TextInput::make('magnig_id')
|
||||
->label('Magloo Nigeria Id')
|
||||
->numeric()
|
||||
->default(0),
|
||||
TextInput::make('grid')
|
||||
->required()
|
||||
TextInput::make('magken_id')
|
||||
->label('Magloo Kenia Id')
|
||||
->numeric()
|
||||
->default(0),
|
||||
TextInput::make('cgid')
|
||||
->required()
|
||||
TextInput::make('lognig_id')
|
||||
->label('Logifuture Nigeria Id')
|
||||
->numeric()
|
||||
->default(0),
|
||||
TextInput::make('hoid')
|
||||
->required()
|
||||
TextInput::make('logcol_id')
|
||||
->label('Logifuture Colombia Id')
|
||||
->numeric()
|
||||
->default(0),
|
||||
TextInput::make('awid')
|
||||
->required()
|
||||
->numeric()
|
||||
->default(0),
|
||||
TextInput::make('liga')
|
||||
->required(),
|
||||
TextInput::make('home')
|
||||
->required(),
|
||||
TextInput::make('away')
|
||||
->required(),
|
||||
]);
|
||||
}
|
||||
}
|
||||
@@ -21,11 +21,11 @@ class EventsTable
|
||||
return $record->sport->icon;
|
||||
}),
|
||||
TextColumn::make('starttime')->dateTime('M j, Y H:i')->sortable(),
|
||||
IconColumn::make('liga')
|
||||
->label('')
|
||||
->icon(function ($record): string {
|
||||
return 'flag-country-'.$record->liga->country->iso2;
|
||||
IconColumn::make('liga.country.icon')->label('')
|
||||
->icon(function ($state): string {
|
||||
return $state;
|
||||
}),
|
||||
TextColumn::make('liga.country.name'),
|
||||
TextColumn::make('liga.name')->searchable(),
|
||||
TextColumn::make('home.name')->searchable(),
|
||||
TextColumn::make('away.name')->searchable(),
|
||||
|
||||
Reference in new issue
Block a user