diff --git a/ci4/.env b/ci4/.env
index 7271640d..40f48c5f 100644
--- a/ci4/.env
+++ b/ci4/.env
@@ -22,8 +22,8 @@ CI_ENVIRONMENT = development
# APP
#--------------------------------------------------------------------
-app.baseURL = 'https://sk-jjo.imnavajas.es'
-# app.baseURL = 'https://sk-imn.imnavajas.es'
+#app.baseURL = 'https://sk-jjo.imnavajas.es'
+app.baseURL = 'https://sk-imn.imnavajas.es'
# app.baseURL = "http://safekat.test/"
# app.forceGlobalSecureRequests = false
diff --git a/ci4/app/Language/es/Presupuestos.php b/ci4/app/Language/es/Presupuestos.php
index f233802d..7d2550ef 100644
--- a/ci4/app/Language/es/Presupuestos.php
+++ b/ci4/app/Language/es/Presupuestos.php
@@ -159,8 +159,8 @@ return [
'comentariosProduccion' => 'Comentarios Produccion',
'preview' => 'Previsualización de configuraciones',
'previewMaquina' => 'Configuración de máquina',
- 'previewCubierta' => 'Configuración de cubierta',
- 'previewPortada' => 'Configuración de portada',
+ 'previewConfiguracionCubierta' => 'Configuración de cubierta',
+ 'previewEsquemaCubierta' => 'Configuración de portada',
'resumen' => 'Resumen del presupuesto',
'confirmar' => 'Confirmar presupuesto',
diff --git a/ci4/app/Views/themes/backend/vuexy/form/presupuestos/cosidotapablanda/_lineasPresupuestoItems.php b/ci4/app/Views/themes/backend/vuexy/form/presupuestos/cosidotapablanda/_lineasPresupuestoItems.php
index 7c2ff9a4..821089e1 100644
--- a/ci4/app/Views/themes/backend/vuexy/form/presupuestos/cosidotapablanda/_lineasPresupuestoItems.php
+++ b/ci4/app/Views/themes/backend/vuexy/form/presupuestos/cosidotapablanda/_lineasPresupuestoItems.php
@@ -1288,6 +1288,7 @@ function fill_lp_bn(row, fromComparator=false){
calcularPresupuesto_bn(false)
}
else{
+ //console.log(row);
// Si viene de hacerlo a mano...
$('#lp_bn_tiempo').val(row.tiempo_maquina)
$('#lp_bn_numeroPliegos').val(isNaN(parseFloat(row.pliegos_libro)) ? "" : parseFloat(row.pliegos_libro).toFixed(2))
@@ -1301,6 +1302,7 @@ function fill_lp_bn(row, fromComparator=false){
$('#lp_bn_totalClicks').val(isNaN(parseFloat(row.precio_click_pedido)) ? "" : parseFloat(row.precio_click_pedido).toFixed(2))
$('#lp_bn_tarifa_impresion_id').val(isNaN(parseInt(row.tarifa_impresion_id)) ? "" : parseInt(row.tarifa_impresion_id))
+
}
@@ -2899,6 +2901,18 @@ function fill_lp_cubierta(row, fromComparador=false){
}
else{
+ console.log(row);
+
+ var portadaObjeto = {
+ anchoLibro:row.dimensiones_libro[0],
+ altoLibro:row.dimensiones_libro[1],
+ solapas:$('#solapas_ancho').val(),
+ lomo:row.mano};
+
+ //previewEsquemaCubierta(portadaObjeto);
+
+
+
// Si viene de hacerlo a mano...
$('#lp_cubierta_tiempo').val(row.tiempo_maquina)
$('#lp_cubierta_numeroPliegos').val(isNaN(parseFloat(row.pliegos_libro)) ? "" : parseFloat(row.pliegos_libro).toFixed(2))
diff --git a/ci4/app/Views/themes/backend/vuexy/form/presupuestos/cosidotapablanda/_previewItems.php b/ci4/app/Views/themes/backend/vuexy/form/presupuestos/cosidotapablanda/_previewItems.php
index 10ab1d66..e1224796 100644
--- a/ci4/app/Views/themes/backend/vuexy/form/presupuestos/cosidotapablanda/_previewItems.php
+++ b/ci4/app/Views/themes/backend/vuexy/form/presupuestos/cosidotapablanda/_previewItems.php
@@ -25,7 +25,7 @@
= lang("Presupuestos.previewMaquina") ?>
-
+
-
+
@@ -282,7 +282,7 @@
= $this->section("additionalInlineJs") ?>
- $('#tab-preview-cubierta').on( "click", function() {
+ $('#tab-preview-configuracion-cubierta').on( "click", function() {
var cubiertaObjeto = {
anchoMaquina: 487,
@@ -294,19 +294,21 @@
solapas:45,
lomo:25};
- previewCubierta(cubiertaObjeto);
+ previewConfiguracionCubierta(cubiertaObjeto);
} );
- $('#tab-preview-portada').on( "click", function() {
+ $('#tab-preview-esquema-portada').on( "click", function() {
+
+ var altoLib = 400;
var portadaObjeto = {
- anchoLibro:170,
- altoLibro:240,
- solapas:45,
- lomo:25};
+ altoLibro:altoLib,
+ anchoLibro:altoLib * 0.67,
+ solapas:0,
+ lomo:altoLib * 0.21};
- previewPortada(portadaObjeto);
+ previewEsquemaCubierta(portadaObjeto);
} );
diff --git a/ci4/app/Views/themes/backend/vuexy/form/presupuestos/cosidotapablanda/previews.js b/ci4/app/Views/themes/backend/vuexy/form/presupuestos/cosidotapablanda/previews.js
index 2314e9f3..fb0e2681 100644
--- a/ci4/app/Views/themes/backend/vuexy/form/presupuestos/cosidotapablanda/previews.js
+++ b/ci4/app/Views/themes/backend/vuexy/form/presupuestos/cosidotapablanda/previews.js
@@ -7,7 +7,7 @@ var styles = {
}
-function previewCubierta(cubiertaObj) {
+function previewConfiguracionCubierta(cubiertaObj) {
// Local parameters
let fullBookWith = ((2 * cubiertaObj.anchoLibro) + (2 * (cubiertaObj.solapas + _offsetSolapas)) + cubiertaObj.lomo);
@@ -16,11 +16,11 @@ function previewCubierta(cubiertaObj) {
$('#draw-cubierta').empty();
// Get the element for placing the graphical elements
var divCubierta = document.getElementById('draw-cubierta');
- var _previewCubierta = new Two({fitted: true}).appendTo(divCubierta);
+ var _previewConfiguracionCubierta = new Two({fitted: true}).appendTo(divCubierta);
// Calculate the center of the canvas element
- var origenCubierta = new Two.Vector(_previewCubierta.width / 2, _previewCubierta.height / 2);
+ var origenCubierta = new Two.Vector(_previewConfiguracionCubierta.width / 2, _previewConfiguracionCubierta.height / 2);
- var areaMaquinaCubierta = _previewCubierta.makeRectangle(
+ var areaMaquinaCubierta = _previewConfiguracionCubierta.makeRectangle(
origenCubierta.x,
origenCubierta.y,
cubiertaObj.anchoMaquina,
@@ -28,7 +28,7 @@ function previewCubierta(cubiertaObj) {
areaMaquinaCubierta.stroke = 'black';
areaMaquinaCubierta.linewidth = 1;
- var areaImpresionCubierta = _previewCubierta.makeRectangle(
+ var areaImpresionCubierta = _previewConfiguracionCubierta.makeRectangle(
origenCubierta.x,
origenCubierta.y,
cubiertaObj.anchoImpresion,
@@ -36,7 +36,7 @@ function previewCubierta(cubiertaObj) {
areaImpresionCubierta.stroke = 'red';
areaImpresionCubierta.linewidth = 1;
- var formaCubierta = _previewCubierta.makeRectangle(
+ var formaCubierta = _previewConfiguracionCubierta.makeRectangle(
origenCubierta.x,
origenCubierta.y,
fullBookWith,
@@ -46,10 +46,10 @@ function previewCubierta(cubiertaObj) {
formaCubierta.linewidth = 1;
// Texts
- _previewCubierta.makeText(cubiertaObj.altoLibro, origenCubierta.x + (fullBookWith/2 -25), origenCubierta.y, styles);
- _previewCubierta.makeText(fullBookWith, origenCubierta.x, origenCubierta.y + (cubiertaObj.altoLibro/2-15) , styles);
+ _previewConfiguracionCubierta.makeText(cubiertaObj.altoLibro, origenCubierta.x + (fullBookWith/2 -25), origenCubierta.y, styles);
+ _previewConfiguracionCubierta.makeText(fullBookWith, origenCubierta.x, origenCubierta.y + (cubiertaObj.altoLibro/2-15) , styles);
- _previewCubierta.update();
+ _previewConfiguracionCubierta.update();
// Update preview info fields
$('#prevLibro').text(cubiertaObj.anchoLibro + "X" + cubiertaObj.altoLibro );
@@ -59,17 +59,17 @@ function previewCubierta(cubiertaObj) {
}
-function previewPortada(portadaObj) {
+function previewEsquemaCubierta(portadaObj) {
// Clear the canvas element
$('#draw-portada').empty();
// Get the element for placing the graphical elements
var divPortada = document.getElementById('draw-portada');
- var _previewPortada = new Two({fitted: true}).appendTo(divPortada);
+ var _previewEsquemaCubierta = new Two({fitted: true}).appendTo(divPortada);
// Calculate the center of the canvas element
- var origenPortada = new Two.Vector(_previewPortada.width / 2, _previewPortada.height / 2);
+ var origenPortada = new Two.Vector(_previewEsquemaCubierta.width / 2, _previewEsquemaCubierta.height / 2);
- var solapas = _previewPortada.makeRectangle(
+ var solapas = _previewEsquemaCubierta.makeRectangle(
origenPortada.x,
origenPortada.y,
((2 * portadaObj.anchoLibro) + (2 * (portadaObj.solapas + _offsetSolapas)) + portadaObj.lomo),
@@ -78,7 +78,7 @@ function previewPortada(portadaObj) {
solapas.fill = '#5FD2B5';
solapas.linewidth = 1;
- var libro = _previewPortada.makeRectangle(
+ var libro = _previewEsquemaCubierta.makeRectangle(
origenPortada.x,
origenPortada.y,
((2 * portadaObj.anchoLibro) + portadaObj.lomo),
@@ -87,7 +87,7 @@ function previewPortada(portadaObj) {
libro.fill = '#6997D3';
libro.linewidth = 1;
- var lomo = _previewPortada.makeRectangle(
+ var lomo = _previewEsquemaCubierta.makeRectangle(
origenPortada.x,
origenPortada.y,
portadaObj.lomo,
@@ -96,7 +96,7 @@ function previewPortada(portadaObj) {
lomo.fill = '#8171D4';
lomo.linewidth = 1;
- _previewPortada.update();
+ _previewEsquemaCubierta.update();
// Update preview info fields
$('#prevLibro').text(portadaObj.anchoLibro + "X" + portadaObj.altoLibro );
diff --git a/ci4/app/Views/themes/backend/vuexy/form/presupuestos/cosidotapablanda/viewCosidotapablandaForm.php b/ci4/app/Views/themes/backend/vuexy/form/presupuestos/cosidotapablanda/viewCosidotapablandaForm.php
index 315d4c25..1bfa3e25 100644
--- a/ci4/app/Views/themes/backend/vuexy/form/presupuestos/cosidotapablanda/viewCosidotapablandaForm.php
+++ b/ci4/app/Views/themes/backend/vuexy/form/presupuestos/cosidotapablanda/viewCosidotapablandaForm.php
@@ -156,6 +156,7 @@ $('#presupuestoForm').on( "submit", function( event ) {
+
=$this->endSection() ?>