Merge branch 'fix/load_anonimos' into 'main'

solucionada carga de presupuestos anonimos

See merge request jjimenez/erp-imprimelibros!14
This commit is contained in:
2025-10-20 15:06:12 +00:00
2 changed files with 5 additions and 2 deletions

View File

@ -3,7 +3,9 @@ import PresupuestoWizard from './wizard.js';
const app = new PresupuestoWizard({ const app = new PresupuestoWizard({
mode: 'public', mode: 'public',
readonly: true, readonly: true,
presupuestoId: $('#presupuesto_id').val(),
canSave: false, canSave: false,
useSessionCache: true, useSessionCache: true,
loadData: true
}); });
app.init(); app.init();

View File

@ -12,7 +12,8 @@ export default class PresupuestoWizard {
presupuestoId: null, presupuestoId: null,
readonly: false, readonly: false,
canSave: false, canSave: false,
useSessionCache: true useSessionCache: true,
loadData: false
}, options); }, options);
this.DEBUG = true; // Activar o desactivar el modo de depuración this.DEBUG = true; // Activar o desactivar el modo de depuración
@ -210,7 +211,7 @@ export default class PresupuestoWizard {
this.#initDatosGenerales(); this.#initDatosGenerales();
if (presupuestoId && mode !== 'public') { if ((presupuestoId && mode !== 'public') || (presupuestoId && this.opts.loadData)) {
await fetch(`/presupuesto/api/get?id=${encodeURIComponent(presupuestoId)}`, { await fetch(`/presupuesto/api/get?id=${encodeURIComponent(presupuestoId)}`, {
headers: { headers: {