Öffne „Neues Medium anlegen“ aus dem Picker erst nach dem Schließen des Pickers.
Filament rendert beim Öffnen einer Aktion nicht neu; der Dialog wird deshalb nach der Antwort per $wire geöffnet. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
494e9fa0fb
commit
baa7691ab5
3 files changed
+23
-1
No files matched your search
@@ -968,6 +968,15 @@ public function addText(): void
|
|||||||
$this->feedback = $title.' ist angelegt und in den Aufbau übernommen. Der Text bleibt bearbeitbar, solange diese Fassung nicht freigegeben und verwendet wird. Es entsteht keine neue Fassung dieses Eintrags.';
|
$this->feedback = $title.' ist angelegt und in den Aufbau übernommen. Der Text bleibt bearbeitbar, solange diese Fassung nicht freigegeben und verwendet wird. Es entsteht keine neue Fassung dieses Eintrags.';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Schließt erst den Picker und öffnet danach den Dialog, damit beide nicht übereinander liegen.
|
||||||
|
*/
|
||||||
|
public function startCreateMedium(): void
|
||||||
|
{
|
||||||
|
$this->closePicker();
|
||||||
|
$this->js("\$wire.mountAction('createMedium')");
|
||||||
|
}
|
||||||
|
|
||||||
private function revealMediumForm(): void
|
private function revealMediumForm(): void
|
||||||
{
|
{
|
||||||
$this->pickerOpen = false;
|
$this->pickerOpen = false;
|
||||||
|
|||||||
@@ -242,7 +242,7 @@
|
|||||||
@if ($zweck === 'aufbau')
|
@if ($zweck === 'aufbau')
|
||||||
<span style="display: flex; flex-wrap: wrap; gap: 0.25rem 1rem;">
|
<span style="display: flex; flex-wrap: wrap; gap: 0.25rem 1rem;">
|
||||||
@if (method_exists($this, 'openText'))<button type="button" class="vw-link is-quiet" wire:click="openText">Neuen Text erstellen</button>@endif
|
@if (method_exists($this, 'openText'))<button type="button" class="vw-link is-quiet" wire:click="openText">Neuen Text erstellen</button>@endif
|
||||||
<button type="button" class="vw-link is-quiet" x-on:click="$wire.closePicker().then(() => $wire.mountAction('createMedium'))">Neues Medium anlegen</button>
|
<button type="button" class="vw-link is-quiet" wire:click="startCreateMedium">Neues Medium anlegen</button>
|
||||||
</span>
|
</span>
|
||||||
@if (method_exists($this, 'isProgram') && $this->isProgram())
|
@if (method_exists($this, 'isProgram') && $this->isProgram())
|
||||||
<form wire:submit="startModule" style="display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center;">
|
<form wire:submit="startModule" style="display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center;">
|
||||||
|
|||||||
@@ -165,6 +165,19 @@ public function test_the_license_article_needs_the_catalog_role_and_offers_no_gl
|
|||||||
->assertDontSee('Website-Freigabe zurücknehmen');
|
->assertDontSee('Website-Freigabe zurücknehmen');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function test_creating_a_medium_from_the_picker_closes_the_picker_first(): void
|
||||||
|
{
|
||||||
|
$module = app(ContentService::class)->createComposition('Neues Medium', CompositionKind::Uebung);
|
||||||
|
|
||||||
|
Livewire::actingAs($this->editor(), 'staff')
|
||||||
|
->test(EditExercise::class, ['record' => $module->id])
|
||||||
|
->call('openPicker')
|
||||||
|
->assertSee('Neues Medium anlegen')
|
||||||
|
->call('startCreateMedium')
|
||||||
|
->assertSet('pickerOpen', false)
|
||||||
|
->assertDontSee('Bestandteil auswählen');
|
||||||
|
}
|
||||||
|
|
||||||
public function test_redaktion_return_keeps_open_composition_inputs_and_saves_only_editorial_text(): void
|
public function test_redaktion_return_keeps_open_composition_inputs_and_saves_only_editorial_text(): void
|
||||||
{
|
{
|
||||||
$content = app(ContentService::class);
|
$content = app(ContentService::class);
|
||||||
|
|||||||
Reference in new issue
Block a user