Files
laraundfelix/app/Filament/Resources/Communication/Templates/InquiryTemplateResource.php
T
LarsandClaude Sonnet 5.5 7302ac78e9
CI Feature / test (push) Successful in 4m17s
Bearbeite ein Formular vollständig in einem Editor und reduziere die Navigation der Kommunikation
Der Editor zeigt Bereiche mit Feldern und Teilbereichen; Felder werden direkt im Bereich angelegt oder aus dem Katalog
übernommen und landen im selben Katalog wie bisher. Bedingungen stehen am Feld, Teilbereich oder Bereich und werden zu
denselben Regeln wie die Regelliste; alles andere bleibt unter „Weitere Regeln“. Navigation: Anfragen, Formulare &
Befragungen, Einstellungen. Anliegen, Feldkatalog, Feldgruppen und Einstiege bleiben erreichbar (Einstellungen).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-27 22:37:32 +01:00

58 lines
1.9 KiB
PHP

<?php
namespace App\Filament\Resources\Communication\Templates;
use App\Domain\Communication\InquiryTemplate;
use App\Filament\Resources\Communication\CommunicationResource;
use App\Filament\Resources\Communication\Templates\Pages\EditInquiryTemplate;
use App\Filament\Resources\Communication\Templates\Pages\ListInquiryTemplates;
use App\Filament\Resources\Communication\Templates\RelationManagers\VersionsRelationManager;
use App\Filament\Support\TemplateEditor;
use Filament\Schemas\Schema;
use Filament\Tables\Columns\TextColumn;
use Filament\Tables\Table;
/**
* Formulare & Befragungen (Anfragevorlagen): ein vollständiger fachlicher Anfrageprozess, bearbeitet im Formular-Editor (ADR-61). Der Entwurf ist frei bearbeitbar; wirksam wird nur eine
* bewusst veröffentlichte, unveränderliche Fassung.
*/
class InquiryTemplateResource extends CommunicationResource
{
protected static ?string $model = InquiryTemplate::class;
protected static ?string $navigationLabel = 'Formulare & Befragungen';
protected static ?string $modelLabel = 'Formular';
protected static ?string $pluralModelLabel = 'Formulare & Befragungen';
protected static ?string $recordTitleAttribute = 'name';
protected static ?string $slug = 'kommunikation/vorlagen';
protected static ?int $navigationSort = 2;
public static function form(Schema $schema): Schema
{
return $schema->components(TemplateEditor::schema());
}
public static function table(Table $table): Table
{
return $table->columns([TextColumn::make('name')->label('Bezeichnung')]);
}
public static function getRelations(): array
{
return [VersionsRelationManager::class];
}
public static function getPages(): array
{
return [
'index' => ListInquiryTemplates::route('/'),
'edit' => EditInquiryTemplate::route('/{record}'),
];
}
}