From 5a6dbe5ca80170b1327cec12140fbb264b945ddf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jaime=20Jim=C3=A9nez?= Date: Wed, 13 Nov 2024 10:20:15 +0100 Subject: [PATCH] realizados cambios --- .../cliente/items/_datosGenerales.php | 16 +- .../presupuestos/cliente/items/_resumen.php | 14 +- .../cliente/viewPresupuestoList.php | 2 +- .../cliente/viewPresupuestoclienteForm.php | 5 +- .../viewTarifaEncuadernacionForm.php | 142 +++++++++++------- .../main/menus/presupuesto_cliente_menu.php | 18 +-- .../presupuestoCliente/datosGenerales.js | 11 ++ .../themes/vuexy/css/presupuestoCliente.css | 8 + 8 files changed, 138 insertions(+), 78 deletions(-) diff --git a/ci4/app/Views/themes/vuexy/form/presupuestos/cliente/items/_datosGenerales.php b/ci4/app/Views/themes/vuexy/form/presupuestos/cliente/items/_datosGenerales.php index cb08bd4c..fb566ca1 100644 --- a/ci4/app/Views/themes/vuexy/form/presupuestos/cliente/items/_datosGenerales.php +++ b/ci4/app/Views/themes/vuexy/form/presupuestos/cliente/items/_datosGenerales.php @@ -76,7 +76,7 @@
-
+
@@ -84,7 +84,7 @@ name="tirada" step="1" value="50">
-
+
@@ -92,7 +92,7 @@ name="tirada2" step="1" value="">
-
+
@@ -100,7 +100,7 @@ name="tirada3" step="1" value="">
-
+
@@ -122,16 +122,16 @@
-
+
+ class="form-control formato_libro calcular-presupuesto num-input" min="110" value="110">
-
+
+ class="form-control formato_libro calcular-presupuesto num-input" min="170" value="170">
diff --git a/ci4/app/Views/themes/vuexy/form/presupuestos/cliente/items/_resumen.php b/ci4/app/Views/themes/vuexy/form/presupuestos/cliente/items/_resumen.php index 3490ea82..5ffe581a 100644 --- a/ci4/app/Views/themes/vuexy/form/presupuestos/cliente/items/_resumen.php +++ b/ci4/app/Views/themes/vuexy/form/presupuestos/cliente/items/_resumen.php @@ -3,13 +3,6 @@

Resumen del presupuesto

-
-
Precio unidad:
-

Total base: € -

Iva (%): € -

Total: € -

-
@@ -203,4 +196,11 @@
+
+
Precio unidad:
+

Total base: € +

Iva (%): € +

Total: € +

+
\ No newline at end of file diff --git a/ci4/app/Views/themes/vuexy/form/presupuestos/cliente/viewPresupuestoList.php b/ci4/app/Views/themes/vuexy/form/presupuestos/cliente/viewPresupuestoList.php index 092af5f2..25041520 100644 --- a/ci4/app/Views/themes/vuexy/form/presupuestos/cliente/viewPresupuestoList.php +++ b/ci4/app/Views/themes/vuexy/form/presupuestos/cliente/viewPresupuestoList.php @@ -62,7 +62,7 @@ const actionBtns = function(data) { return `
- +
`; }; 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 643f214a..85d0f631 100644 --- a/ci4/app/Views/themes/vuexy/form/presupuestos/cliente/viewPresupuestoclienteForm.php +++ b/ci4/app/Views/themes/vuexy/form/presupuestos/cliente/viewPresupuestoclienteForm.php @@ -14,7 +14,10 @@
-

+ + +

