Update refresh page

This commit is contained in:
philipp lang 2024-10-20 21:23:47 +02:00
parent 6188a8de4e
commit ef16176b63
4 changed files with 4 additions and 6 deletions

View File

@ -24,7 +24,7 @@ class Layout extends Component
public function render()
{
return <<<'HTML'
<div class="grow flex flex-col">
<div class="grow flex flex-col" @refresh-page.window="$wire.$refresh">
<div class="grow bg-gray-900 flex flex-col duration-300 navbar:ml-60">
<x-page::header title="{{ session()->get('title') }}">
<x-slot:beforeTitle>

View File

@ -90,7 +90,7 @@ class Form extends Component
Mailgateway::create($payload);
}
$this->dispatch('closeModal');
$this->dispatch('refresh');
$this->dispatch('refresh-page');
$this->dispatch('success', 'Erfolgreich gespeichert.');
}

View File

@ -10,8 +10,6 @@ class SettingView extends Component
{
public string $settingClass = MailgatewaySettings::class;
public $listeners = ['refresh' => '$refresh'];
public function render()
{
return view('mailgateway::setting-view', [

View File

@ -22,7 +22,7 @@ it('test it saves a mail gateway', function () {
->set('cls', LocalType::class)
->call('onSave')
->assertDispatched('closeModal')
->assertDispatched('refresh')
->assertDispatched('refresh-page')
->assertDispatched('success');
$this->assertDatabaseHas('mailgateways', [
@ -54,7 +54,7 @@ it('test it validates mail gateway', function (array $attributes, array $errors)
->call('onSave')
->assertHasErrors($errors)
->assertNotDispatched('closeModal')
->assertNotDispatched('refresh')
->assertNotDispatched('refresh-page')
->assertNotDispatched('success');
})->with([
[['name' => ''], ['name' => 'required']],