konto optionen
This commit is contained in:
1 parent
47edd31030
commit
e5ea920579
25 files changed
+309
-178
No files matched your search
@@ -0,0 +1,61 @@
|
||||
<?php
|
||||
|
||||
namespace App\Filament\Resources\KontoOptions;
|
||||
|
||||
use App\Filament\Resources\KontoOptions\Pages\CreateKontoOption;
|
||||
use App\Filament\Resources\KontoOptions\Pages\EditKontoOption;
|
||||
use App\Filament\Resources\KontoOptions\Pages\ListKontoOptions;
|
||||
use App\Filament\Resources\KontoOptions\Schemas\KontoOptionForm;
|
||||
use App\Filament\Resources\KontoOptions\Tables\KontoOptionTable;
|
||||
use App\Models\KontoOption;
|
||||
use BackedEnum;
|
||||
use Filament\Resources\Resource;
|
||||
use Filament\Schemas\Schema;
|
||||
use Filament\Tables\Table;
|
||||
use UnitEnum;
|
||||
|
||||
class KontoOptionResource extends Resource
|
||||
{
|
||||
protected static ?string $model = KontoOption::class;
|
||||
|
||||
protected static string|BackedEnum|null $navigationIcon = 'lucide-key-square';
|
||||
|
||||
protected static string|UnitEnum|null $navigationGroup = 'Administration';
|
||||
|
||||
protected static ?string $navigationLabel = 'Konto Optionen';
|
||||
|
||||
protected static ?string $modelLabel = 'Konto Option';
|
||||
|
||||
protected static ?string $pluralModelLabel = 'Konto Optionen';
|
||||
|
||||
public static function form(Schema $schema): Schema
|
||||
{
|
||||
return KontoOptionForm::configure($schema);
|
||||
}
|
||||
|
||||
public static function table(Table $table): Table
|
||||
{
|
||||
return KontoOptionTable::configure($table);
|
||||
}
|
||||
|
||||
public static function getRelations(): array
|
||||
{
|
||||
return [
|
||||
//
|
||||
];
|
||||
}
|
||||
|
||||
public static function getPages(): array
|
||||
{
|
||||
return [
|
||||
'index' => ListKontoOptions::route('/'),
|
||||
'create' => CreateKontoOption::route('/create'),
|
||||
'edit' => EditKontoOption::route('/{record}/edit'),
|
||||
];
|
||||
}
|
||||
|
||||
public static function getNavigationBadge(): ?string
|
||||
{
|
||||
return parent::getEloquentQuery()->count();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
<?php
|
||||
|
||||
namespace App\Filament\Resources\KontoOptions\Pages;
|
||||
|
||||
use App\Filament\Resources\KontoOptions\KontoOptionResource;
|
||||
use Filament\Resources\Pages\CreateRecord;
|
||||
|
||||
class CreateKontoOption extends CreateRecord
|
||||
{
|
||||
protected static string $resource = KontoOptionResource::class;
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
|
||||
namespace App\Filament\Resources\KontoOptions\Pages;
|
||||
|
||||
use App\Filament\Resources\KontoOptions\KontoOptionResource;
|
||||
use Filament\Actions\DeleteAction;
|
||||
use Filament\Resources\Pages\EditRecord;
|
||||
|
||||
class EditKontoOption extends EditRecord
|
||||
{
|
||||
protected static string $resource = KontoOptionResource::class;
|
||||
|
||||
protected function getHeaderActions(): array
|
||||
{
|
||||
return [
|
||||
DeleteAction::make(),
|
||||
];
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
|
||||
namespace App\Filament\Resources\KontoOptions\Pages;
|
||||
|
||||
use App\Filament\Resources\KontoOptions\KontoOptionResource;
|
||||
use Filament\Actions\CreateAction;
|
||||
use Filament\Resources\Pages\ListRecords;
|
||||
|
||||
class ListKontoOptions extends ListRecords
|
||||
{
|
||||
protected static string $resource = KontoOptionResource::class;
|
||||
|
||||
protected function getHeaderActions(): array
|
||||
{
|
||||
return [
|
||||
// CreateAction::make(),
|
||||
];
|
||||
}
|
||||
}
|
||||
+2
-2
@@ -1,10 +1,10 @@
|
||||
<?php
|
||||
|
||||
namespace App\Filament\Resources\Kontooptionens\Schemas;
|
||||
namespace App\Filament\Resources\KontoOptions\Schemas;
|
||||
|
||||
use Filament\Schemas\Schema;
|
||||
|
||||
class KontooptionenForm
|
||||
class KontoOptionForm
|
||||
{
|
||||
public static function configure(Schema $schema): Schema
|
||||
{
|
||||
+9
-5
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace App\Filament\Resources\Kontooptionens\Tables;
|
||||
namespace App\Filament\Resources\KontoOptions\Tables;
|
||||
|
||||
use Filament\Actions\BulkActionGroup;
|
||||
use Filament\Actions\DeleteBulkAction;
|
||||
@@ -8,15 +8,19 @@ use Filament\Actions\EditAction;
|
||||
use Filament\Tables\Columns\TextColumn;
|
||||
use Filament\Tables\Table;
|
||||
|
||||
class KontooptionensTable
|
||||
class KontoOptionTable
|
||||
{
|
||||
public static function configure(Table $table): Table
|
||||
{
|
||||
return $table
|
||||
->columns([
|
||||
TextColumn::make('name')->description(fn ($record): string => $record->description),
|
||||
TextColumn::make('number_user')->alignCenter()->badge(),
|
||||
TextColumn::make('number_gutachter')->alignCenter()->badge(),
|
||||
TextColumn::make('name')
|
||||
->description(fn ($record): string => $record->description)
|
||||
->wrap(),
|
||||
TextColumn::make('payment_plan.name')
|
||||
->label('Zahlung'),
|
||||
TextColumn::make('number_user')->alignCenter()->badge()->label('Benutzer'),
|
||||
TextColumn::make('number_gutachter')->alignCenter()->badge()->label('Gutachter'),
|
||||
])
|
||||
->filters([
|
||||
//
|
||||
@@ -1,61 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Filament\Resources\Kontooptionens;
|
||||
|
||||
use App\Filament\Resources\Kontooptionens\Pages\CreateKontooptionen;
|
||||
use App\Filament\Resources\Kontooptionens\Pages\EditKontooptionen;
|
||||
use App\Filament\Resources\Kontooptionens\Pages\ListKontooptionens;
|
||||
use App\Filament\Resources\Kontooptionens\Schemas\KontooptionenForm;
|
||||
use App\Filament\Resources\Kontooptionens\Tables\KontooptionensTable;
|
||||
use App\Models\Kontooptionen;
|
||||
use BackedEnum;
|
||||
use Filament\Resources\Resource;
|
||||
use Filament\Schemas\Schema;
|
||||
use Filament\Tables\Table;
|
||||
use UnitEnum;
|
||||
|
||||
class KontooptionenResource extends Resource
|
||||
{
|
||||
protected static ?string $model = Kontooptionen::class;
|
||||
|
||||
protected static string|BackedEnum|null $navigationIcon = 'lucide-key-square';
|
||||
|
||||
protected static string|UnitEnum|null $navigationGroup = 'Interne Administration';
|
||||
|
||||
protected static ?string $navigationLabel = 'Konto Optionen';
|
||||
|
||||
protected static ?string $modelLabel = 'Konto Option';
|
||||
|
||||
protected static ?string $pluralModelLabel = 'Konto Optionen';
|
||||
|
||||
public static function form(Schema $schema): Schema
|
||||
{
|
||||
return KontooptionenForm::configure($schema);
|
||||
}
|
||||
|
||||
public static function table(Table $table): Table
|
||||
{
|
||||
return KontooptionensTable::configure($table);
|
||||
}
|
||||
|
||||
public static function getRelations(): array
|
||||
{
|
||||
return [
|
||||
//
|
||||
];
|
||||
}
|
||||
|
||||
public static function getPages(): array
|
||||
{
|
||||
return [
|
||||
'index' => ListKontooptionens::route('/'),
|
||||
'create' => CreateKontooptionen::route('/create'),
|
||||
'edit' => EditKontooptionen::route('/{record}/edit'),
|
||||
];
|
||||
}
|
||||
|
||||
public static function getNavigationBadge(): ?string
|
||||
{
|
||||
return parent::getEloquentQuery()->count();
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Filament\Resources\Kontooptionens\Pages;
|
||||
|
||||
use App\Filament\Resources\Kontooptionens\KontooptionenResource;
|
||||
use Filament\Resources\Pages\CreateRecord;
|
||||
|
||||
class CreateKontooptionen extends CreateRecord
|
||||
{
|
||||
protected static string $resource = KontooptionenResource::class;
|
||||
}
|
||||
@@ -1,19 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Filament\Resources\Kontooptionens\Pages;
|
||||
|
||||
use App\Filament\Resources\Kontooptionens\KontooptionenResource;
|
||||
use Filament\Actions\DeleteAction;
|
||||
use Filament\Resources\Pages\EditRecord;
|
||||
|
||||
class EditKontooptionen extends EditRecord
|
||||
{
|
||||
protected static string $resource = KontooptionenResource::class;
|
||||
|
||||
protected function getHeaderActions(): array
|
||||
{
|
||||
return [
|
||||
DeleteAction::make(),
|
||||
];
|
||||
}
|
||||
}
|
||||
@@ -1,19 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Filament\Resources\Kontooptionens\Pages;
|
||||
|
||||
use App\Filament\Resources\Kontooptionens\KontooptionenResource;
|
||||
use Filament\Actions\CreateAction;
|
||||
use Filament\Resources\Pages\ListRecords;
|
||||
|
||||
class ListKontooptionens extends ListRecords
|
||||
{
|
||||
protected static string $resource = KontooptionenResource::class;
|
||||
|
||||
protected function getHeaderActions(): array
|
||||
{
|
||||
return [
|
||||
CreateAction::make(),
|
||||
];
|
||||
}
|
||||
}
|
||||
@@ -20,7 +20,10 @@ class KontosTable
|
||||
TextColumn::make('konto_gender')->label('Geschlecht'),
|
||||
// TextColumn::make('konto_title')->label('Title'),
|
||||
// TextColumn::make('konto_first_name')->label('Vorname'),
|
||||
// TextColumn::make('konto_last_name')->label('Nachname'),
|
||||
TextColumn::make('konto_option.name')
|
||||
->badge()
|
||||
->label('Plan')
|
||||
->description(fn ($record): string => $record->konto_option->payment_plan->name),
|
||||
TextColumn::make('konto_company')->label('Firma'),
|
||||
IconColumn::make('konto_agb_akzeptiert')
|
||||
->label('AGB')
|
||||
|
||||
@@ -20,7 +20,7 @@ class PermissionResource extends Resource
|
||||
|
||||
protected static string|BackedEnum|null $navigationIcon = 'lucide-toggle-right';
|
||||
|
||||
protected static string|UnitEnum|null $navigationGroup = 'Interne Administration';
|
||||
protected static string|UnitEnum|null $navigationGroup = 'Administration';
|
||||
|
||||
protected static ?string $recordTitleAttribute = 'name';
|
||||
|
||||
|
||||
Reference in new issue
Block a user