orientierung
This commit is contained in:
1 parent
326d827543
commit
0b1a1493b2
15 files changed
+363
-6
No files matched your search
@@ -13,6 +13,7 @@ use BackedEnum;
|
||||
use Filament\Resources\Resource;
|
||||
use Filament\Schemas\Schema;
|
||||
use Filament\Tables\Table;
|
||||
use UnitEnum;
|
||||
|
||||
class KontoOptionResource extends Resource
|
||||
{
|
||||
@@ -20,6 +21,8 @@ class KontoOptionResource extends Resource
|
||||
|
||||
protected static ?string $cluster = AdministrationCluster::class;
|
||||
|
||||
protected static string|UnitEnum|null $navigationGroup = 'Kunden';
|
||||
|
||||
protected static string|BackedEnum|null $navigationIcon = 'lucide-key-square';
|
||||
|
||||
protected static ?string $navigationLabel = 'Konto Optionen';
|
||||
|
||||
@@ -0,0 +1,62 @@
|
||||
<?php
|
||||
|
||||
namespace App\Filament\Resources\Orientierungs;
|
||||
|
||||
use App\Filament\Clusters\Administration\AdministrationCluster;
|
||||
use App\Filament\Resources\Orientierungs\Pages\ListOrientierungs;
|
||||
use App\Filament\Resources\Orientierungs\Schemas\OrientierungForm;
|
||||
use App\Filament\Resources\Orientierungs\Tables\OrientierungsTable;
|
||||
use App\Models\Orientierung;
|
||||
use BackedEnum;
|
||||
use Filament\Resources\Resource;
|
||||
use Filament\Schemas\Schema;
|
||||
use Filament\Tables\Table;
|
||||
use UnitEnum;
|
||||
|
||||
class OrientierungResource extends Resource
|
||||
{
|
||||
protected static ?string $model = Orientierung::class;
|
||||
|
||||
protected static ?string $cluster = AdministrationCluster::class;
|
||||
|
||||
protected static string|UnitEnum|null $navigationGroup = 'Programm';
|
||||
|
||||
protected static string|BackedEnum|null $navigationIcon = 'lucide-compass';
|
||||
|
||||
protected static ?string $recordTitleAttribute = 'name';
|
||||
|
||||
protected static ?string $navigationLabel = 'Orientierung';
|
||||
|
||||
protected static ?string $modelLabel = 'Orientierung';
|
||||
|
||||
protected static ?string $pluralModelLabel = 'Orientierungen';
|
||||
|
||||
public static function form(Schema $schema): Schema
|
||||
{
|
||||
return OrientierungForm::configure($schema);
|
||||
}
|
||||
|
||||
public static function table(Table $table): Table
|
||||
{
|
||||
return OrientierungsTable::configure($table);
|
||||
}
|
||||
|
||||
public static function getRelations(): array
|
||||
{
|
||||
return [
|
||||
//
|
||||
];
|
||||
}
|
||||
|
||||
public static function getPages(): array
|
||||
{
|
||||
return [
|
||||
'index' => ListOrientierungs::route('/'),
|
||||
];
|
||||
}
|
||||
|
||||
public static function getNavigationBadge(): ?string
|
||||
{
|
||||
return parent::getEloquentQuery()->where('selectable', true)->count();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
<?php
|
||||
|
||||
namespace App\Filament\Resources\Orientierungs\Pages;
|
||||
|
||||
use App\Filament\Resources\Orientierungs\OrientierungResource;
|
||||
use Filament\Resources\Pages\CreateRecord;
|
||||
|
||||
class CreateOrientierung extends CreateRecord
|
||||
{
|
||||
protected static string $resource = OrientierungResource::class;
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
|
||||
namespace App\Filament\Resources\Orientierungs\Pages;
|
||||
|
||||
use App\Filament\Resources\Orientierungs\OrientierungResource;
|
||||
use Filament\Actions\DeleteAction;
|
||||
use Filament\Resources\Pages\EditRecord;
|
||||
|
||||
class EditOrientierung extends EditRecord
|
||||
{
|
||||
protected static string $resource = OrientierungResource::class;
|
||||
|
||||
protected function getHeaderActions(): array
|
||||
{
|
||||
return [
|
||||
// DeleteAction::make(),
|
||||
];
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
|
||||
namespace App\Filament\Resources\Orientierungs\Pages;
|
||||
|
||||
use App\Filament\Resources\Orientierungs\OrientierungResource;
|
||||
use Filament\Actions\CreateAction;
|
||||
use Filament\Resources\Pages\ListRecords;
|
||||
|
||||
class ListOrientierungs extends ListRecords
|
||||
{
|
||||
protected static string $resource = OrientierungResource::class;
|
||||
|
||||
protected function getHeaderActions(): array
|
||||
{
|
||||
return [
|
||||
// CreateAction::make(),
|
||||
];
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
<?php
|
||||
|
||||
namespace App\Filament\Resources\Orientierungs\Schemas;
|
||||
|
||||
use Filament\Schemas\Schema;
|
||||
|
||||
class OrientierungForm
|
||||
{
|
||||
public static function configure(Schema $schema): Schema
|
||||
{
|
||||
return $schema
|
||||
->components([
|
||||
//
|
||||
]);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
|
||||
namespace App\Filament\Resources\Orientierungs\Tables;
|
||||
|
||||
use Filament\Tables\Columns\TextColumn;
|
||||
use Filament\Tables\Filters\SelectFilter;
|
||||
use Filament\Tables\Table;
|
||||
|
||||
class OrientierungsTable
|
||||
{
|
||||
public static function configure(Table $table): Table
|
||||
{
|
||||
return $table
|
||||
->columns([
|
||||
TextColumn::make('name')
|
||||
->color(fn ($record): string => match ($record->seitig) {
|
||||
1 => 'primary',
|
||||
2 => 'warning',
|
||||
3 => 'success',
|
||||
4 => 'danger',
|
||||
5 => 'indigo',
|
||||
default => 'gray',
|
||||
}),
|
||||
])
|
||||
->filters([
|
||||
SelectFilter::make('seitig')
|
||||
->options([
|
||||
'1' => 'E I N S E I T I G',
|
||||
'2' => 'Z W E I S E I T I G',
|
||||
'3' => 'D R E I S E I T I G',
|
||||
'4' => 'V I E R S E I T I G',
|
||||
'5' => 'E X T R A S',
|
||||
]),
|
||||
]);
|
||||
}
|
||||
}
|
||||
@@ -13,6 +13,7 @@ use BackedEnum;
|
||||
use Filament\Resources\Resource;
|
||||
use Filament\Schemas\Schema;
|
||||
use Filament\Tables\Table;
|
||||
use UnitEnum;
|
||||
|
||||
class PermissionResource extends Resource
|
||||
{
|
||||
@@ -20,6 +21,8 @@ class PermissionResource extends Resource
|
||||
|
||||
protected static ?string $cluster = AdministrationCluster::class;
|
||||
|
||||
protected static string|UnitEnum|null $navigationGroup = 'Kunden';
|
||||
|
||||
protected static string|BackedEnum|null $navigationIcon = 'lucide-toggle-right';
|
||||
|
||||
protected static ?string $recordTitleAttribute = 'name';
|
||||
|
||||
Reference in new issue
Block a user