Add all files

This commit is contained in:
root
2025-11-30 11:57:22 +01:00
parent 2ee51cac4f
commit 044271db3d
1476 changed files with 142544 additions and 0 deletions

View File

@@ -0,0 +1,11 @@
<?php
namespace App\Admin\Resources\ConfigOptionResource\Pages;
use App\Admin\Resources\ConfigOptionResource;
use Filament\Resources\Pages\CreateRecord;
class CreateConfigOption extends CreateRecord
{
protected static string $resource = ConfigOptionResource::class;
}

View File

@@ -0,0 +1,33 @@
<?php
namespace App\Admin\Resources\ConfigOptionResource\Pages;
use App\Admin\Resources\ConfigOptionResource;
use App\Models\ConfigOption;
use Filament\Actions;
use Filament\Resources\Pages\EditRecord;
class EditConfigOption extends EditRecord
{
protected static string $resource = ConfigOptionResource::class;
protected function getHeaderActions(): array
{
return [
// Show warning when there are child config options
Actions\DeleteAction::make('Delete')
->requiresConfirmation()
->modalDescription(
fn (ConfigOption $record) => $record->children()->exists()
? 'This config option has services connected to it. Deleting it will also delete it from the services it is associated with. Are you sure you want to delete this config option?'
: 'Are you sure you want to delete this config option?',
)
->action(function () {
$this->record->serviceConfigs()->delete();
$this->record->delete();
return redirect()->to(ConfigOptionResource::getUrl());
}),
];
}
}

View File

@@ -0,0 +1,19 @@
<?php
namespace App\Admin\Resources\ConfigOptionResource\Pages;
use App\Admin\Resources\ConfigOptionResource;
use Filament\Actions;
use Filament\Resources\Pages\ListRecords;
class ListConfigOptions extends ListRecords
{
protected static string $resource = ConfigOptionResource::class;
protected function getHeaderActions(): array
{
return [
Actions\CreateAction::make(),
];
}
}