+ getErrors()) ? $validation->listErrors("bootstrap_style") : "" ?> diff --git a/ci4/app/Views/themes/vuexy/form/tarifas/encuadernacion/viewTarifaEncuadernacionForm.php b/ci4/app/Views/themes/vuexy/form/tarifas/encuadernacion/viewTarifaEncuadernacionForm.php index 9ca27bdd..31a06d68 100644 --- a/ci4/app/Views/themes/vuexy/form/tarifas/encuadernacion/viewTarifaEncuadernacionForm.php +++ b/ci4/app/Views/themes/vuexy/form/tarifas/encuadernacion/viewTarifaEncuadernacionForm.php @@ -388,29 +388,42 @@ language: { url: "/themes/vuexy/vendor/libs/datatables-sk/plugins/i18n/es-ES.json" }, - buttons: [ { - className: 'btn btn-primary float-end me-sm-3 me-1', - extend: "createInline", - editor: editor3, - formOptions: { - submitTrigger: -1, - submitHtml: '' - + buttons: [ + { + extend: 'collection', + text: 'Exportar', + buttons:[ + 'copy', 'csv', 'excel', 'print', { + extend: 'pdfHtml5', + orientation: 'landscape', + pageSize: 'A4' + } + ] }, - action: function ( e, dt, node, config ) { - if(selected_tirada_id == -1){ - popErrorAlert(""); - } - else{ - formOptions= { - submitTrigger: -1, - submitHtml: '' - - }; - editor3.inlineCreate(config.position, formOptions); - } - }, - } ] + { + className: 'btn btn-primary float-end me-sm-3 me-1', + extend: "createInline", + editor: editor3, + formOptions: { + submitTrigger: -1, + submitHtml: '' + + }, + action: function ( e, dt, node, config ) { + if(selected_tirada_id == -1){ + popErrorAlert(""); + } + else{ + formOptions= { + submitTrigger: -1, + submitHtml: '' + + }; + editor3.inlineCreate(config.position, formOptions); + } + }, + } + ] } ); @@ -581,29 +594,42 @@ language: { url: "/themes/vuexy/vendor/libs/datatables-sk/plugins/i18n/es-ES.json" }, - buttons: [ { - className: 'btn btn-primary float-end me-sm-3 me-1', - extend: "createInline", - editor: editor, - formOptions: { - submitTrigger: -1, - submitHtml: '' - + buttons: [ + { + extend: 'collection', + text: 'Exportar', + buttons:[ + 'copy', 'csv', 'excel', 'print', { + extend: 'pdfHtml5', + orientation: 'landscape', + pageSize: 'A4' + } + ] }, - action: function ( e, dt, node, config ) { - if(selected_tirada_id == -1){ - popErrorAlert(""); - } - else{ - formOptions= { - submitTrigger: -1, - submitHtml: '' - - }; - editor.inlineCreate(config.position, formOptions); - } - }, - } ] + { + className: 'btn btn-primary float-end me-sm-3 me-1', + extend: "createInline", + editor: editor, + formOptions: { + submitTrigger: -1, + submitHtml: '' + + }, + action: function ( e, dt, node, config ) { + if(selected_tirada_id == -1){ + popErrorAlert(""); + } + else{ + formOptions= { + submitTrigger: -1, + submitHtml: '' + + }; + editor.inlineCreate(config.position, formOptions); + } + }, + } + ] } ); @@ -733,7 +759,7 @@ select: true, info: false, dom: '<"mt-4"><"float-end"B><"float-start"l><"mt-4 mb-3"p>', - ajax : $.fn.dataTable.pipeline( { + ajax : $.fn.dataTable.pipeline( { url: '', data: { id_tarifaencuadernacion: id, @@ -768,13 +794,25 @@ language: { url: "/themes/vuexy/vendor/libs/datatables-sk/plugins/i18n/es-ES.json" }, - buttons: [ { - className: 'btn btn-primary float-end me-sm-3 me-1', - extend: "createInline", - editor: editor2, - formOptions: { - submitTrigger: -1, - submitHtml: '' + buttons: [ + { + extend: 'collection', + text: 'Exportar', + buttons:[ + 'copy', 'csv', 'excel', 'print', { + extend: 'pdfHtml5', + orientation: 'landscape', + pageSize: 'A4' + } + ] + }, + { + className: 'btn btn-primary float-end me-sm-3 me-1', + extend: "createInline", + editor: editor2, + formOptions: { + submitTrigger: -1, + submitHtml: '' } } ] } ); diff --git a/ci4/app/Views/themes/vuexy/main/menus/presupuesto_cliente_menu.php b/ci4/app/Views/themes/vuexy/main/menus/presupuesto_cliente_menu.php index 46359e42..4b367bfc 100644 --- a/ci4/app/Views/themes/vuexy/main/menus/presupuesto_cliente_menu.php +++ b/ci4/app/Views/themes/vuexy/main/menus/presupuesto_cliente_menu.php @@ -20,6 +20,15 @@ if (auth()->user()->inGroup('cliente-admin') ); ?> + user()->can('presupuesto-cliente.create')) { ?> + + - user()->can('presupuesto-cliente.create')) { ?> - - { $(".titulo").html(this.titulo.val()); }); } @@ -602,6 +605,14 @@ class DatosGenerales { } } + #checkValue(event){ + let target = event.target; + if(target.value < target.min){ + target.value = target.min; + } + } + + #handleTipolibro(event) { // Accede al ID del elemento que disparó el evento const element = $(event.target); diff --git a/httpdocs/themes/vuexy/css/presupuestoCliente.css b/httpdocs/themes/vuexy/css/presupuestoCliente.css index a792fec8..5fc92c11 100644 --- a/httpdocs/themes/vuexy/css/presupuestoCliente.css +++ b/httpdocs/themes/vuexy/css/presupuestoCliente.css @@ -476,4 +476,12 @@ .texto-resumen-lateral{ font-size: 0.9em; +} + +.num-input{ + min-width: 100px; +} + +.div-num-input{ + min-width: 105px; } \ No newline at end of file