From f89f3bf00fa4497ae96a6a5f5ced89c83eb25bbd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jaime=20Jim=C3=A9nez?= Date: Wed, 26 Mar 2025 19:03:08 +0100 Subject: [PATCH] modificado el link a cliente (icono busqueda) desde presupuesto admin --- ci4/app/Controllers/Presupuestos/Presupuestoadmin.php | 2 ++ .../form/presupuestos/admin/_datosPresupuestoItems.php | 4 +++- .../pages/presupuestoAdmin/sections/datosGenerales.js | 9 ++------- 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/ci4/app/Controllers/Presupuestos/Presupuestoadmin.php b/ci4/app/Controllers/Presupuestos/Presupuestoadmin.php index 7d6765ca..86986a9e 100644 --- a/ci4/app/Controllers/Presupuestos/Presupuestoadmin.php +++ b/ci4/app/Controllers/Presupuestos/Presupuestoadmin.php @@ -399,6 +399,8 @@ class Presupuestoadmin extends \App\Controllers\BaseResourceController $this->viewData['formAction'] = route_to('updatePresupuestoAdmin', $id); + $this->viewData['cliente_id'] = $presupuestoEntity->cliente_id; + // Si se ha llamado a esta funcion porque se ha duplicado el presupuesto // se actualiza la bbdd para que sólo ejecute algunas funciones una vez if ($presupuestoEntity->is_duplicado) { diff --git a/ci4/app/Views/themes/vuexy/form/presupuestos/admin/_datosPresupuestoItems.php b/ci4/app/Views/themes/vuexy/form/presupuestos/admin/_datosPresupuestoItems.php index 615b2da0..085fc242 100644 --- a/ci4/app/Views/themes/vuexy/form/presupuestos/admin/_datosPresupuestoItems.php +++ b/ci4/app/Views/themes/vuexy/form/presupuestos/admin/_datosPresupuestoItems.php @@ -143,7 +143,9 @@
diff --git a/httpdocs/assets/js/safekat/pages/presupuestoAdmin/sections/datosGenerales.js b/httpdocs/assets/js/safekat/pages/presupuestoAdmin/sections/datosGenerales.js index 742aac2d..7adf940f 100644 --- a/httpdocs/assets/js/safekat/pages/presupuestoAdmin/sections/datosGenerales.js +++ b/httpdocs/assets/js/safekat/pages/presupuestoAdmin/sections/datosGenerales.js @@ -16,9 +16,7 @@ class DatosGenerales{ this.numeroEdicion = this.domItem.find('#numeroEdicion'); this.isbn = this.domItem.find('#isbn'); - this.openCliente = this.domItem.find('#openCliente'); - - + this.cliente = new ClassSelect($('#clienteId'), '/clientes/cliente/getSelect2', 'Seleccione cliente'); this.pais = new ClassSelect($('#paisId'), '/paises/menuitems2', 'Seleccione País'); this.referenciaCliente = this.domItem.find('#referenciaCliente'); @@ -34,10 +32,7 @@ class DatosGenerales{ allowClear: false, }); - this.openCliente.click(()=>{ - const urlObj = new URL(window.location.href); - window.open(`${urlObj.origin}` + '/clientes/cliente/edit/' + this.cliente.getVal()); - }); + } cargarDatos(datos){