mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
Itegracion previa y pruebas
This commit is contained in:
4
ci4/.env
4
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
|
||||
|
||||
|
||||
@ -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',
|
||||
|
||||
|
||||
@ -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))
|
||||
|
||||
@ -25,7 +25,7 @@
|
||||
<?= lang("Presupuestos.previewMaquina") ?>
|
||||
</button>
|
||||
</li>
|
||||
<li id="tab-preview-cubierta" class="nav-item">
|
||||
<li id="tab-preview-configuracion-cubierta" class="nav-item">
|
||||
<button
|
||||
type="button"
|
||||
class="nav-link"
|
||||
@ -34,10 +34,10 @@
|
||||
data-bs-target="#preview-cubierta"
|
||||
aria-controls="preview-cubierta"
|
||||
aria-selected="false">
|
||||
<?= lang("Presupuestos.previewCubierta") ?>
|
||||
<?= lang("Presupuestos.previewConfiguracionCubierta") ?>
|
||||
</button>
|
||||
</li>
|
||||
<li id="tab-preview-portada" class="nav-item">
|
||||
<li id="tab-preview-esquema-portada" class="nav-item">
|
||||
<button
|
||||
type="button"
|
||||
class="nav-link"
|
||||
@ -46,7 +46,7 @@
|
||||
data-bs-target="#preview-portada"
|
||||
aria-controls="preview-portada"
|
||||
aria-selected="false">
|
||||
<?= lang("Presupuestos.previewPortada") ?>
|
||||
<?= lang("Presupuestos.previewEsquemaCubierta") ?>
|
||||
</button>
|
||||
</li>
|
||||
|
||||
@ -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);
|
||||
|
||||
} );
|
||||
|
||||
|
||||
@ -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 );
|
||||
|
||||
@ -156,6 +156,7 @@ $('#presupuestoForm').on( "submit", function( event ) {
|
||||
<script src="<?= site_url('themes/vuexy/vendor/libs/autosize/autosize.js') ?>"></script>
|
||||
<?php if(str_contains($formAction,'edit')): ?>
|
||||
<script src="<?= site_url('js_loader/comparadorCosidoTapaBlanda_js') ?>"></script>
|
||||
<script src="<?= site_url('js_loader/previsualizador_js') ?>"></script>
|
||||
<script src="<?= site_url('themes/vuexy/vendor/libs/two/two.js') ?>"></script>
|
||||
<?php endif; ?>
|
||||
<?=$this->endSection() ?>
|
||||
|
||||
Reference in New Issue
Block a user