Update ShowServicios.php
This commit is contained in:
@@ -61,6 +61,7 @@ class ShowServicios extends Component
|
|||||||
public $fecha_final_1;
|
public $fecha_final_1;
|
||||||
public $fecha_final_2;
|
public $fecha_final_2;
|
||||||
public $utilidad;
|
public $utilidad;
|
||||||
|
public $tp = false;
|
||||||
|
|
||||||
use LivewireAlert;
|
use LivewireAlert;
|
||||||
protected $rules = [
|
protected $rules = [
|
||||||
@@ -85,9 +86,12 @@ class ShowServicios extends Component
|
|||||||
$this->email_tarjetaPlan = $this->usuario_actual->email;
|
$this->email_tarjetaPlan = $this->usuario_actual->email;
|
||||||
$this->celular_tarjetaPlan = $this->usuario_actual->celular;
|
$this->celular_tarjetaPlan = $this->usuario_actual->celular;
|
||||||
}
|
}
|
||||||
if (!empty($this->tarifa_id)) {
|
if (!empty($this->cantidad_tarjetaPlan)) {
|
||||||
$this->cargartarjetaPlan($this->tarifa_id);
|
//dd($this->tarifa_id);
|
||||||
|
//$this->cargartarjetaPlan($this->tarifa_id);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
$this->msj = Configuracione::orderby('id', 'desc')->select('msj_compra', 'msj_wp', 'clave_1', 'clave_2', 'clave_3', 'clave_4', 'clave_5', 'clave_6', 'iptv')->first();
|
$this->msj = Configuracione::orderby('id', 'desc')->select('msj_compra', 'msj_wp', 'clave_1', 'clave_2', 'clave_3', 'clave_4', 'clave_5', 'clave_6', 'iptv')->first();
|
||||||
|
|
||||||
@@ -114,12 +118,13 @@ class ShowServicios extends Component
|
|||||||
//Al abrir la tarjeta del servicio
|
//Al abrir la tarjeta del servicio
|
||||||
public function cargartarjetaPlan($id)
|
public function cargartarjetaPlan($id)
|
||||||
{
|
{
|
||||||
|
//$this->tarjetaPlan=false;
|
||||||
//Buscar tarifas por el id
|
//Buscar tarifas por el id
|
||||||
$tarifa_seleccionada = Tarifas::find($id);
|
$tarifa_seleccionada = Tarifas::find($id);
|
||||||
//dd($tarifa_seleccionada);
|
|
||||||
//Traer el servicio relacionado con esa tarifa
|
//Traer el servicio relacionado con esa tarifa
|
||||||
$servicio_tarifa = $tarifa_seleccionada->servicio;
|
$servicio_tarifa = $tarifa_seleccionada->servicio;
|
||||||
|
|
||||||
|
|
||||||
//INFORMACIÓN DEL SERVICIO
|
//INFORMACIÓN DEL SERVICIO
|
||||||
$this->servicio_id = $servicio_tarifa->id; //Id
|
$this->servicio_id = $servicio_tarifa->id; //Id
|
||||||
$this->servicio_tarjetaPlan = $servicio_tarifa->nombre; //Nombre
|
$this->servicio_tarjetaPlan = $servicio_tarifa->nombre; //Nombre
|
||||||
@@ -128,7 +133,7 @@ class ShowServicios extends Component
|
|||||||
$this->colorFondo_tarjetaPlan = $servicio_tarifa->color_fondo; //Color de fondo
|
$this->colorFondo_tarjetaPlan = $servicio_tarifa->color_fondo; //Color de fondo
|
||||||
|
|
||||||
//INFORMACIÓN DE LA TARJETA
|
//INFORMACIÓN DE LA TARJETA
|
||||||
$this->tarifa_id = $id; //El id de la tarifa
|
$this->tarifa_id = $tarifa_seleccionada->id; //El id de la tarifa
|
||||||
$this->pantallas_tarjetaPlan = $tarifa_seleccionada->pantallas; //Numero de pantallas de la tarifa
|
$this->pantallas_tarjetaPlan = $tarifa_seleccionada->pantallas; //Numero de pantallas de la tarifa
|
||||||
$this->dias_tarjetaPlan = $tarifa_seleccionada->dias; // Numero de dias de la tarifa
|
$this->dias_tarjetaPlan = $tarifa_seleccionada->dias; // Numero de dias de la tarifa
|
||||||
|
|
||||||
@@ -142,6 +147,7 @@ class ShowServicios extends Component
|
|||||||
->where('tarifa_id', $id)
|
->where('tarifa_id', $id)
|
||||||
->first();
|
->first();
|
||||||
|
|
||||||
|
|
||||||
//Si tiene tarifa personalizada toma el precio, si no tiene da el valor de la tarifa.
|
//Si tiene tarifa personalizada toma el precio, si no tiene da el valor de la tarifa.
|
||||||
$this->valor_tarjetaPlan = ($usuario_tarifa) ? $usuario_tarifa->precio : $tarifa_seleccionada->valor;
|
$this->valor_tarjetaPlan = ($usuario_tarifa) ? $usuario_tarifa->precio : $tarifa_seleccionada->valor;
|
||||||
//Si tiene tarifa personalizada toma la utilidad, si no tiene toma la utilidad de la tarifa.
|
//Si tiene tarifa personalizada toma la utilidad, si no tiene toma la utilidad de la tarifa.
|
||||||
@@ -192,8 +198,9 @@ class ShowServicios extends Component
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->tarjetaPlan = true;
|
//dd($this->tarjetaPlan);
|
||||||
|
$this->tp = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user