remove tabulator-tables design event table grid
This commit is contained in:
1 parent
a597d3161b
commit
12b27a52dc
46 files changed
+17584
-437
No files matched your search
@@ -1,12 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Filament\Clusters\Maintenance;
|
||||
|
||||
use BackedEnum;
|
||||
use Filament\Clusters\Cluster;
|
||||
use Filament\Support\Icons\Heroicon;
|
||||
|
||||
class MaintenanceCluster extends Cluster
|
||||
{
|
||||
protected static string | \BackedEnum | null $navigationIcon = Heroicon::OutlinedSquares2x2;
|
||||
}
|
||||
@@ -1,51 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Filament\Clusters\Maintenance\Resources\Events;
|
||||
|
||||
use App\Filament\Clusters\Maintenance\MaintenanceCluster;
|
||||
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;
|
||||
use App\Models\Event;
|
||||
use BackedEnum;
|
||||
use Filament\Resources\Resource;
|
||||
use Filament\Schemas\Schema;
|
||||
use Filament\Tables\Table;
|
||||
use UnitEnum;
|
||||
|
||||
class EventResource extends Resource
|
||||
{
|
||||
protected static ?string $model = Event::class;
|
||||
|
||||
protected static ?int $navigationSort = 1;
|
||||
|
||||
protected static string | \BackedEnum | null $navigationIcon = 'lucide-goal';
|
||||
|
||||
protected static ?string $cluster = MaintenanceCluster::class;
|
||||
|
||||
protected static string | \UnitEnum | null $navigationGroup = 'Data';
|
||||
|
||||
public static function form(Schema $schema): Schema
|
||||
{
|
||||
return EventForm::configure($schema);
|
||||
}
|
||||
|
||||
public static function table(Table $table): Table
|
||||
{
|
||||
return EventsTable::configure($table);
|
||||
}
|
||||
|
||||
public static function getRelations(): array
|
||||
{
|
||||
return [
|
||||
//
|
||||
];
|
||||
}
|
||||
|
||||
public static function getPages(): array
|
||||
{
|
||||
return [
|
||||
'index' => ListEvents::route('/'),
|
||||
];
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Filament\Clusters\Maintenance\Resources\Events\Pages;
|
||||
|
||||
use App\Filament\Clusters\Maintenance\Resources\Events\EventResource;
|
||||
use Filament\Resources\Pages\CreateRecord;
|
||||
|
||||
class CreateEvent extends CreateRecord
|
||||
{
|
||||
protected static string $resource = EventResource::class;
|
||||
}
|
||||
@@ -1,19 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Filament\Clusters\Maintenance\Resources\Events\Pages;
|
||||
|
||||
use App\Filament\Clusters\Maintenance\Resources\Events\EventResource;
|
||||
use Filament\Actions\DeleteAction;
|
||||
use Filament\Resources\Pages\EditRecord;
|
||||
|
||||
class EditEvent extends EditRecord
|
||||
{
|
||||
protected static string $resource = EventResource::class;
|
||||
|
||||
protected function getHeaderActions(): array
|
||||
{
|
||||
return [
|
||||
DeleteAction::make(),
|
||||
];
|
||||
}
|
||||
}
|
||||
@@ -1,19 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Filament\Clusters\Maintenance\Resources\Events\Pages;
|
||||
|
||||
use App\Filament\Clusters\Maintenance\Resources\Events\EventResource;
|
||||
use Filament\Actions\CreateAction;
|
||||
use Filament\Resources\Pages\ListRecords;
|
||||
|
||||
class ListEvents extends ListRecords
|
||||
{
|
||||
protected static string $resource = EventResource::class;
|
||||
|
||||
protected function getHeaderActions(): array
|
||||
{
|
||||
return [
|
||||
CreateAction::make(),
|
||||
];
|
||||
}
|
||||
}
|
||||
@@ -1,76 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Filament\Clusters\Maintenance\Resources\Events\Schemas;
|
||||
|
||||
use Filament\Forms\Components\DateTimePicker;
|
||||
use Filament\Forms\Components\TextInput;
|
||||
use Filament\Schemas\Schema;
|
||||
|
||||
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('starttime')
|
||||
->aboveContent(['UTC time +1h']),
|
||||
TextInput::make('sport_id')
|
||||
->required()
|
||||
->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('txodds_id')
|
||||
->numeric()
|
||||
->default(0),
|
||||
TextInput::make('betaid_id')
|
||||
->numeric()
|
||||
->default(0),
|
||||
TextInput::make('betradar_id')
|
||||
->numeric()
|
||||
->default(0),
|
||||
TextInput::make('magnig_id')
|
||||
->label('Magloo Nigeria Id')
|
||||
->numeric()
|
||||
->default(0),
|
||||
TextInput::make('magken_id')
|
||||
->label('Magloo Kenia Id')
|
||||
->numeric()
|
||||
->default(0),
|
||||
TextInput::make('lognig_id')
|
||||
->label('Logifuture Nigeria Id')
|
||||
->numeric()
|
||||
->default(0),
|
||||
TextInput::make('logcol_id')
|
||||
->label('Logifuture Colombia Id')
|
||||
->numeric()
|
||||
->default(0),
|
||||
]);
|
||||
}
|
||||
}
|
||||
@@ -1,89 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Filament\Clusters\Maintenance\Resources\Events\Tables;
|
||||
|
||||
use App\Models\Liga;
|
||||
use Filament\Actions\BulkActionGroup;
|
||||
use Filament\Actions\DeleteBulkAction;
|
||||
use Filament\Actions\EditAction;
|
||||
use Filament\Tables\Columns\IconColumn;
|
||||
use Filament\Tables\Columns\TextColumn;
|
||||
use Filament\Tables\Table;
|
||||
|
||||
class EventsTable
|
||||
{
|
||||
public static function configure(Table $table): Table
|
||||
{
|
||||
return $table
|
||||
->columns([
|
||||
IconColumn::make('sport_id')
|
||||
->label('')
|
||||
->icon(function ($record): string {
|
||||
return $record->sport->icon;
|
||||
}),
|
||||
|
||||
TextColumn::make('txodds_id')->copyable(),
|
||||
TextColumn::make('starttime')->dateTime('M j, Y H:i')->sortable(),
|
||||
IconColumn::make('country_id')
|
||||
->label('Flag')
|
||||
->icon(function ($record): string {
|
||||
return $record->country->icon;
|
||||
}),
|
||||
TextColumn::make('country.name'),
|
||||
TextColumn::make('liga.name'),
|
||||
TextColumn::make('home.name')->searchable(),
|
||||
TextColumn::make('away.name')->searchable(),
|
||||
// TextColumn::make('prid')
|
||||
// ->numeric()
|
||||
// ->sortable(),
|
||||
// TextColumn::make('txid')
|
||||
// ->numeric()
|
||||
// ->sortable(),
|
||||
// TextColumn::make('brid')
|
||||
// ->numeric()
|
||||
// ->sortable(),
|
||||
// TextColumn::make('baid')
|
||||
// ->numeric()
|
||||
// ->sortable(),
|
||||
// TextColumn::make('cnid')
|
||||
// ->numeric()
|
||||
// ->sortable(),
|
||||
// TextColumn::make('grid')
|
||||
// ->numeric()
|
||||
// ->sortable(),
|
||||
// TextColumn::make('cgid')
|
||||
// ->numeric()
|
||||
// ->sortable(),
|
||||
// TextColumn::make('hoid')
|
||||
// ->numeric()
|
||||
// ->sortable(),
|
||||
// TextColumn::make('awid')
|
||||
// ->numeric()
|
||||
// ->sortable(),
|
||||
// TextColumn::make('liga')
|
||||
// ->searchable(),
|
||||
|
||||
// TextColumn::make('away')
|
||||
// ->searchable(),
|
||||
TextColumn::make('created_at')
|
||||
->dateTime()
|
||||
->sortable()
|
||||
->toggleable(isToggledHiddenByDefault: true),
|
||||
TextColumn::make('updated_at')
|
||||
->dateTime()
|
||||
->sortable()
|
||||
->toggleable(isToggledHiddenByDefault: true),
|
||||
])
|
||||
->filters([
|
||||
//
|
||||
])
|
||||
->recordActions([
|
||||
EditAction::make(),
|
||||
])
|
||||
->toolbarActions([
|
||||
BulkActionGroup::make([
|
||||
DeleteBulkAction::make(),
|
||||
]),
|
||||
]);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user