Update update hook
This commit is contained in:
parent
21433624c5
commit
b26ac83031
|
@ -42,16 +42,14 @@ class Form extends Component
|
|||
];
|
||||
}
|
||||
|
||||
public function mount(?string $model = null): void
|
||||
public function mount(?Mailgateway $model = null): void
|
||||
{
|
||||
$this->types = app('mail-gateways')->map(fn ($gateway) => [
|
||||
'name' => $gateway::name(),
|
||||
'id' => $gateway,
|
||||
]);
|
||||
|
||||
$model = Mailgateway::find($model);
|
||||
|
||||
if ($model) {
|
||||
if ($model->getRouteKey()) {
|
||||
$this->id = $model->id;
|
||||
$this->name = $model->name;
|
||||
$this->domain = $model->domain;
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
<th>Aktion</th>
|
||||
</thead>
|
||||
|
||||
<x-ui::action wire:click.prevent="$dispatch('openModal', {component: 'modules.mailgateway.components.form', props: {model: ''}, title: 'Verbindung erstellen'})" icon="plus" variant="danger">Neu</x-ui::action>
|
||||
<x-ui::action wire:click.prevent="$dispatch('openModal', {component: 'modules.mailgateway.components.form', props: {}, title: 'Verbindung erstellen'})" icon="plus" variant="danger">Neu</x-ui::action>
|
||||
|
||||
@foreach ($data as $index => $gateway)
|
||||
<tr wire:key="$index">
|
||||
|
|
Loading…
Reference in New Issue