inhaltsangabe wip

This commit is contained in:
salam committed 2025-10-19 12:26:48 +02:00
1 parent 8ccc4a3c20
commit 3a35ccd69d
34 files changed
+281 -236

No files matched your search

@@ -2,9 +2,14 @@
namespace App\Filament\Resources\Inhaltsverzeichnis\Schemas;
use App\Models\TextblockKennung;
use App\Models\Tabellen;
use App\Models\Textblock;
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;
class InhaltsverzeichnisForm
@@ -13,15 +18,52 @@ class InhaltsverzeichnisForm
{
return $schema
->components([
TextInput::make('ordnungszahl')->numeric(),
Select::make('textblock_kennung_id')
->label('Textblock Art')
->options(function () {
$relatedOptions = TextblockKennung::all()->pluck('name', 'id')->toArray();
Flex::make([
Section::make([
Textarea::make('name')
->required()
->label('Kapitel Überschrift'),
Checkbox::make('ueberschrift_nicht_anzeigen')
->label('Überschrift nicht angezeigen'),
]),
Section::make([
TextInput::make('ordnungszahl')
->label('Kapitel Index')
->placeholder('3.21')
->numeric()
->default(0)
->belowContent([
'Bei "0" wird der Index im PDF nicht angezeigt',
]),
TextInput::make('seite')
->label('Seitenzahl')
->numeric()
->default(0)
->belowContent([
'Bei "0" wird die Seitenzahl automatisch generiert',
]),
]),
])->columnSpanFull(2),
return ['0' => 'ohne Textblock'] + $relatedOptions;
}),
TextInput::make('name'),
])->columns(1);
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',
]),
]);
}
}