wip del err
This commit is contained in:
1 parent
812736ca9a
commit
9bcd4432c6
1210 files changed
-220941
No files matched your search
-11
@@ -1,11 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Filament\Clusters\StaticData\Resources\StatisticFixtures\Pages;
|
||||
|
||||
use App\Filament\Clusters\StaticData\Resources\StatisticFixtures\StatisticFixturesResource;
|
||||
use Filament\Resources\Pages\CreateRecord;
|
||||
|
||||
class CreateStatisticFixtures extends CreateRecord
|
||||
{
|
||||
protected static string $resource = StatisticFixturesResource::class;
|
||||
}
|
||||
-19
@@ -1,19 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Filament\Clusters\StaticData\Resources\StatisticFixtures\Pages;
|
||||
|
||||
use App\Filament\Clusters\StaticData\Resources\StatisticFixtures\StatisticFixturesResource;
|
||||
use Filament\Actions\DeleteAction;
|
||||
use Filament\Resources\Pages\EditRecord;
|
||||
|
||||
class EditStatisticFixtures extends EditRecord
|
||||
{
|
||||
protected static string $resource = StatisticFixturesResource::class;
|
||||
|
||||
protected function getHeaderActions(): array
|
||||
{
|
||||
return [
|
||||
DeleteAction::make(),
|
||||
];
|
||||
}
|
||||
}
|
||||
-45
@@ -1,45 +0,0 @@
|
||||
<?php
|
||||
|
||||
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;
|
||||
|
||||
class ListStatisticFixtures extends ListRecords
|
||||
{
|
||||
protected static string $resource = StatisticFixturesResource::class;
|
||||
|
||||
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('remove_started')
|
||||
->icon('phosphor-trash')
|
||||
->tooltip('Delete events already started')
|
||||
->requiresConfirmation()
|
||||
->color('info')
|
||||
->action(function () {
|
||||
StatisticFixtures::where('starttime', '<', now())->delete();
|
||||
}),
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user