premios fixed
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
namespace App\Http\Livewire;
|
||||
|
||||
use App\Models\Notificacion;
|
||||
use App\Models\PremioEntregado;
|
||||
use App\Models\Saldo;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
use Livewire\Component;
|
||||
@@ -28,7 +29,7 @@ class Bell extends Component
|
||||
$this->numNoti = count($consulta);
|
||||
|
||||
return view('livewire.bell', [
|
||||
'consulta' => $consulta
|
||||
'consulta' => $consulta,
|
||||
]);
|
||||
}
|
||||
|
||||
@@ -51,6 +52,17 @@ class Bell extends Component
|
||||
|
||||
$notificacion = Notificacion::find($id);
|
||||
|
||||
if (!$notificacion || $notificacion->estado == 0) {
|
||||
|
||||
$this->reclamandoPremio = false;
|
||||
|
||||
$this->alert('error', 'No se pudo reclamar el premio', [
|
||||
'position' => 'top'
|
||||
]);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
$consulta_saldo = Saldo::where('usuario_id', Auth::user()->id)->first();
|
||||
|
||||
if ($consulta_saldo) {
|
||||
|
||||
Reference in New Issue
Block a user