nuevo formulario

This commit is contained in:
Lizandro Guarnizo
2026-06-18 11:06:49 -05:00
parent 155450b676
commit 0282645c08
9 changed files with 231 additions and 3 deletions
+6 -1
View File
@@ -38,6 +38,7 @@ class ShowServicio extends Component
public $url;
public $precio;
public $renovacion = false;
public $dgo = false;
protected $rules = [
'nombre_servicio' => 'required',
@@ -110,6 +111,7 @@ class ShowServicio extends Component
$servicio->url = $this->url;
$servicio->renovacion = $this->renovacion;
$servicio->precio = $this->precio;
$servicio->dgo = $this->dgo;
$servicio->save();
$this->alert('success', 'Servicio creado correctamente!', [
@@ -141,6 +143,7 @@ class ShowServicio extends Component
$this->url = $consulta_servicios->url;
$this->renovacion = $consulta_servicios->renovacion == 1 ? true : false;
$this->precio = $consulta_servicios->precio;
$this->dgo = $consulta_servicios->dgo == 1 ? true : false;
}
public function guardar()
{
@@ -200,7 +203,8 @@ class ShowServicio extends Component
'ver_url' => $this->ver_url,
'url' => $this->url,
'renovacion' => $this->renovacion == 1 ? true : false,
'precio'=> $this->precio
'precio'=> $this->precio,
'dgo' => $this->dgo
]);
$this->serviciosEditar = false;
@@ -270,6 +274,7 @@ class ShowServicio extends Component
$this->completa = null;
$this->tiempo = null;
$this->renovacion = null;
$this->dgo = null;
$this->servicio = null;
}
}