wip
This commit is contained in:
1 parent
dd51d927dc
commit
bb6986d6e5
6 files changed
+69
-7
No files matched your search
+13
-1
@@ -4,6 +4,7 @@ namespace App\Filament\Clusters\StaticData\Resources\StatisticFixtures\Pages;
|
||||
|
||||
use App\Filament\Clusters\StaticData\Resources\StatisticFixtures\StatisticFixturesResource;
|
||||
use App\Models\StatisticFixtures;
|
||||
use DateTime;
|
||||
use Filament\Actions\Action;
|
||||
use Filament\Resources\Pages\ListRecords;
|
||||
|
||||
@@ -14,15 +15,26 @@ class ListStatisticFixtures extends ListRecords
|
||||
protected function getHeaderActions(): array
|
||||
{
|
||||
return [
|
||||
Action::make('starttime')
|
||||
->color('gray')
|
||||
->tooltip('Find events with wrong starttime')
|
||||
->icon('phosphor-magnifying-glass')
|
||||
->modalSubmitAction(false)
|
||||
->modalContent(function () {
|
||||
$events = StatisticFixtures::with('league')->with('home')->with('away')->where('starttime', '<', new DateTime('-10 years'))->get();
|
||||
return view('filament.pages.list-fixtures-starttime', ['events' => $events]);
|
||||
}),
|
||||
Action::make('truncate')
|
||||
->icon('phosphor-trash')
|
||||
->tooltip('Delete all events')
|
||||
->requiresConfirmation()
|
||||
->color('danger')
|
||||
->action(function () {
|
||||
StatisticFixtures::truncate();
|
||||
}),
|
||||
Action::make('delete_old')
|
||||
Action::make('delete')
|
||||
->icon('phosphor-trash')
|
||||
->tooltip('Delete events already started')
|
||||
->requiresConfirmation()
|
||||
->color('danger')
|
||||
->action(function () {
|
||||
|
||||
+10
-4
@@ -4,9 +4,9 @@ namespace App\Filament\Clusters\StaticData\Resources\StatistikoEvents\Pages;
|
||||
|
||||
use App\Filament\Clusters\StaticData\Resources\StatistikoEvents\StatistikoEventsResource;
|
||||
use App\Models\StatistikoEvent;
|
||||
use DateTime;
|
||||
use Filament\Actions\Action;
|
||||
use Filament\Actions\CreateAction;
|
||||
// use Filament\Actions\ImportAction;
|
||||
use Filament\Resources\Pages\ListRecords;
|
||||
|
||||
class ListStatistikoEvents extends ListRecords
|
||||
@@ -16,9 +16,15 @@ class ListStatistikoEvents extends ListRecords
|
||||
protected function getHeaderActions(): array
|
||||
{
|
||||
return [
|
||||
// Action::make('download')
|
||||
// ->icon('phosphor-download')
|
||||
// ->color('gray'),
|
||||
Action::make('starttime')
|
||||
->color('gray')
|
||||
->tooltip('Find events with wrong starttime')
|
||||
->icon('phosphor-magnifying-glass')
|
||||
->modalSubmitAction(false)
|
||||
->modalContent(function () {
|
||||
$events = StatistikoEvent::with('league')->with('home')->with('away')->where('starttime', '<', new DateTime('-10 years'))->get();
|
||||
return view('filament.pages.list-fixtures-starttime', ['events' => $events]);
|
||||
}),
|
||||
Action::make('truncate')
|
||||
->icon('phosphor-trash')
|
||||
->requiresConfirmation()
|
||||
|
||||
+12
-2
@@ -4,11 +4,10 @@ namespace App\Filament\Clusters\StaticData\Resources\StatistikoPlayers\Pages;
|
||||
|
||||
use App\Filament\Clusters\StaticData\Resources\StatistikoPlayers\StatistikoPlayerResource;
|
||||
use App\Models\StatistikoPlayer;
|
||||
use DateTime;
|
||||
use Filament\Actions\Action;
|
||||
use Filament\Actions\CreateAction;
|
||||
use Filament\Infolists\Components\TextEntry;
|
||||
use Filament\Resources\Pages\ListRecords;
|
||||
use Illuminate\Contracts\View\View;
|
||||
|
||||
class ListStatistikoPlayers extends ListRecords
|
||||
{
|
||||
@@ -17,8 +16,18 @@ class ListStatistikoPlayers extends ListRecords
|
||||
protected function getHeaderActions(): array
|
||||
{
|
||||
return [
|
||||
Action::make('starttime')
|
||||
->color('gray')
|
||||
->tooltip('Find events with wrong starttime')
|
||||
->icon('phosphor-magnifying-glass')
|
||||
->modalSubmitAction(false)
|
||||
->modalContent(function () {
|
||||
$players = StatistikoPlayer::where('starttime', '<', new DateTime('-10 years'))->get();
|
||||
return view('filament.pages.list-player-starttime', ['players' => $players]);
|
||||
}),
|
||||
Action::make('missing')
|
||||
->color('gray')
|
||||
->modalSubmitAction(false)
|
||||
->modalHeading('Missing Player')
|
||||
->tooltip('Element in player but missing in details')
|
||||
->icon('phosphor-magnifying-glass')
|
||||
@@ -27,6 +36,7 @@ class ListStatistikoPlayers extends ListRecords
|
||||
return view('filament.pages.list-missing-player', ['players' => $players]);
|
||||
}),
|
||||
Action::make('double')
|
||||
->modalSubmitAction(false)
|
||||
->icon('phosphor-magnifying-glass')
|
||||
->color('gray')
|
||||
->modalContent(function () {
|
||||
|
||||
Reference in new issue
Block a user