Baue den Aufbauarbeitsplatz nach dem kombinierten Entwurf um.
Struktur links mit Position, Ziehgriff, aufklappbarem Quelleninhalt und Auf/Ab für die ausgewählte Verwendung; rechts der Detailbereich mit „An dieser Stelle“ (Rolle, Hinweis, Fassung), „Quelle“ und „Inhaltsvorschau“. Didaktik und Katalogbild sowie Fassungen und Verwendung sind eigene Bereiche statt Dialog und Seitenspalte. Freigabe- und Textdialog nutzen den gemeinsamen Dialog. Entfernt verdeckte Speicherungen: Hinzufügen eines Bestandteils speichert den Entwurf nicht mehr nebenbei (Ausnahme: ausdrückliches „Zurück und einbinden“), der Textwortlaut wird an der Quelle gespeichert, ohne den Aufbau mitzuspeichern. Der Mediendialog „Angaben und Vorschaubild“ war ein zweiter Editor für Medientexte und weicht „Quelle bearbeiten“. Vorhandene Bilder als Katalogbild kommen über den gemeinsamen Picker. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
156cdd6976
commit
7eb3cd6230
11 files changed
+840
-743
No files matched your search
@@ -10,6 +10,7 @@
|
||||
use App\Domain\Catalog\PresentationAssignment;
|
||||
use App\Domain\Catalog\PresentationMedia;
|
||||
use App\Filament\Resources\ContentElements\Pages\ViewContentElement;
|
||||
use App\Filament\Resources\Courses\Pages\EditCourse;
|
||||
use App\Filament\Resources\Exercises\Pages\EditExercise;
|
||||
use App\Filament\Resources\LicenseArticles\LicenseArticleResource;
|
||||
use App\Filament\Resources\LicenseArticles\Pages\ViewLicenseArticle;
|
||||
@@ -165,6 +166,65 @@ public function test_the_license_article_needs_the_catalog_role_and_offers_no_gl
|
||||
->assertDontSee('Website-Freigabe zurücknehmen');
|
||||
}
|
||||
|
||||
public function test_aufbau_keeps_local_inputs_while_switching_and_saves_only_with_the_draft(): void
|
||||
{
|
||||
$content = app(ContentService::class);
|
||||
$sheet = $content->publishElementVersion($content->createElement('text', 'text', 'Blatt'), 'Hinweis');
|
||||
$film = $content->publishElementVersion($content->createElement('film', 'film', 'Lara im Park'), 'Film');
|
||||
$extra = $content->publishElementVersion($content->createElement('bild', 'bild', 'Szenenbild'), null, ['file' => 'inhalte/szene.jpg']);
|
||||
$version = $content->publishComposition(
|
||||
$content->createComposition('Wechsel', CompositionKind::Uebung),
|
||||
[['role' => 'Unterlage', 'target' => $sheet], ['role' => 'Film', 'target' => $film]],
|
||||
);
|
||||
|
||||
$page = Livewire::actingAs($this->editor(), 'staff')
|
||||
->test(EditExercise::class, ['record' => $version->composition_id])
|
||||
->assertSet('selected', 0)
|
||||
->assertSee('Position 1 von 2')
|
||||
->set('roleDraft', 'Einstieg')
|
||||
->set('noteDraft', 'Zuerst besprechen')
|
||||
->call('selectPart', 1)
|
||||
->assertSet('roleDraft', 'Film')
|
||||
->call('selectPart', 0)
|
||||
->assertSet('roleDraft', 'Einstieg')
|
||||
->assertSet('noteDraft', 'Zuerst besprechen')
|
||||
->call('addPart', 'element:'.$extra->id)
|
||||
->assertSet('selected', 2)
|
||||
->assertSee('Änderungen am Aufbau nicht gespeichert');
|
||||
|
||||
$this->assertNull($version->composition->fresh()->working_draft);
|
||||
|
||||
$page->call('askConfirmation', 'removePart', 2)
|
||||
->assertSee('„Szenenbild“ aus diesem Aufbau entfernen?')
|
||||
->call('confirmConfirmation')
|
||||
->assertSee('Das Quellobjekt bleibt im Bestand')
|
||||
->call('saveDraft');
|
||||
|
||||
$draft = $version->composition->fresh()->working_draft;
|
||||
$this->assertSame(['Einstieg', 'Film'], array_column($draft['members'], 'role'));
|
||||
$this->assertSame('Zuerst besprechen', $draft['members'][0]['note']);
|
||||
$this->assertNotNull($extra->fresh());
|
||||
$this->assertSame(1, $version->composition->fresh()->versions()->count());
|
||||
}
|
||||
|
||||
public function test_a_referenced_module_shows_its_source_content_read_only(): void
|
||||
{
|
||||
$content = app(ContentService::class);
|
||||
$sheet = $content->publishElementVersion($content->createElement('text', 'text', 'Trainerunterlage Abstand'), 'Hinweis');
|
||||
$module = $content->publishComposition($content->createComposition('Modul Abstand', CompositionKind::Uebung), [['role' => 'Unterlage', 'target' => $sheet]]);
|
||||
$program = $content->publishComposition($content->createComposition('Programm Abstand', CompositionKind::Kurs), [['role' => 'Einstieg', 'target' => $module]]);
|
||||
|
||||
Livewire::actingAs($this->editor(), 'staff')
|
||||
->test(EditCourse::class, ['record' => $program->composition_id])
|
||||
->assertDontSee('Inhalt der Quelle')
|
||||
->call('toggleExpanded', 0)
|
||||
->assertSee('Inhalt der Quelle')
|
||||
->assertSee('Nur zur Ansicht')
|
||||
->assertSee('Trainerunterlage Abstand')
|
||||
->set('detailTab', 'quelle')
|
||||
->assertSee('Quelle bearbeiten');
|
||||
}
|
||||
|
||||
public function test_creating_a_medium_from_the_picker_closes_the_picker_first(): void
|
||||
{
|
||||
$module = app(ContentService::class)->createComposition('Neues Medium', CompositionKind::Uebung);
|
||||
@@ -195,7 +255,6 @@ public function test_redaktion_return_keeps_open_composition_inputs_and_saves_on
|
||||
->set('learningGoal', 'Grenze erkennen')
|
||||
->call('openRedaktion')
|
||||
->assertSet('redaktionOpen', true)
|
||||
->assertSet('partOpen', false)
|
||||
->assertSee('Redaktion speichern')
|
||||
->assertSee('Zurück zum Aufbau')
|
||||
->assertSee('Präsentationsmedien')
|
||||
@@ -238,7 +297,8 @@ public function test_didactic_dialog_and_draft_discard_do_not_touch_open_redakti
|
||||
->call('closeRedaktion')
|
||||
->call('openModule')
|
||||
->set('durationMinutes', '20')
|
||||
->call('saveModule')
|
||||
->call('saveDraft')
|
||||
->call('saveCatalogImage')
|
||||
->assertSet('teaser', 'Noch nicht gespeichert');
|
||||
|
||||
$this->assertNull($version->composition->fresh()->teaser);
|
||||
|
||||
Reference in new issue
Block a user