Update refresh page
This commit is contained in:
parent
8dc19807b2
commit
09c2efbb4c
|
@ -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>
|
||||
|
|
|
@ -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.');
|
||||
}
|
||||
|
||||
|
|
|
@ -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', [
|
||||
|
|
|
@ -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']],
|
||||
|
|
Loading…
Reference in New Issue