corregido error en validador faja. tambien errores al cargar

This commit is contained in:
2025-02-05 18:14:38 +01:00
parent 186adbee00
commit b21edbe915
3 changed files with 8 additions and 6 deletions

View File

@ -286,7 +286,7 @@ class DisenioCubierta {
this.acabadoSobrecubierta.setOption(datosSobrecubierta.acabado.id, datosSobrecubierta.acabado.text);
}
if (datosFaja) {
if (Object.prototype.toString.call(datosFaja) === '[object Object]') {
this.faja.trigger('click');
this.papelFaja.setOption(datosFaja.papel.papel_id, datosFaja.papel.papel);
this.gramajeFaja.setOption(datosFaja.papel.gramaje, datosFaja.papel.gramaje);
@ -440,6 +440,8 @@ class DisenioCubierta {
const div = $('#divExtras'); // Selecciona el div
div.find('.fv-plugins-message-container').remove();
if($("#addFaja").prop("checked") == false)
return true;
const papelFaja = $('#papelFaja').select2('data').length > 0;
const gramajeFaja = $('#gramajeFaja').select2('data').length > 0;
if (papelFaja && gramajeFaja) {