Update update hook
This commit is contained in:
		
							parent
							
								
									c34418ee8a
								
							
						
					
					
						commit
						9fa62d61c0
					
				|  | @ -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) => [ |         $this->types = app('mail-gateways')->map(fn ($gateway) => [ | ||||||
|             'name' => $gateway::name(), |             'name' => $gateway::name(), | ||||||
|             'id' => $gateway, |             'id' => $gateway, | ||||||
|         ]); |         ]); | ||||||
| 
 | 
 | ||||||
|         $model = Mailgateway::find($model); |         if ($model->getRouteKey()) { | ||||||
| 
 |  | ||||||
|         if ($model) { |  | ||||||
|             $this->id = $model->id; |             $this->id = $model->id; | ||||||
|             $this->name = $model->name; |             $this->name = $model->name; | ||||||
|             $this->domain = $model->domain; |             $this->domain = $model->domain; | ||||||
|  |  | ||||||
|  | @ -9,7 +9,7 @@ | ||||||
|                 <th>Aktion</th> |                 <th>Aktion</th> | ||||||
|             </thead> |             </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) |             @foreach ($data as $index => $gateway) | ||||||
|             <tr wire:key="$index"> |             <tr wire:key="$index"> | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue