modales de pregunta fixeados
This commit is contained in:
@@ -5,7 +5,6 @@ namespace App\Http\Livewire;
|
||||
use App\Models\Cuentas;
|
||||
use App\Models\Historiale;
|
||||
use App\Models\Historial_cuenta;
|
||||
use App\Models\Log_general;
|
||||
use App\Models\Log_historial;
|
||||
use App\Models\Notificacion;
|
||||
use App\Models\Pendientes;
|
||||
@@ -110,6 +109,12 @@ class ShowPlanes extends Component
|
||||
|
||||
public $editarTarifaRol = false;
|
||||
|
||||
public function getListeners()
|
||||
{
|
||||
return [
|
||||
'confirmed', 'siRenovar', 'noRenovar'
|
||||
];
|
||||
}
|
||||
|
||||
public function render()
|
||||
{
|
||||
@@ -209,7 +214,7 @@ class ShowPlanes extends Component
|
||||
{
|
||||
$this->alert('warning', '¿Desea también desvincular todos los usuarios de esta cuenta?', [
|
||||
'position' => 'center',
|
||||
'timer' => '10000',
|
||||
'timer' => '60000',
|
||||
'toast' => false,
|
||||
'text' => 'Esta seguro',
|
||||
'showConfirmButton' => true,
|
||||
@@ -217,7 +222,8 @@ class ShowPlanes extends Component
|
||||
'showDenyButton' => false,
|
||||
'onDenied' => 'noRenovar',
|
||||
'showCancelButton' => true,
|
||||
'onDismissed' => 'noRenovar',
|
||||
'allowOutsideClick' => false,
|
||||
'allowEscapeKey' => false,
|
||||
'cancelButtonText' => 'No, solo renovar',
|
||||
'confirmButtonText' => 'Si, liberar cuenta',
|
||||
]);
|
||||
@@ -248,7 +254,7 @@ class ShowPlanes extends Component
|
||||
{
|
||||
$id = $this->id_cuentaVer;
|
||||
|
||||
$cuenta_renovar = Cuentas::where('id', $id)->update([
|
||||
Cuentas::where('id', $id)->update([
|
||||
'correo' => $this->usuario_renovar,
|
||||
'password' => $this->password_renovar,
|
||||
'inicio' => date('Y-m-d', strtotime(strval($this->fecha_inicial_renovar))),
|
||||
@@ -256,6 +262,8 @@ class ShowPlanes extends Component
|
||||
'estado' => $this->estado,
|
||||
]);
|
||||
|
||||
$cuenta_renovar = Cuentas::find($id);
|
||||
|
||||
Log_historial::create([
|
||||
'user_id' => Auth::user()->id,
|
||||
'detalle' => 'El usuario ha renovado la cuenta ' . $cuenta_renovar->correo
|
||||
@@ -269,13 +277,6 @@ class ShowPlanes extends Component
|
||||
$this->ver = false;
|
||||
}
|
||||
|
||||
public function getListeners()
|
||||
{
|
||||
return [
|
||||
'confirmed', 'siRenovar', 'noRenovar'
|
||||
];
|
||||
}
|
||||
|
||||
/* ------------- CREAR ------------- */
|
||||
public function createNewCuenta()
|
||||
{
|
||||
|
||||
@@ -316,7 +316,7 @@ class ShowPromociones extends Component
|
||||
|
||||
$this->alert('warning', 'No hay disponibilidad de ' . $message . ' en este momento.', [
|
||||
'position' => 'center',
|
||||
'timer' => '30000',
|
||||
'timer' => '60000',
|
||||
'toast' => false,
|
||||
'text' => '¿Te gustaría realizar la compra ahora y recibir tu pedido tan pronto como haya disponibilidad?.',
|
||||
'showConfirmButton' => true,
|
||||
@@ -324,7 +324,8 @@ class ShowPromociones extends Component
|
||||
'showDenyButton' => false,
|
||||
'onDenied' => 'denegarCompra',
|
||||
'showCancelButton' => true,
|
||||
'onDismissed' => 'denegarCompra',
|
||||
'allowOutsideClick' => false,
|
||||
'allowEscapeKey' => false,
|
||||
'cancelButtonText' => 'No, abandonar.',
|
||||
'confirmButtonText' => 'Sí, comprar.',
|
||||
]);
|
||||
|
||||
@@ -198,6 +198,14 @@ class ShowUsuarios extends Component
|
||||
|
||||
public function addSaldo()
|
||||
{
|
||||
if (!$this->valor_recargar) {
|
||||
$this->alert('warning', '¡Coloque un valor!', [
|
||||
'position' => 'top'
|
||||
]);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
$recarga = new recarga;
|
||||
$recarga->payment_method_id = 'manual';
|
||||
$recarga->status = 'Aprovada';
|
||||
@@ -222,6 +230,14 @@ class ShowUsuarios extends Component
|
||||
|
||||
public function descontar()
|
||||
{
|
||||
if (!$this->valor_recargar) {
|
||||
$this->alert('warning', '¡Coloque un valor!', [
|
||||
'position' => 'top'
|
||||
]);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
$recarga = new recarga;
|
||||
$recarga->payment_method_id = 'manual';
|
||||
$recarga->status = 'Descuento';
|
||||
|
||||
Reference in New Issue
Block a user