Terminado previews listos para verificar por cliente

This commit is contained in:
imnavajas
2024-05-22 11:28:56 +02:00
parent 889ad57adc
commit 7ad551238d
2 changed files with 27 additions and 43 deletions

View File

@ -279,7 +279,7 @@
item.addEventListener('click', event => { item.addEventListener('click', event => {
// When click the Next button, we will validate the current step // When click the Next button, we will validate the current step
switch (validationStepper._currentIndex) { switch (validationStepper._currentIndex) {
/*case 0: case 0:
FormValidation2.validate(); FormValidation2.validate();
break; break;
@ -293,7 +293,7 @@
case 3: case 3:
FormValidation5.validate(); FormValidation5.validate();
break;*/ break;
default: default:
validationStepper.next(); validationStepper.next();

View File

@ -2,49 +2,34 @@
var pvObj; var pvObj;
$('#toReview').on("click", function () { $('#toReview').on("click", function () {
previewEsquemaCubierta(true);
portadaGrapado(true);
//previewEsquemaCubierta('ec', '','');
}); });
$(document).on('shown.bs.modal', function (e) { $(document).on('shown.bs.modal', function (e) {
previewEsquemaCubierta(false);
portadaGrapado(false);
}) })
function previewEsquemaCubierta(isThumbnail = false) {
function previewEsquemaCubierta(isThumbnail) { if ($('#cosidoDiv').hasClass('checked') || $("#fresadoDiv").hasClass('checked')) {
console.log("Cosido/Fresado");
/*let tipoImpresion; if ($("#tapaBlanda").is(":checked")) {
portadaTapaBlanda(isThumbnail);
if ($("#tipoCosido").is(":checked")) { } else if ($("#tapaDura").is(":checked")) {
tipoImpresion = parseInt() portadaTapaDura(isThumbnail);3
}
} else if ($('#espiralDiv').hasClass('checked') || $('#wireoDiv').hasClass('checked')) {
console.log("Espiral/Wireo");
if ($("#tapaBlanda").is(":checked")) {
portadaEspiral(isThumbnail, false);
} else if ($("#tapaDura").is(":checked")) {
portadaEspiral(isThumbnail, true);
}
} else if ($('#grapadoDiv').hasClass('checked')) {
portadaGrapado(isThumbnail);
} }
let tipoImpresion = parseInt($('#tipo_impresion_id').val());
// Fresado TD y Cosido TD
if (tipoImpresion === 1 || tipoImpresion === 3) {
portadaTapaDura();
}
// Fresado TB y Cosido TB
else if (tipoImpresion === 2 || tipoImpresion === 4) {
portadaTapaBlanda();
}
// Espiral TD y TB, Wire-o TD y TB
else if (tipoImpresion === 5 || tipoImpresion === 6 ||
tipoImpresion === 7 || tipoImpresion === 8) {
portadaEspiral();
}
else if (tipoImpresion === 21) {
portadaGrapado();
}
else {
// ?
}*/
} }
@ -205,7 +190,6 @@ function portadaTapaBlanda(isThumbnail = false) {
getObjetoToPreview(); getObjetoToPreview();
// Definicion de los parametros del Esquema de Cubierta (EC) // Definicion de los parametros del Esquema de Cubierta (EC)
if (pvObj.anchoSolapa == 0) { if (pvObj.anchoSolapa == 0) {
if (isThumbnail) { if (isThumbnail) {
@ -789,11 +773,11 @@ function portadaGrapado(isThumbnail = false) {
function getObjetoToPreview() { function getObjetoToPreview() {
pvObj = { pvObj = {
lomoLibro: 30,//parseFloat($('#lomo_cubierta').val()), lomoLibro: $('#lomo_cubierta').val() === '' ? parseFloat('0.0') : parseFloat($('#lomo_cubierta').val()),
anchoSolapa: 0, //$('#solapasCubierta').is(':checked') ? parseFloat($('#anchoSolapasCubierta').val()) : parseFloat(0), anchoSolapa: $('#solapasCubierta').is(':checked') ? parseFloat($('#anchoSolapasCubierta').val()) : parseFloat(0),
altoLibro: 148, //getDimensionLibro().alto, altoLibro: getDimensionLibro().alto,
anchoLibro: 190, //getDimensionLibro().ancho anchoLibro: getDimensionLibro().ancho
}; };
//console.log(pvObj); console.log(pvObj);
} }