Ergaenze Stammdaten, Suche, Dimensionen, Abdeckung und Ausgabenachweis
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
7b54c38623
commit
5e763d15ec
23 files changed
+661
-5
No files matched your search
@@ -11,6 +11,7 @@
|
||||
use App\Domain\Catalog\ContentVersionStatus;
|
||||
use App\Domain\Catalog\DomainRuleException;
|
||||
use App\Domain\Catalog\EditorialContentKind;
|
||||
use App\Domain\Catalog\IdentityProfile;
|
||||
use App\Filament\Resources\Combinations\CombinationResource;
|
||||
use App\Filament\Resources\Courses\CourseResource;
|
||||
use App\Filament\Resources\Exercises\ExerciseResource;
|
||||
@@ -22,6 +23,7 @@
|
||||
use Filament\Forms\Components\Placeholder;
|
||||
use Filament\Forms\Components\Repeater;
|
||||
use Filament\Forms\Components\Select;
|
||||
use Filament\Forms\Components\Textarea;
|
||||
use Filament\Forms\Components\TextInput;
|
||||
use Filament\Notifications\Notification;
|
||||
use Filament\Resources\Pages\EditRecord;
|
||||
@@ -44,6 +46,9 @@ public function form(Schema $schema): Schema
|
||||
{
|
||||
return $schema->columns(1)->components([
|
||||
TextInput::make('designation')->label('Bezeichnung')->required(),
|
||||
TextInput::make('display_title')->label('Anzeigetitel')
|
||||
->helperText('Erscheint in der Bibliothek. Leer lässt die Bezeichnung stehen.'),
|
||||
Textarea::make('summary')->label('Kurzbeschreibung')->rows(3),
|
||||
Select::make('kind')->label('Art')->options(CompositionKind::options())->required()
|
||||
->helperText('Übung, Kurs und fachliche Kombination sind verschiedene Zusammenstellungen. Die Art lässt sich hier ändern.'),
|
||||
Select::make('editorial_content_kind_id')
|
||||
@@ -153,6 +158,8 @@ protected function mutateFormDataBeforeFill(array $data): array
|
||||
|
||||
return [
|
||||
'designation' => $composition->designation,
|
||||
'display_title' => $composition->display_title,
|
||||
'summary' => $composition->summary,
|
||||
'kind' => $kind instanceof CompositionKind ? $kind->value : $kind,
|
||||
'editorial_content_kind_id' => $composition->editorial_content_kind_id,
|
||||
'members' => $members,
|
||||
@@ -169,6 +176,10 @@ protected function handleRecordUpdate(Model $record, array $data): Model
|
||||
try {
|
||||
$kind = CompositionKind::from($data['kind']);
|
||||
$record->designation = trim((string) $data['designation']);
|
||||
app(IdentityProfile::class)->fill($record, [
|
||||
'display_title' => $data['display_title'] ?? null,
|
||||
'summary' => $data['summary'] ?? null,
|
||||
], auth()->user());
|
||||
$record->kind = $kind;
|
||||
$record->editorial_content_kind_id = filled($data['editorial_content_kind_id'] ?? null)
|
||||
? (int) $data['editorial_content_kind_id']
|
||||
|
||||
Reference in new issue
Block a user