projekt wip bofore relations
This commit is contained in:
1 parent
aa301f1197
commit
69d4efcd9d
11 files changed
+80
-89
No files matched your search
@@ -5,9 +5,10 @@ namespace App\Filament\Resources\Projektes\Schemas;
|
||||
use App\Enums\ProjektStatus;
|
||||
use Filament\Forms\Components\DatePicker;
|
||||
use Filament\Forms\Components\Radio;
|
||||
use Filament\Forms\Components\RichEditor;
|
||||
use Filament\Forms\Components\Select;
|
||||
use Filament\Forms\Components\Textarea;
|
||||
use Filament\Forms\Components\TextInput;
|
||||
use Filament\Schemas\Components\Section;
|
||||
use Filament\Schemas\Schema;
|
||||
|
||||
class ProjekteForm
|
||||
@@ -16,13 +17,25 @@ class ProjekteForm
|
||||
{
|
||||
return $schema
|
||||
->components([
|
||||
Select::make('auftraggeber_id')->relationship(name: 'auftraggeber', titleAttribute: 'name'),
|
||||
Select::make('gutachter_id')->relationship(name: 'gutachter', titleAttribute: 'name'),
|
||||
Radio::make('status')->options(ProjektStatus::class),
|
||||
TextInput::make('interner_name'),
|
||||
TextInput::make('ofizieller_name'),
|
||||
Textarea::make('beschreibung'),
|
||||
DatePicker::make('erstellung')->helperText('Datum am Gutachten'),
|
||||
Section::make('Benennung')
|
||||
->schema([
|
||||
TextInput::make('interner_name')->columns(1)->label('Interner Name')->required(),
|
||||
TextInput::make('offizieller_name')->columns(1)->label('Offizieller Name')->required(),
|
||||
DatePicker::make('erstellung')->helperText('Datum am Gutachten')->required(),
|
||||
]),
|
||||
Section::make('Zuordnung')
|
||||
->schema([
|
||||
Select::make('auftraggeber_id')->relationship(name: 'auftraggeber', titleAttribute: 'name')->required(),
|
||||
Select::make('gutachter_id')->relationship(name: 'gutachter', titleAttribute: 'name')->required(),
|
||||
Radio::make('status')->options(ProjektStatus::class)->required(),
|
||||
]),
|
||||
RichEditor::make('beschreibung')
|
||||
->toolbarButtons([
|
||||
['bold', 'italic', 'underline', 'strike', 'subscript', 'superscript', 'link'],
|
||||
['h2', 'h3', 'alignStart', 'alignCenter', 'alignEnd'],
|
||||
['bulletList', 'orderedList', 'table'],
|
||||
['undo', 'redo'],
|
||||
])->columnSpanFull(),
|
||||
]);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user