Files
fewo-stommer/app/Filament/Resources/Notices/Schemas/NoticeForm.php
T
Lars StommerandClaude Opus 5.5 bb7eb62782 Inhaltsverwaltung: Bilder, Webseiten-Texte, Ausstattung, FAQ, Hinweis-Banner
- Bilder mit automatischen WebP-Webgrößen (640/1280/2048 px), Sortierung per Drag & Drop, Mehrfach-Upload, Import-Befehl photos:import
- Webseiten-Texte als feste, bearbeitbare Bausteine (config/content.php), Rich-Text bereinigt ausgegeben
- Ausstattung und FAQ aus der bisherigen Webseite übernommen
- Rolle Inhalte hat Zugriff auf alle Webseiten-Bereiche

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22 10:19:51 +02:00

50 lines
1.7 KiB
PHP
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<?php
namespace App\Filament\Resources\Notices\Schemas;
use App\Enums\NoticeTone;
use Filament\Forms\Components\DatePicker;
use Filament\Forms\Components\Select;
use Filament\Forms\Components\TextInput;
use Filament\Forms\Components\Toggle;
use Filament\Schemas\Schema;
class NoticeForm
{
public static function configure(Schema $schema): Schema
{
return $schema
->columns(2)
->components([
TextInput::make('text')
->label('Hinweistext')
->placeholder('z. B. Kurzfristig frei: 12.–15.11. mit 15 % Rabatt')
->required()
->maxLength(255)
->columnSpanFull(),
Select::make('tone')
->label('Art')
->options(NoticeTone::class)
->default(NoticeTone::Info)
->required(),
Toggle::make('is_active')
->label('Aktiv')
->default(true)
->inline(false),
DatePicker::make('starts_on')
->label('Anzeigen ab (optional)'),
DatePicker::make('ends_on')
->label('Anzeigen bis (optional)')
->afterOrEqual('starts_on'),
TextInput::make('link_label')
->label('Link-Text (optional)')
->placeholder('z. B. Jetzt anfragen')
->maxLength(100),
TextInput::make('link_url')
->label('Link-Ziel (optional)')
->placeholder('/buchen')
->maxLength(255),
]);
}
}