This commit is contained in:
salam committed 2025-11-07 10:52:36 +01:00
1 parent faded38980
commit 48b372c164
24 files changed
+357 -244

No files matched your search

@@ -5,9 +5,11 @@ namespace App\Filament\Resources\Inhaltsverzeichnis\Schemas;
use App\Models\Inhaltselement;
use App\Models\Textblock;
use Filament\Forms\Components\Checkbox;
use Filament\Forms\Components\FileUpload;
use Filament\Forms\Components\Select;
use Filament\Forms\Components\Textarea;
use Filament\Forms\Components\TextInput;
use Filament\Schemas\Components\Section;
use Filament\Schemas\Components\Tabs;
use Filament\Schemas\Components\Tabs\Tab;
use Filament\Schemas\Schema;
@@ -24,38 +26,63 @@ class InhaltsverzeichnisForm
->schema([
Checkbox::make('neue_seite')
->label('Start neuer Seite'),
Checkbox::make('seitenzahl_anzeige')
->label('Seitenzahl angezeigen'),
Checkbox::make('ueberschrift_verbergen')
->label('Überschrift verbergen'),
Textarea::make('name')
TextInput::make('name')
->prefixIcon('phosphor-article')
->required()
->label('Überschrift')
->columnSpan(3),
]),
Tab::make('Kapitel Index')
->schema([
->columnSpan(2),
TextInput::make('ordnungszahl')
->label('Kapitel Index')
->prefixIcon('phosphor-list-numbers')
->placeholder('3.21')
->numeric()
->default(0)
->belowContent([
'Bei "0" wird der Index im Inhaltsverzeichnis und bei der Überschrift im Dokument nicht angezeigt.',
'Bei "0" wird der Index nicht angezeigt',
])
->columnSpan(1),
])->columnSpanFull(),
Tab::make('Seitenzahl')
->schema([
Checkbox::make('seitenzahl_anzeige')
->label('Seitenzahl angezeigen'),
TextInput::make('seite')
->label('Seitenzahl')
->numeric()
->default(0)
->belowContent([
'Bei "0" wird die Seitenzahl automatisch generiert',
->columnSpan(2),
// TextInput::make('seite')
// ->label('Seitenzahl')
// ->numeric()
// ->default(0)
// ->belowContent([
// 'Bei "0" wird die Seitenzahl automatisch generiert',
// ])
// ->columnSpan(1),
Section::make('Benutzer Hilfe')
->icon('phosphor-chat-text')
->schema([
TextInput::make('hilfe_titel')
->aboveLabel([
'Erklärungen des Inhalts beim Bearbeiten des Gutachtens',
])
->afterLabel(['optional'])
->label('Überschrift')
->columnSpanFull(),
Textarea::make('hilfe_description')
->afterLabel(['optional'])
->label('Beschreibung'),
FileUpload::make('hilfe_image')
->afterLabel(['optional'])
->image()
->label('Bild')
->disk('public')
->maxSize(3072) // 3MB limit
->acceptedFileTypes(['image/jpeg', 'image/png', 'image/webp'])
->directory('gutachten_hilfe')
->visibility('public')
->columnSpanFull(),
])
->columnSpan(1),
])->columnSpanFull(),
->secondary()
->compact()
->collapsed()
->columnSpanFull(),
])->columns(3),
Tab::make('Inhaltselement')
->hiddenLabel()
->schema([
@@ -69,7 +96,6 @@ class InhaltsverzeichnisForm
return $res;
}),
]),
Tab::make('Textblock')
->hiddenLabel()