mirror of
https://git.imnavajas.es/jjimenez/erp-imprimelibros.git
synced 2026-01-18 23:00:21 +00:00
falta ordenar por paginas y revisar la busqueda de los selects
This commit is contained in:
@ -0,0 +1,9 @@
|
||||
import PresupuestoWizard from './wizard.js';
|
||||
|
||||
const app = new PresupuestoWizard({
|
||||
mode: 'private',
|
||||
readonly: false,
|
||||
canSave: true,
|
||||
useSessionCache: false,
|
||||
});
|
||||
app.init();
|
||||
@ -29,8 +29,8 @@ export default class PresupuestoWizard {
|
||||
ancho: 148,
|
||||
alto: 218,
|
||||
formatoPersonalizado: false,
|
||||
paginasNegro: 0,
|
||||
paginasColor: 32,
|
||||
paginasNegro: 32,
|
||||
paginasColor: 0,
|
||||
posicionPaginasColor: '',
|
||||
tipoEncuadernacion: 'fresado',
|
||||
},
|
||||
@ -245,7 +245,7 @@ export default class PresupuestoWizard {
|
||||
});
|
||||
|
||||
if (this.opts.canSave) {
|
||||
$('#btn-guardar').on('click', async () => {
|
||||
$('.guardar-presupuesto').on('click', async () => {
|
||||
|
||||
const alert = $('#form-errors');
|
||||
const servicios = [];
|
||||
@ -263,6 +263,7 @@ export default class PresupuestoWizard {
|
||||
mode: this.opts.mode,
|
||||
presupuesto: this.#getPresupuestoData(),
|
||||
servicios: servicios,
|
||||
cliente_id: $('#cliente_id').val() || null,
|
||||
};
|
||||
try {
|
||||
alert.addClass('d-none').find('ul').empty();
|
||||
@ -274,7 +275,7 @@ export default class PresupuestoWizard {
|
||||
}).then((data) => {
|
||||
Swal.fire({
|
||||
icon: 'success',
|
||||
title: window.languageBundle?.get('common.guardado') || 'Guardado',
|
||||
title: window.languageBundle?.get('presupuesto.exito.guardado') || 'Guardado',
|
||||
timer: 1800,
|
||||
buttonsStyling: false,
|
||||
customClass: {
|
||||
@ -307,7 +308,7 @@ export default class PresupuestoWizard {
|
||||
} catch (e) {
|
||||
Swal.fire({
|
||||
icon: 'error',
|
||||
title: 'Error al guardar',
|
||||
title: window.languageBundle?.get('presupuesto.add.error.save.title') || 'Error',
|
||||
text: e?.message || '',
|
||||
buttonsStyling: false,
|
||||
customClass: {
|
||||
|
||||
@ -138,9 +138,9 @@ import { preguntarTipoPresupuesto } from './presupuesto-utils.js';
|
||||
if (!res) return;
|
||||
|
||||
if (res.tipo === 'anonimo') {
|
||||
console.log('Crear presupuesto ANÓNIMO');
|
||||
window.location.href = '/presupuesto/add/public';
|
||||
} else {
|
||||
console.log('Crear presupuesto de CLIENTE:', res.clienteId, res.clienteText);
|
||||
window.location.href = '/presupuesto/add/private/' + res.clienteId;
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user