mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
a punto de guardar
This commit is contained in:
@ -386,6 +386,7 @@ class DisenioCubierta {
|
||||
sobrecubierta.gramaje = papel.split(' ')[2];
|
||||
sobrecubierta.solapas = this.domItem.find("#solapasSobrecubierta").val();
|
||||
sobrecubierta.plastificado = 'Plastificado ' + this.domItem.find("#plastificadoSobrecubierta").children("option:selected").text();
|
||||
return sobrecubierta;
|
||||
}
|
||||
else {
|
||||
let sobrecubierta = {};
|
||||
|
||||
@ -47,8 +47,6 @@ class PresupuestoCliente {
|
||||
|
||||
init() {
|
||||
|
||||
this.RELLENAR_PRESUPUESTO(false);
|
||||
|
||||
// Fuerza el foco en el campo de búsqueda de select2
|
||||
$(document).on('select2:open', () => {
|
||||
document.querySelector('.select2-search__field').focus();
|
||||
@ -66,8 +64,6 @@ class PresupuestoCliente {
|
||||
this.btnPrev.on('click', this.#prevtStep.bind(this));
|
||||
this.btnSave.on('click', this.#savePresupuesto.bind(this));
|
||||
|
||||
//this.RELLENAR_PRESUPUESTO(true);
|
||||
|
||||
if (window.location.href.includes("edit")) {
|
||||
$(".calcular-presupuesto").on('change', ()=>{});
|
||||
this.#cargarPresupuesto();
|
||||
@ -113,8 +109,9 @@ class PresupuestoCliente {
|
||||
|
||||
if (Object.values(datos_to_check).every(this.#isValidDataForm)) {
|
||||
try {
|
||||
$('#loader').modal('show');
|
||||
$('#loader').modal('show');
|
||||
setTimeout(function() {
|
||||
$('#loader').modal('show');
|
||||
}, 0);
|
||||
|
||||
// Si se está ejecutando la petición, abortar la petición anterior
|
||||
this.ajax_calcular.abort();
|
||||
@ -132,7 +129,7 @@ class PresupuestoCliente {
|
||||
}
|
||||
|
||||
|
||||
RELLENAR_PRESUPUESTO(finalizar) {
|
||||
/*RELLENAR_PRESUPUESTO(finalizar) {
|
||||
|
||||
if (finalizar) {
|
||||
|
||||
@ -185,7 +182,7 @@ class PresupuestoCliente {
|
||||
else {
|
||||
$("#titulo").trigger('change');
|
||||
}
|
||||
}
|
||||
}*/
|
||||
|
||||
|
||||
stepperHandler() {
|
||||
@ -243,8 +240,13 @@ class PresupuestoCliente {
|
||||
$('#loader').modal('hide');
|
||||
console.log(response);
|
||||
if (this.datos["confirmar"] || window.location.href.includes("add")) {
|
||||
sessionStorage.setItem('message', response.message);
|
||||
window.location.href = response.url + '/' + response.status;
|
||||
if(response.status){
|
||||
sessionStorage.setItem('message', response.message);
|
||||
window.location.href = response.url + '/' + response.status;
|
||||
}
|
||||
else{
|
||||
popErrorAlert("No se ha podido guardar el presupuesto. Por favor, póngase en contacto con el departamento comercial.");
|
||||
}
|
||||
}
|
||||
else {
|
||||
popSuccessAlert(response.message);
|
||||
|
||||
@ -57,7 +57,12 @@ class Resumen {
|
||||
|
||||
this.titulo.text(this.datosGenerales.titulo.val());
|
||||
this.tipoLibro.text(this.#capitalizeFirstLetter(this.datosGenerales.tiposLibro.filter('.selected').attr('id')));
|
||||
this.formato.text(this.datosGenerales.papelFormatoId.find('option:selected').text());
|
||||
|
||||
if (this.datosGenerales.checkFormatoPersonalizado.is(':checked'))
|
||||
this.formato.text(this.datosGenerales.anchoPersonalizado.val() + ' x ' + this.datosGenerales.altoPersonalizado.val());
|
||||
else
|
||||
this.formato.text(this.datosGenerales.papelFormatoId.find('option:selected').text());
|
||||
|
||||
this.paginas.text(this.datosGenerales.paginas.val());
|
||||
this.paginasColor.text(this.datosGenerales.paginasColor.val());
|
||||
this.paginasNegro.text(this.datosGenerales.paginasNegro.val());
|
||||
@ -93,7 +98,7 @@ class Resumen {
|
||||
this.itemsCubiertaTapaBlanda.removeClass('d-none');
|
||||
this.itemsCubiertaTapaDura.addClass('d-none');
|
||||
const solapasCubierta = this.disenioCubierta.getSolapasCubierta();
|
||||
this.solapasCubierta.text( solapasCubierta == false ? 'No' : solapasCubierta);
|
||||
this.solapasCubierta.text(solapasCubierta == false ? 'No' : solapasCubierta);
|
||||
}
|
||||
else {
|
||||
this.itemsCubiertaTapaDura.removeClass('d-none');
|
||||
|
||||
Reference in New Issue
Block a user