Add Livewire saldo header component and update on saldo change

This commit is contained in:
Juan Felipe Duarte
2025-06-26 17:16:04 -07:00
parent f72062fffd
commit 82ec6b4b5c
5 changed files with 20 additions and 2 deletions
+15
View File
@@ -0,0 +1,15 @@
<?php
namespace App\Http\Livewire;
use Livewire\Component;
class SaldoHeader extends Component
{
public $listeners = ['actualizarSaldoHeader' => '$refresh'];
public function render()
{
return view('livewire.saldo-header');
}
}
+2
View File
@@ -357,6 +357,8 @@ class ShowUsuarios extends Component
$logsGeneral->historial_id = null;
$logsGeneral->save();
$this->emit('actualizarSaldoHeader');
$this->alert('success', 'Saldo actualizado con éxito.', [
'position' => 'top'
]);