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