mirror of
https://git.imnavajas.es/jjimenez/erp-imprimelibros.git
synced 2026-01-24 09:40:21 +00:00
Merge branch 'fix/load_anonimos' into 'main'
solucionada carga de presupuestos anonimos See merge request jjimenez/erp-imprimelibros!14
This commit is contained in:
@ -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();
|
||||||
@ -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: {
|
||||||
|
|||||||
Reference in New Issue
Block a user