wip
This commit is contained in:
1 parent
3a35ccd69d
commit
261fb0916d
38 files changed
+348
-258
No files matched your search
@@ -8,7 +8,6 @@ use Filament\Forms\Components\Checkbox;
|
||||
use Filament\Forms\Components\Select;
|
||||
use Filament\Forms\Components\Textarea;
|
||||
use Filament\Forms\Components\TextInput;
|
||||
use Filament\Schemas\Components\Flex;
|
||||
use Filament\Schemas\Components\Section;
|
||||
use Filament\Schemas\Schema;
|
||||
|
||||
@@ -18,15 +17,15 @@ class InhaltsverzeichnisForm
|
||||
{
|
||||
return $schema
|
||||
->components([
|
||||
Flex::make([
|
||||
Section::make([
|
||||
Section::make('Überschrift')
|
||||
->schema([
|
||||
Textarea::make('name')
|
||||
->required()
|
||||
->label('Kapitel Überschrift'),
|
||||
->label('Kapitel / Absatz')
|
||||
->columnSpan(2),
|
||||
Checkbox::make('ueberschrift_nicht_anzeigen')
|
||||
->label('Überschrift nicht angezeigen'),
|
||||
]),
|
||||
Section::make([
|
||||
->label('Überschrift nicht angezeigen')
|
||||
->columnSpan(2),
|
||||
TextInput::make('ordnungszahl')
|
||||
->label('Kapitel Index')
|
||||
->placeholder('3.21')
|
||||
@@ -34,36 +33,44 @@ class InhaltsverzeichnisForm
|
||||
->default(0)
|
||||
->belowContent([
|
||||
'Bei "0" wird der Index im PDF nicht angezeigt',
|
||||
]),
|
||||
])
|
||||
->columnSpan(1),
|
||||
TextInput::make('seite')
|
||||
->label('Seitenzahl')
|
||||
->numeric()
|
||||
->default(0)
|
||||
->belowContent([
|
||||
'Bei "0" wird die Seitenzahl automatisch generiert',
|
||||
])
|
||||
->columnSpan(1),
|
||||
])->columnSpanFull(),
|
||||
Section::make('Tabelle & Textblöcke')
|
||||
->hiddenLabel()
|
||||
->schema([
|
||||
Select::make('tabellen_id')->label('Tabelle')
|
||||
->prefixIcon('phosphor-table')
|
||||
->prefixIconColor(
|
||||
fn ($record): string => $record->tabellen_id == 0 ? 'gray' : 'primary'
|
||||
)
|
||||
->default(0)
|
||||
->options(function () {
|
||||
return Tabellen::all()->pluck('name', 'id')->toArray();
|
||||
})->belowContent([
|
||||
'Kann auch frei bleiben',
|
||||
]),
|
||||
]),
|
||||
])->columnSpanFull(2),
|
||||
|
||||
Select::make('tabellen_id')->label('Tabelle')
|
||||
->prefixIcon('phosphor-table')
|
||||
->default(0)
|
||||
->options(function () {
|
||||
return Tabellen::all()->pluck('name', 'id')->toArray();
|
||||
})->belowContent([
|
||||
'Kann auch frei bleiben',
|
||||
]),
|
||||
|
||||
Select::make('textblock_id')->label('Textblock')
|
||||
->prefixIcon('phosphor-article')
|
||||
->default(0)
|
||||
->options(function () {
|
||||
return Textblock::all()->pluck('name', 'id')->toArray();
|
||||
|
||||
// return ['100' => 'Eigener Textblock'] + $relatedOptions;
|
||||
})->belowContent([
|
||||
'Kann auch frei bleiben',
|
||||
]),
|
||||
Select::make('textblock_id')->label('Textblock')
|
||||
->prefixIcon('phosphor-article')
|
||||
->prefixIconColor(
|
||||
fn ($record): string => $record->textblock_id == 0 ? 'gray' : 'primary'
|
||||
)
|
||||
->default(0)
|
||||
->options(function () {
|
||||
return Textblock::all()->pluck('name', 'id')->toArray();
|
||||
})->belowContent([
|
||||
'Kann auch frei bleiben',
|
||||
]),
|
||||
])->columnSpanFull(),
|
||||
]);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user