Merge branch 'main' into 'feat/soporte'

Main

See merge request jjimenez/safekat!548
This commit is contained in:
2025-02-18 11:13:37 +00:00
9 changed files with 96 additions and 30 deletions

View File

@ -26,6 +26,19 @@ export const initAutonumeric = () => {
});
}
})
$("span.autonumeric-decimal").each(function () {
let autoNumericInstance = AutoNumeric.getAutoNumericElement(this)
if (!autoNumericInstance) {
new AutoNumeric(this, {
digitGroupSeparator: ".",
decimalCharacter: ",",
allowDecimalPadding : 'floats',
decimalPlaces: $(this).data('decimal-places'),
unformatOnSubmit: true,
});
}
})
// $(':input[type="number"]').each(function(){
// $(this).attr('type','text')
// let autoNumericInstance = AutoNumeric.getAutoNumericElement(this)

View File

@ -12,20 +12,31 @@ class previewFormas {
this.lomo = datos.lomo;
this.lomoSobrecubierta = datos.lomoSobrecubierta;
if (datos.solapas == undefined || datos.solapas == null || datos.solapas == false) {
let solapaTemp = null;
let solapaSobrecubiertaTemp = null;
if(typeof this.lomo === 'function') {
solapaTemp = datos.solapas();
solapaSobrecubiertaTemp = datos.solapas_sobrecubierta();
}
else {
solapaTemp = datos.solapas;
solapaSobrecubiertaTemp = datos.solapas_sobrecubierta;
}
if (solapaTemp == undefined || solapaTemp == null || solapaTemp == false) {
this.solapa = 0;
this.offsetSolapa = 0.0;
}
else {
this.solapa = datos.solapas;
this.solapa = solapaTemp;
this.offsetSolapa = 3.0;
}
if (datos.solapas_sobrecubierta == undefined || datos.solapas_sobrecubierta == null || datos.solapas_sobrecubierta == false) {
if (solapaSobrecubiertaTemp == undefined || solapaSobrecubiertaTemp == null || solapaSobrecubiertaTemp == false) {
this.solapas_sobrecubierta = 0;
this.offsetSolapa_sobrecubierta = 0.0;
}
else {
this.solapa_sobrecubierta = datos.solapas_sobrecubierta;
this.solapa_sobrecubierta = solapaSobrecubiertaTemp;
this.offsetSolapa_sobrecubierta = 3.0;
}
this.lomoRedondo = datos.lomoRedondo;
@ -45,14 +56,33 @@ class previewFormas {
this.lomo = datos.lomo;
this.lomoSobrecubierta = datos.lomoSobrecubierta;
if (datos.solapas == undefined || datos.solapas == null || datos.solapas == false) {
let solapaTemp = null;
let solapaSobrecubiertaTemp = null;
if(typeof this.lomo === 'function') {
solapaTemp = datos.solapas();
solapaSobrecubiertaTemp = datos.solapas_sobrecubierta();
}
else {
solapaTemp = datos.solapas;
solapaSobrecubiertaTemp = datos.solapas_sobrecubierta;
}
if (solapaTemp == undefined || solapaTemp == null || solapaTemp == false) {
this.solapa = 0;
this.offsetSolapa = 0.0;
}
else {
this.solapa = datos.solapas;
this.solapa = solapaTemp;
this.offsetSolapa = 3.0;
}
if (solapaSobrecubiertaTemp == undefined || solapaSobrecubiertaTemp == null || solapaSobrecubiertaTemp == false) {
this.solapas_sobrecubierta = 0;
this.offsetSolapa_sobrecubierta = 0.0;
}
else {
this.solapa_sobrecubierta = solapaSobrecubiertaTemp;
this.offsetSolapa_sobrecubierta = 3.0;
}
this.lomoRedondo = datos.lomoRedondo;
}
@ -486,7 +516,6 @@ class previewFormas {
this.ancho = this.ancho();
this.alto = this.alto();
this.lomoRedondo = this.lomoRedondo();
this.solapa = this.solapa();
}
let styleCotas = { size: 12, family: 'Public Sans' };