mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
generando papeles especiales
This commit is contained in:
@ -18,9 +18,13 @@ class DisenioInterior {
|
||||
this.divPapelInterior = this.domItem.find("#divPapelInterior");
|
||||
this.textoPapelInterior = this.domItem.find("#textoPapelInterior");
|
||||
this.divPapelInteriorColor = this.domItem.find("#divPapelInteriorColor");
|
||||
this.divPapelEspecialInterior = this.domItem.find("#divPapelEspecialInterior");
|
||||
this.papelEspecialInterior = this.domItem.find("#papelEspecialInterior");
|
||||
this.divGramajeInterior = this.domItem.find("#divGramajeInterior");
|
||||
this.papelInterior = this.domItem.find(".papel-interior");
|
||||
|
||||
this.papelEspecial = new ClassSelect($("#papelEspecialInterior"), '/clientes/cliente/getSelect2', window.translations["selectPapel"]);
|
||||
|
||||
this.negroEstandar = this.domItem.find("#negroEstandar");
|
||||
this.negroPremium = this.domItem.find("#negroPremium");
|
||||
this.colorEstandar = this.domItem.find("#colorEstandar");
|
||||
@ -165,6 +169,32 @@ class DisenioInterior {
|
||||
container.append(radioButton).append(label);
|
||||
$('#divPapelInterior').append(container);
|
||||
});
|
||||
|
||||
if(response.papeles_especiales.length > 0){
|
||||
this.divPapelInterior.removeClass('d-none');
|
||||
|
||||
var container = $('<div>', {
|
||||
class: 'custom-selector d-flex flex-column align-items-center justify-content-center'
|
||||
});
|
||||
|
||||
var radioButton = $('<input>', {
|
||||
type: 'radio', // Tipo de input
|
||||
name: 'calcular-presupuesto papel-interior',
|
||||
id: 'papelInteriorEspecial', // ID único
|
||||
value: 'option1' // Valor del radio button
|
||||
});
|
||||
|
||||
// Crear una etiqueta para el radio button
|
||||
var label = $('<label>', {
|
||||
for: 'papelInteriorEspecial',
|
||||
text: 'PAPEL ESPECIAL'
|
||||
});
|
||||
|
||||
radioButton.on('click', this.#handlePapelInterior.bind(this));
|
||||
|
||||
container.append(radioButton).append(label);
|
||||
$('#divPapelInterior').append(container);
|
||||
}
|
||||
}
|
||||
|
||||
cargarDatos(datos, papelInteriorDiferente) {
|
||||
@ -592,6 +622,7 @@ class DisenioInterior {
|
||||
|
||||
|
||||
#handlePapelInterior(event) {
|
||||
|
||||
const context = this;
|
||||
|
||||
// Accede al ID del elemento que disparó el evento
|
||||
@ -606,17 +637,23 @@ class DisenioInterior {
|
||||
else if (this.colorPremium.hasClass('selected'))
|
||||
tipo = 'colorhq';
|
||||
|
||||
new Ajax('/papelesgenericos/getpapelcliente',
|
||||
{
|
||||
[this.csrf_token]: this.csrf_hash,
|
||||
papel: papel,
|
||||
tipo: tipo,
|
||||
cubierta: 0,
|
||||
},
|
||||
{},
|
||||
this.fillGramajes.bind(context),
|
||||
(response) => { console.log(response); }
|
||||
).get();
|
||||
if(papel == 'papelEspecialInterior'){
|
||||
|
||||
}
|
||||
else{
|
||||
new Ajax('/papelesgenericos/getpapelcliente',
|
||||
{
|
||||
[this.csrf_token]: this.csrf_hash,
|
||||
papel: papel,
|
||||
tipo: tipo,
|
||||
cubierta: 0,
|
||||
},
|
||||
{},
|
||||
this.fillGramajes.bind(context),
|
||||
(response) => { console.log(response); }
|
||||
).get();
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user