From db3ada3830e661616e7c7f5ae976ce19825f1d44 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jaime=20Jim=C3=A9nez=20ORtega?= Date: Thu, 6 Jun 2024 12:00:44 +0200 Subject: [PATCH 1/2] modificando las cosas --- .../Presupuestos/Presupuestocliente.php | 1 + .../presupuestos/cliente/_resumenItems.php | 4 +- .../cliente/viewPresupuestoclienteForm.php | 337 ++++++++++-------- 3 files changed, 194 insertions(+), 148 deletions(-) diff --git a/ci4/app/Controllers/Presupuestos/Presupuestocliente.php b/ci4/app/Controllers/Presupuestos/Presupuestocliente.php index 1aaf1de3..9297a654 100755 --- a/ci4/app/Controllers/Presupuestos/Presupuestocliente.php +++ b/ci4/app/Controllers/Presupuestos/Presupuestocliente.php @@ -108,6 +108,7 @@ class Presupuestocliente extends \App\Controllers\BaseResourceController $datosPresupuesto->tapa = 'blanda'; $datosPresupuesto->clienteList = $this->getClienteListItems($presupuestoEntity->cliente_id ?? null); + $presupuestoEntity->estado = 1; $this->viewData['formAction'] = route_to('crearPresupuestoCliente'); diff --git a/ci4/app/Views/themes/vuexy/form/presupuestos/cliente/_resumenItems.php b/ci4/app/Views/themes/vuexy/form/presupuestos/cliente/_resumenItems.php index 45d3720d..073147c5 100644 --- a/ci4/app/Views/themes/vuexy/form/presupuestos/cliente/_resumenItems.php +++ b/ci4/app/Views/themes/vuexy/form/presupuestos/cliente/_resumenItems.php @@ -200,7 +200,7 @@ window.routes_resumen = { duplicarPresupuesto: "", } -if(estado_id?>==2){ +estado_id==2): ?> previewEsquemaCubierta(true); const previewTemplate = `
@@ -312,5 +312,5 @@ if(estado_id?>==2){ return false; }); -} + endSection() ?> diff --git a/ci4/app/Views/themes/vuexy/form/presupuestos/cliente/viewPresupuestoclienteForm.php b/ci4/app/Views/themes/vuexy/form/presupuestos/cliente/viewPresupuestoclienteForm.php index 6abd657c..7441d4fd 100644 --- a/ci4/app/Views/themes/vuexy/form/presupuestos/cliente/viewPresupuestoclienteForm.php +++ b/ci4/app/Views/themes/vuexy/form/presupuestos/cliente/viewPresupuestoclienteForm.php @@ -18,136 +18,178 @@
-
- - estado_id==1): ?> -
- -
-
- -
- -
-
- -
- -
-
- - -
- -
- - - -
- -
- -
- -
-
+ estado_id == 1) : ?> + +
- - estado_id==1): ?> -
+
+ +
+
-
+
+ +
+
- - -
- - -
-
+
+ +
+
+ +
+
- -
-
- - - -
- - -
-
+ - -
-
+
- +
-
- - +
+ +
+ + + + +
+ +
+ + + +
+ + +
-
- - -
-
+ +
+
- + +
+ + +
+
+ + +
+
+ + + +
+ + +
+
+
+ + +
+
+ + + +
+
+
+ estado_id == 1) : ?> + + +
+
+ estado_id == 1) : ?> + + + + + + + +
+
+
+ + +
+ + + +
+
+ + + +
estado_id == 1) : ?> @@ -178,11 +220,10 @@
-
-
-
- + + +
@@ -199,35 +240,38 @@ window.datosPresupuesto = ; window.token_ajax= {: v}; -$('#clienteId').select2({ - allowClear: false, - ajax: { - url: '', - type: 'post', - dataType: 'json', +estado_id == 1) : ?> + $('#clienteId').select2({ + allowClear: false, + ajax: { + url: '', + type: 'post', + dataType: 'json', - data: function(params) { - return { - id: 'id', - text: 'nombre', - searchTerm: params.term, - : v - }; - }, - delay: 60, - processResults: function(response) { - yeniden(response.); - return { - results: response.menu - }; - }, - cache: true -} -}); + data: function(params) { + return { + id: 'id', + text: 'nombre', + searchTerm: params.term, + : v + }; + }, + delay: 60, + processResults: function(response) { + yeniden(response.); + return { + results: response.menu + }; + }, + cache: true + } + }); -if(estado_id ?>==1){ initDisenioLibro(); -} + + + + endSection() ?> @@ -238,7 +282,6 @@ if(estado_id ?>==1){ - endSection() ?> @@ -258,7 +301,9 @@ if(estado_id ?>==1){ - + estado_id == 1) : ?> + + From d2f5b77f16a6a4b1988a9905d84994e2bd7b99ab Mon Sep 17 00:00:00 2001 From: imnavajas Date: Thu, 6 Jun 2024 12:22:32 +0200 Subject: [PATCH 2/2] Corregido bug --- .../Presupuestos/Presupuestocliente.php | 6 ++ .../cliente/viewPresupuestoclienteForm.php | 79 +++++++++++-------- 2 files changed, 50 insertions(+), 35 deletions(-) diff --git a/ci4/app/Controllers/Presupuestos/Presupuestocliente.php b/ci4/app/Controllers/Presupuestos/Presupuestocliente.php index 9297a654..6cc24b8e 100755 --- a/ci4/app/Controllers/Presupuestos/Presupuestocliente.php +++ b/ci4/app/Controllers/Presupuestos/Presupuestocliente.php @@ -50,6 +50,12 @@ class Presupuestocliente extends \App\Controllers\BaseResourceController $this->viewData = ['usingServerSideDataTable' => true]; // JJO + // Breadcrumbs + $this->viewData['breadcrumb'] = [ + ['title' => lang("App.menu_presupuestos"), 'route' => "javascript:void(0);", 'active' => false], + ['title' => "Listado", 'route' => site_url('presupuestocliente/list'), 'active' => true] + ]; + parent::initController($request, $response, $logger); $this->model = new PresupuestoModel(); } diff --git a/ci4/app/Views/themes/vuexy/form/presupuestos/cliente/viewPresupuestoclienteForm.php b/ci4/app/Views/themes/vuexy/form/presupuestos/cliente/viewPresupuestoclienteForm.php index 7441d4fd..247cd02b 100644 --- a/ci4/app/Views/themes/vuexy/form/presupuestos/cliente/viewPresupuestoclienteForm.php +++ b/ci4/app/Views/themes/vuexy/form/presupuestos/cliente/viewPresupuestoclienteForm.php @@ -178,49 +178,57 @@
-
-
-
- +
+
+
+ +
- + -
-
- estado_id == 1) : ?> - - +
+
+ estado_id == 1) : ?> + + +
+
+ estado_id == 1) : ?> + + + + + + +
+
+
-
- estado_id == 1) : ?> - - - - - - - -
-
- +
+
+ + + + + @@ -282,6 +290,7 @@ window.token_ajax= {: v}; + endSection() ?>