plan wip
This commit is contained in:
1 parent
60249dffd9
commit
1d16946f20
18 files changed
+56
-86
No files matched your search
@@ -13,7 +13,7 @@ class ListPlans extends ListRecords
|
||||
protected function getHeaderActions(): array
|
||||
{
|
||||
return [
|
||||
CreateAction::make(),
|
||||
// CreateAction::make(),
|
||||
];
|
||||
}
|
||||
}
|
||||
@@ -3,8 +3,6 @@
|
||||
namespace App\Filament\Resources\Plans;
|
||||
|
||||
use App\Filament\Clusters\Administration\AdministrationCluster;
|
||||
use App\Filament\Resources\Plans\Pages\CreatePlan;
|
||||
use App\Filament\Resources\Plans\Pages\EditPlan;
|
||||
use App\Filament\Resources\Plans\Pages\ListPlans;
|
||||
use App\Filament\Resources\Plans\Schemas\PlanForm;
|
||||
use App\Filament\Resources\Plans\Tables\PlansTable;
|
||||
@@ -19,7 +17,7 @@ class PlanResource extends Resource
|
||||
{
|
||||
protected static ?string $model = Plan::class;
|
||||
|
||||
protected static string|BackedEnum|null $navigationIcon = 'lucide-key-square';
|
||||
protected static string|BackedEnum|null $navigationIcon = 'heroicon-o-banknotes';
|
||||
|
||||
protected static ?string $cluster = AdministrationCluster::class;
|
||||
|
||||
@@ -41,19 +39,10 @@ class PlanResource extends Resource
|
||||
return PlansTable::configure($table);
|
||||
}
|
||||
|
||||
public static function getRelations(): array
|
||||
{
|
||||
return [
|
||||
//
|
||||
];
|
||||
}
|
||||
|
||||
public static function getPages(): array
|
||||
{
|
||||
return [
|
||||
'index' => ListPlans::route('/'),
|
||||
'create' => CreatePlan::route('/create'),
|
||||
'edit' => EditPlan::route('/{record}/edit'),
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
|
||||
namespace App\Filament\Resources\Plans\Schemas;
|
||||
|
||||
use Filament\Forms\Components\Textarea;
|
||||
use Filament\Forms\Components\TextInput;
|
||||
use Filament\Schemas\Schema;
|
||||
|
||||
class PlanForm
|
||||
@@ -10,7 +12,11 @@ class PlanForm
|
||||
{
|
||||
return $schema
|
||||
->components([
|
||||
//
|
||||
]);
|
||||
TextInput::make('name')->required(),
|
||||
TextInput::make('payment')->label('Zahlung')->required(),
|
||||
Textarea::make('description')->label('Beschreibung')->required(),
|
||||
TextInput::make('number_user')->required()->label('Anzahl Benutzer')->numeric(),
|
||||
TextInput::make('number_gutachter')->required()->label('Anzahl Gutachter')->numeric(),
|
||||
])->inlineLabel()->columns(1);
|
||||
}
|
||||
}
|
||||
@@ -2,9 +2,8 @@
|
||||
|
||||
namespace App\Filament\Resources\Plans\Tables;
|
||||
|
||||
use Filament\Actions\BulkActionGroup;
|
||||
use Filament\Actions\DeleteBulkAction;
|
||||
use Filament\Actions\EditAction;
|
||||
use Filament\Tables\Columns\TextColumn;
|
||||
use Filament\Tables\Table;
|
||||
|
||||
class PlansTable
|
||||
@@ -13,18 +12,15 @@ class PlansTable
|
||||
{
|
||||
return $table
|
||||
->columns([
|
||||
//
|
||||
])
|
||||
->filters([
|
||||
//
|
||||
TextColumn::make('name'),
|
||||
TextColumn::make('payment')->label('Zahlungsart'),
|
||||
TextColumn::make('gutachten')->badge()->label('Anzahl'),
|
||||
TextColumn::make('number_user')->label('Benutzer')->badge(),
|
||||
TextColumn::make('number_gutachter')->label('Gutachter')->badge(),
|
||||
TextColumn::make('preis')->money('EUR'),
|
||||
])
|
||||
->recordActions([
|
||||
EditAction::make(),
|
||||
])
|
||||
->toolbarActions([
|
||||
BulkActionGroup::make([
|
||||
DeleteBulkAction::make(),
|
||||
]),
|
||||
]);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user