-
-
-
"
- alt="Cartulina estucada">
-
- Cartulina gráfica estucada a una cara
-
-
-
-
-
" alt="Estucado mate">
-
- Estucado Mate
-
-
+
+
+ Seleccione el papel especial
+
+
+
+
+
diff --git a/httpdocs/assets/js/safekat/pages/presupuestoCliente/disenioCubierta.js b/httpdocs/assets/js/safekat/pages/presupuestoCliente/disenioCubierta.js
index 84301d20..2c5ebec3 100644
--- a/httpdocs/assets/js/safekat/pages/presupuestoCliente/disenioCubierta.js
+++ b/httpdocs/assets/js/safekat/pages/presupuestoCliente/disenioCubierta.js
@@ -1,16 +1,40 @@
+import { getToken } from '../../common/common.js';
+import { capitalizeFirstLetter } from '../../common/common.js';
+
+import Ajax from '../../components/ajax.js';
+import ClassSelect from '../../components/select2.js';
+
+
class DisenioCubierta {
- constructor(domItem, wizardForm, validatorStepper) {
-
+ constructor(domItem, wizardForm, validatorStepper, presupuestoCliente) {
+
this.domItem = domItem;
this.allowNext = true;
+ this.presupuestoCliente = presupuestoCliente;
+
+ this.csrf_token = getToken();
+ this.csrf_hash = $('#mainContainer').find('input[name="' + this.csrf_token + '"]').val();
+
this.wizardStep = wizardForm.querySelector('#cubierta-libro');
this.validatorStepper = validatorStepper;
this.disenioCubierta = this.domItem.find(".tipo-cubierta");
this.solapasCubierta = this.domItem.find(".solapas-cubierta");
- this.papelCubierta = this.domItem.find(".papel-cubierta");
+ this.textoPapelCubierta = this.domItem.find("#textoPapelCubierta");
+
+ this.divPapelEspecial = this.domItem.find("#divPapelEspecialCubierta");
+ this.papelEspecial = new ClassSelect($("#papelEspecialCubiertaSel"),
+ '/papelesgenericos/selectpapelespecial',
+ window.translations["selectPapel"],
+ false,
+ {
+ [this.csrf_token]: this.csrf_hash,
+ tipo: 'colorhq',
+ cubierta: 1,
+ }
+ );
this.divSolapas = this.domItem.find("#divSolapasCubierta");
this.divCarasImpresion = this.domItem.find("#divCarasImpresion");
@@ -35,16 +59,7 @@ class DisenioCubierta {
this.estucadoMate = this.domItem.find("#estucadoMate");
this.divPapelCubierta = this.domItem.find("#divPapelCubierta");
-
this.divGramajeCubierta = this.domItem.find("#divGramajeCubierta");
- this.gramaje = this.domItem.find(".check-gramaje-cubierta");
- this.gramaje170 = $(this.domItem.find("#divGramaje170Cubierta"));
- this.gramaje250 = $(this.domItem.find("#divGramaje250Cubierta"));
- this.gramaje270 = $(this.domItem.find("#divGramaje270Cubierta"));
- this.gramaje300 = $(this.domItem.find("#divGramaje300Cubierta"));
- this.gramaje350 = $(this.domItem.find("#divGramaje350Cubierta"));
-
- this.checksGramaje = $('.check-gramaje-cubierta');
this.cubiertaPlastificado = this.domItem.find("#plastificado");
this.cubiertaBarniz = this.domItem.find("#barniz");
@@ -91,12 +106,14 @@ class DisenioCubierta {
else if (targetElement.classList.contains('solapas-cubierta')) {
this.#handleMenuSolapas();
}
- else if (targetElement.classList.contains('papel-cubierta')) {
- this.#handleMenuPapel();
- }
}
});
});
+
+ this.papelCubierta = null;
+ this.gramaje = null;
+
+ this.cargando = true;
}
@@ -104,10 +121,12 @@ class DisenioCubierta {
const self = this;
+ this.papelEspecial.init();
+ $('#papelEspecialCubiertaSel').on("change", this.#handlePapelCubiertaEspecial.bind(this));
+
// Eventos
this.disenioCubierta.on('click', this.#handleDisenioCubierta.bind(this));
this.solapasCubierta.on('click', this.#handleSolapasCubierta.bind(this));
- this.papelCubierta.on('click', this.#handlePapelCubierta.bind(this));
this.tamanioSolapasCubierta.on('change', this.#handleTamanioSolapas.bind(this));
this.altoFaja.on('blur', this.#handleInputs);
this.solapasSobrecubierta.on('blur', this.#handleInputs);
@@ -129,23 +148,16 @@ class DisenioCubierta {
this.observer.observe(this.tapaBlanda[0], { attributes: true });
this.observer.observe(this.tapaDuraLomoRecto[0], { attributes: true });
this.observer.observe(this.tapaDuraLomoRedondo[0], { attributes: true });
- this.observer.observe(this.cartulinaEstucada[0], { attributes: true });
- this.observer.observe(this.estucadoMate[0], { attributes: true });
this.observer.observe(this.conSolapas[0], { attributes: true });
this.observer.observe(this.sinSolapas[0], { attributes: true });
-
- this.checksGramaje.each(function () {
-
- const customOptionEL = $(this);
- customOptionEL.on('click', function () {
- self.#handleClickGramaje(customOptionEL);
- });
- });
}
cargarDatos(datosCubierta, datosGuardas, datosSobrecubierta) {
+ this.papelCubierta = datosCubierta.papel.id;
+ this.gramaje = datosCubierta.gramaje;
+
if (datosCubierta.lomoRedondo) {
this.tapaDuraLomoRedondo.trigger('click');
}
@@ -259,17 +271,19 @@ class DisenioCubierta {
validators: {
callback: {
callback: function (input) {
- const div = $('#divPapelCubierta');
- if (div.hasClass("d-none")) return true;
- div.find('.fv-plugins-message-container').remove();
- if ($('.papel-cubierta.selected').length > 0) {
+ $('#divPapelCubierta').find('.fv-plugins-message-container').remove();
+ $('#divPapelEspecialCubierta').find('.fv-plugins-message-container').remove();
+
+ const papelSeleccionado = $('.custom-selector-papel-cubierta input[type="radio"]:checked');
+ if (papelSeleccionado.length > 0) {
return true;
+
}
else {
- div.append(`
+ $('#divPapelCubierta').append(`
-
+
${window.translations["validation"].papel_interior}
@@ -280,20 +294,47 @@ class DisenioCubierta {
}
}
},
+ div_papel_especial_cubierta: {
+ validators: {
+ callback: {
+ callback: function (input) {
+
+ $('#divPapelEspecialCubierta').find('.fv-plugins-message-container').remove();
+ if ($('#divPapelEspecialCubierta').hasClass("d-none")) return true;
+
+ if ($('#papelEspecialCubiertaSel').select2('data').length > 0)
+ return true;
+ else {
+ $('#divPapelEspecialCubierta').append(`
+
+
+ ${window.translations["validation"].papel_interior}
+
+
+ `);
+ return false;
+ }
+
+ }
+ }
+ }
+ },
div_gramaje_cubierta: {
validators: {
callback: {
callback: function (input) {
- const div = $('#divGramajeCubierta'); // Selecciona el div
- div.find('.fv-plugins-message-container').remove();
- if ($('.check-gramaje-cubierta:checked').length > 0) {
+ const divGramajeInterior = $('#divGramajeCubierta'); // Selecciona el div
+
+ const gramajeSeleccionado = $('.custom-selector-gramaje-cubierta input[type="radio"]:checked');
+ if (gramajeSeleccionado.length > 0) {
return true;
+
}
else {
- div.append(`
+ divGramajeInterior.append(`
-
+
${window.translations["validation"].gramaje_interior}
@@ -319,6 +360,7 @@ class DisenioCubierta {
case 'div_solapas_cubierta':
case 'div_papel_cubierta':
case 'div_gramaje_cubierta':
+ case 'div_papel_especial_cubierta':
return '.col-sm-10';
default:
return '.col-sm-3';
@@ -338,45 +380,48 @@ class DisenioCubierta {
processMenuLateral() {
let menu_off = true;
-
- if($('.papel-cubierta.selected').length>0 && this.getGramaje() != null){
- this.rl_papel_cubierta.text($($('.papel-cubierta.selected').find('.form-label')).text() + " " +
- this.getGramaje() + " gr");
+
+ const papel = this.getPapel(true);
+ const gramaje = this.getGramaje();
+
+ if (papel != null && gramaje != null) {
+
+ this.rl_papel_cubierta.text(papel + " " + gramaje + " gr");
this.rl_acabado_cubierta.text(this.domItem.find("#plastificado").children("option:selected").text());
this.rl_papel_cubierta.removeClass('d-none');
this.rl_acabado_cubierta.removeClass('d-none');
- if(this.carasCubierta.find('option:selected').length>0){
+ if (this.carasCubierta.find('option:selected').length > 0) {
this.rl_caras_cubierta.text("Impresa " + this.carasCubierta.find('option:selected').text());
this.rl_caras_cubierta.removeClass('d-none');
menu_off = false;
}
- else{
+ else {
this.rl_caras_cubierta.addClass('d-none');
}
-
+
menu_off = false;
}
- else{
+ else {
this.rl_papel_cubierta.addClass('d-none');
this.rl_acabado_cubierta.addClass('d-none');
}
-
+
if (!menu_off)
this.rl_cubierta.removeClass('d-none');
else
this.rl_cubierta.addClass('d-none');
// Sobrecubierta solo se muestra si cubierta ok
- if(!this.rl_cubierta.hasClass('d-none')){
+ if (!this.rl_cubierta.hasClass('d-none')) {
this.rl_sobrecubierta.removeClass('d-none');
- if(!this.sobrecubierta.is(":checked")){
+ if (!this.sobrecubierta.is(":checked")) {
this.rl_no_sobrecubierta.removeClass('d-none');
this.rl_papel_sobrecubierta.addClass('d-none');
this.rl_tamanio_sobrecubierta.addClass('d-none');
this.rl_acabado_sobrecubierta.addClass('d-none');
}
- else{
+ else {
this.rl_no_sobrecubierta.addClass('d-none');
this.rl_papel_sobrecubierta.removeClass('d-none');
this.rl_tamanio_sobrecubierta.removeClass('d-none');
@@ -386,12 +431,12 @@ class DisenioCubierta {
this.rl_papel_sobrecubierta.text(sobrecubierta.papel + " " + sobrecubierta.gramaje + " gr")
this.rl_tamanio_sobrecubierta.text("Solapas: " + sobrecubierta.solapas + " mm")
let acabado_text = sobrecubierta.plastificado;
- if(acabado_text.includes("Sin plastificar"))
+ if (acabado_text.includes("Sin plastificar"))
acabado_text = "Sin plastificar";
this.rl_acabado_sobrecubierta.text(acabado_text);
}
}
- else{
+ else {
this.rl_sobrecubierta.addClass('d-none');
}
@@ -419,11 +464,30 @@ class DisenioCubierta {
}
- getPapel() {
+ getPapel(forResumen = false) {
try {
- if (this.papelCubierta.filter('.selected').length > 0) {
- return this.papelCubierta.filter('.selected').attr('cod');
+ let checkedPapel = $('.custom-selector-papel-cubierta input[type="radio"]:checked');
+ if (this.papelCubierta != null && checkedPapel != null && checkedPapel.length > 0) {
+ if (forResumen) {
+
+ if (checkedPapel.length == 0)
+ return null;
+ let radioButtonId = checkedPapel[0].id;
+ if (radioButtonId == 'papelEspecialCubierta')
+ return capitalizeFirstLetter(this.papelEspecial.getText());
+ else {
+ let associatedLabel = $('label[for="' + radioButtonId + '"]');
+ return capitalizeFirstLetter($(associatedLabel[0]).text().toLocaleLowerCase());
+ }
+ }
+ else {
+ if (this.divPapelEspecial.hasClass('d-none'))
+ return this.papelCubierta;
+ else {
+ return this.papelEspecial.getVal();
+ }
+ }
}
return null;
}
@@ -435,17 +499,13 @@ class DisenioCubierta {
getGramaje() {
+ let checkedGramaje = $('.custom-selector-gramaje-cubierta input[type="radio"]:checked');
+
try {
- if (this.divGramajeCubierta.hasClass("d-none"))
- return null;
-
- if (this.gramaje.filter(':checked').length > 0)
- return this.gramaje.filter(':checked').attr('data-value');
-
- else
- return null;
-
+ if (checkedGramaje.length == 0)
+ return null;
+ return checkedGramaje[0].id.split('_')[1];
} catch (e) {
return null;
}
@@ -606,8 +666,6 @@ class DisenioCubierta {
element.closest(class2Find).toggleClass('selected');
element.closest('.image-presupuesto').toggleClass('selected');
- $(".papel-cubierta").removeClass("selected");
-
if (this.tapaBlanda.hasClass("selected")) {
if (this.carasCubierta.val() == 2) {
this.cartulinaEstucada.removeClass("d-none");
@@ -651,30 +709,10 @@ class DisenioCubierta {
}
- #handlePapelCubierta(event) {
- // Accede al ID del elemento que disparó el evento
- const element = $(event.target);
-
- let class2Find = '.papel-cubierta';
-
- let containers = element.closest(class2Find).parent().find(class2Find);
- for (let container of containers) {
- if (container != element.closest(class2Find)[0]) {
- $(container).removeClass('selected');
- $(container).find('.image-presupuesto').removeClass('selected');
- }
- }
-
- element.closest(class2Find).toggleClass('selected');
- element.closest('.image-presupuesto').toggleClass('selected');
-
- element.trigger('change');
- }
-
#handleMenuTipoCubierta() {
if (this.tapaBlanda.hasClass("selected")) {
-
+
this.divSolapas.removeClass("d-none");
this.divCarasImpresion.removeClass("d-none");
this.divConfigGuardas.addClass("d-none");
@@ -684,15 +722,14 @@ class DisenioCubierta {
this.divSolapas.addClass("d-none");
this.divCarasImpresion.addClass("d-none");
this.divConfigGuardas.removeClass("d-none");
- this.#handleMenuPapel();
-
}
else {
this.divSolapas.addClass("d-none");
this.divCarasImpresion.addClass("d-none");
this.divConfigGuardas.addClass("d-none");
- this.#handleMenuPapel();
}
+
+ this.#handleMenuPapel();
}
@@ -708,42 +745,228 @@ class DisenioCubierta {
#handleMenuPapel() {
- $(".check-gramaje-cubierta").prop("checked", false);
+ this.divGramajeCubierta.empty();
+ new Ajax('/papelesgenericos/getpapelcliente',
+ {
+ [this.csrf_token]: this.csrf_hash,
+ tipo: 'colorhq',
+ cubierta: 1,
+ },
+ {},
+ (response) => { this.fillPapeles(response); },
+ (response) => { console.log(response); }
+ ).get();
+ }
- if (!this.tapaBlanda.hasClass("selected") && !this.tapaDuraLomoRecto.hasClass("selected") && !this.tapaDuraLomoRedondo.hasClass("selected")) {
- this.divGramajeCubierta.addClass("d-none");
- this.estucadoMate.removeClass("selected");
- this.cartulinaEstucada.removeClass("selected");
+
+ #handlePapelCubiertaEspecial() {
+
+ const context = this;
+
+ this.papelCubierta = this.papelEspecial.getVal();
+
+ new Ajax('/papelesgenericos/getpapelcliente',
+ {
+ [this.csrf_token]: this.csrf_hash,
+ papel: this.papelCubierta,
+ tipo: 'colorhq',
+ cubierta: 1,
+ },
+ {},
+ this.fillGramajes.bind(context),
+ (response) => { console.log(response); }
+ ).get();
+
+ }
+
+
+ fillPapeles(response) {
+
+ this.divPapelCubierta.empty();
+ this.divGramajeCubierta.empty();
+
+ if (response.papeles.length > 0) {
+ this.textoPapelCubierta.removeClass('d-none');
+ }
+ else {
+ this.textoPapelCubierta.addClass("d-none");
+ }
+
+ response.papeles.forEach(papel => {
+ var container = $('
', {
+ class: 'custom-selector custom-selector-papel-cubierta d-flex flex-column align-items-center justify-content-center'
+ });
+
+ var radioButton = $('
', {
+ type: 'radio', // Tipo de input
+ name: 'calcular-presupuesto papel-cubierta',
+ id: 'papelCubierta_' + papel.id, // ID único
+ value: 'option1' // Valor del radio button
+ });
+
+ // Crear una etiqueta para el radio button
+ var label = $('
', {
+ for: 'papelCubierta_' + papel.id,
+ text: papel.nombre
+ });
+
+ radioButton.on('click', this.#handleGramajeCubierta.bind(this));
+
+ container.append(radioButton).append(label);
+ $('#divPapelCubierta').append(container);
+
+ if (this.papelCubierta == papel.id) {
+ radioButton.prop('checked', true);
+ radioButton.trigger('click');
+ }
+ });
+
+ if (response.papeles_especiales.length > 0) {
+ this.divPapelCubierta.removeClass('d-none');
+
+ var container = $('', {
+ class: 'custom-selector custom-selector-papel-cubierta d-flex flex-column align-items-center justify-content-center'
+ });
+
+ var radioButton = $('
', {
+ type: 'radio',
+ name: 'calcular-presupuesto papel-cubierta',
+ id: 'papelEspecialCubierta',
+ value: 'option1'
+ });
+
+ // Crear una etiqueta para el radio button
+ var label = $('
', {
+ for: 'papelEspecialCubierta',
+ text: 'PAPEL ESPECIAL'
+ });
+
+ radioButton.on('click', this.#handleGramajeCubierta.bind(this));
+
+ response.papeles_especiales.forEach(papel => {
+ if (papel.id == this.papelCubierta) {
+ radioButton.prop('checked', true);
+ radioButton.trigger('click');
+
+ this.papelEspecial.setOption(papel.id, papel.nombre);
+ this.#handlePapelCubiertaEspecial();
+ }
+ });
+
+ container.append(radioButton).append(label);
+ $('#divPapelCubierta').append(container);
+ }
+ }
+
+ #handleGramajeCubierta() {
+
+ const context = this;
+
+ // Accede al ID del elemento que disparó el evento
+ const element = $(event.target);
+ const papel = element[0].id.split('_')[1];
+ this.papelCubierta = papel;
+
+ $('#' + papel).prop('checked', true);
+
+
+ if (element[0].id == 'papelEspecialCubierta') {
+
+ if(!this.cargando)
+ this.gramaje = null;
+ this.divGramajeCubierta.empty();
+ this.divPapelEspecial.removeClass("d-none");
+ $('#papelEspecialCubiertaSel').off("change");
+ this.papelEspecial.empty();
+ $('#papelEspecialCubiertaSel').on("change", this.#handlePapelCubiertaEspecial.bind(this));
+
+
+
+ }
+ else {
+
+ this.divPapelEspecial.addClass("d-none");
+ $('#papelEspecialCubiertaSel').off("change");
+ this.papelEspecial.empty();
+ $('#papelEspecialCubiertaSel').on("change", this.#handlePapelCubiertaEspecial.bind(this));
+ this.divGramajeCubierta.empty();
+ new Ajax('/papelesgenericos/getpapelcliente',
+ {
+ [this.csrf_token]: this.csrf_hash,
+ papel: papel,
+ tipo: 'colorhq',
+ cubierta: 1,
+ },
+ {},
+ this.fillGramajes.bind(context),
+ (response) => { console.log(response); }
+ ).get();
+ }
+ if (!this.cargando)
+ this.gramaje = null;
+ else {
+ this.cargando = false;
+ }
+ }
+
+
+ fillGramajes(response) {
+
+
+ this.divGramajeCubierta.empty()
+ let showGramaje = false;
+
+ if (response.papeles.length <= 0 && response.papeles_especiales.length <= 0) {
return;
}
- if (this.cartulinaEstucada.hasClass("selected")) {
- this.divGramajeCubierta.removeClass("d-none");
- this.gramaje170.addClass("d-none");
- this.gramaje250.removeClass("d-none");
- this.gramaje270.removeClass("d-none");
- this.gramaje300.removeClass("d-none");
- this.gramaje350.removeClass("d-none");
- }
- else if (this.estucadoMate.hasClass("selected")) {
- if (this.tapaBlanda.hasClass("selected")) {
- this.divGramajeCubierta.removeClass("d-none");
- this.gramaje170.addClass("d-none");
- this.gramaje250.removeClass("d-none");
- this.gramaje270.addClass("d-none");
- this.gramaje300.removeClass("d-none");
- this.gramaje350.removeClass("d-none");
- }
- else {
- this.divGramajeCubierta.removeClass("d-none");
- this.gramaje170.removeClass("d-none");
- this.gramaje250.addClass("d-none");
- this.gramaje270.addClass("d-none");
- this.gramaje300.addClass("d-none");
- this.gramaje350.addClass("d-none");
+ let papel = response.papeles.length > 0 ? response.papeles : response.papeles_especiales;
- $('#gramaje170Cubierta').trigger("click");
+ papel.forEach(valor => {
+
+ var container = $('', {
+ class: 'custom-selector custom-selector-gramaje-cubierta d-flex flex-column align-items-center justify-content-center gramaje-cubierta',
+ });
+
+ var radioButton = $('
', {
+ type: 'radio', // Tipo de input
+ name: 'calcular-presupuesto gramaje-cubierta',
+ id: 'gramajeCubierta_' + valor.gramaje, // ID único
+ value: 'option1' // Valor del radio button
+ });
+
+ // Crear una etiqueta para el radio button
+ var label = $('
', {
+ for: "gramajeCubierta_" + valor.gramaje,
+ text: valor.gramaje + " gr"
+ });
+
+ radioButton.on('click', (event) => {
+ const element = $(event.target);
+ const gramaje = element[0].id;
+
+ this.presupuestoCliente.checkForm(event);
+ });
+
+
+ container.append(radioButton).append(label);
+ $('#divGramajeCubierta').append(container);
+
+ if (this.gramaje != null) {
+ if (this.gramaje == parseInt(valor.gramaje)) {
+ radioButton.prop('checked', true);
+ radioButton.trigger('click');
+ }
}
+
+ showGramaje = true;
+ });
+
+ if ($("#divGramajeCubierta").hasClass("d-none") && showGramaje) {
+ $("#divGramajeCubierta").removeClass("d-none");
+ }
+ else if (!showGramaje) {
+ $("#divGramajeCubierta").addClass("d-none");
}
}
diff --git a/httpdocs/assets/js/safekat/pages/presupuestoCliente/disenioInterior.js b/httpdocs/assets/js/safekat/pages/presupuestoCliente/disenioInterior.js
index 368c0ef6..6337bf90 100644
--- a/httpdocs/assets/js/safekat/pages/presupuestoCliente/disenioInterior.js
+++ b/httpdocs/assets/js/safekat/pages/presupuestoCliente/disenioInterior.js
@@ -116,7 +116,7 @@ class DisenioInterior {
const context = this;
- if (papeles == 'color' || papeles == null) {
+ if (papeles == 'color') {
this.divGramajeInteriorColor.empty();
new Ajax('/papelesgenericos/getpapelcliente',
{
@@ -214,7 +214,7 @@ class DisenioInterior {
radioButton.prop('checked', true);
radioButton.trigger('click');
- this.papelEspecial.setVal(papel.id);
+ this.papelEspecial.setOption(papel.id, papel.nombre);
}
});
@@ -291,7 +291,7 @@ class DisenioInterior {
radioButton.prop('checked', true);
radioButton.trigger('click');
- this.papelEspecialColor.setVal(papel.id);
+ this.papelEspecialColor.setOption(papel.id, papel.nombre);
}
});
@@ -837,19 +837,15 @@ class DisenioInterior {
const element = $(event.target);
const papel = element[0].id.split('_')[1];
this.papelInterior = papel;
- if (!this.cargando)
- this.gramaje = null;
- else {
- this.cargando = false;
- }
-
+
$('#' + papel).prop('checked', true);
let tipo = this.getTipoImpresion();
if (element[0].id == 'papelEspecialInterior') {
- this.gramaje = null;
+ if(!this.cargando)
+ this.gramaje = null;
this.divGramajeInterior.empty();
this.divPapelEspecialInterior.removeClass("d-none");
this.papelEspecialInterior.empty();
@@ -872,6 +868,11 @@ class DisenioInterior {
(response) => { console.log(response); }
).get();
}
+ if (!this.cargando)
+ this.gramaje = null;
+ else {
+ this.cargando = false;
+ }
}
#handlePapelInteriorEspecial() {
@@ -971,11 +972,13 @@ class DisenioInterior {
this.divGramajeInterior.empty()
let showGramaje = false;
- if (response.papeles.length <= 0) {
+ if (response.papeles.length <= 0 && response.papeles_especiales.length <= 0) {
return;
}
- response.papeles.forEach(valor => {
+ let papel = response.papeles.length > 0 ? response.papeles : response.papeles_especiales;
+
+ papel.forEach(valor => {
var container = $('', {
class: 'custom-selector custom-selector-gramaje d-flex flex-column align-items-center justify-content-center gramaje-interior',
diff --git a/httpdocs/assets/js/safekat/pages/presupuestoCliente/presupuestoCliente.js b/httpdocs/assets/js/safekat/pages/presupuestoCliente/presupuestoCliente.js
index e26e6162..50d2ad45 100644
--- a/httpdocs/assets/js/safekat/pages/presupuestoCliente/presupuestoCliente.js
+++ b/httpdocs/assets/js/safekat/pages/presupuestoCliente/presupuestoCliente.js
@@ -34,7 +34,7 @@ class PresupuestoCliente {
this.datosGenerales = new DatosGenerales($("#datos-generales"), this.clientePresupuestoWizard, this.validationStepper);
this.disenioInterior = new DisenioInterior($("#interior-libro"), this.clientePresupuestoWizard, this.validationStepper, this);
- this.disenioCubierta = new DisenioCubierta($("#cubierta-libro"), this.clientePresupuestoWizard, this.validationStepper);
+ this.disenioCubierta = new DisenioCubierta($("#cubierta-libro"), this.clientePresupuestoWizard, this.validationStepper, this);
this.direcciones = new Direcciones($("#direcciones-libro"), this.clientePresupuestoWizard, this.validationStepper);
this.resumen = new Resumen($("#resumen-libro"), this.datosGenerales, this.disenioInterior, this.disenioCubierta, this.direcciones);
diff --git a/httpdocs/assets/js/safekat/pages/presupuestoCliente/resumen.js b/httpdocs/assets/js/safekat/pages/presupuestoCliente/resumen.js
index 7695586a..a808cc5f 100644
--- a/httpdocs/assets/js/safekat/pages/presupuestoCliente/resumen.js
+++ b/httpdocs/assets/js/safekat/pages/presupuestoCliente/resumen.js
@@ -280,7 +280,7 @@ class Resumen {
this.cabezada.text(this.disenioCubierta.getCabezada(true));
}
- this.papelCubierta.text($($('.papel-cubierta.selected').find('.form-label')).text())
+ this.papelCubierta.text(this.disenioCubierta.getPapel(true));
this.gramajeCubierta.text(this.disenioCubierta.getGramaje());
this.cubiertaAcabados.text(this.disenioCubierta.getAcabados(true));