fix: URL persistence in export + cache-busting v4.8.0
Some checks failed
Build & Push Docker / build (push) Has been cancelled

- getDocument() now explicitly lists all block fields including url
- loadDocument() initializes url/series_id for backward compat with older JSONs
- Cache-busting query params (?v=4.8) on all static assets
- PDF generator uses block.url directly (proper model field)
- Added 7 new URL tests (model, API, PDF link annotations)
- Version bumped to 4.8.0
This commit is contained in:
Martin Sukany
2026-03-14 19:51:05 +01:00
parent 0a694ce63a
commit 04fe5590b0
7 changed files with 121 additions and 10 deletions

View File

@@ -84,7 +84,18 @@ const App = {
date: this.state.event.date_from, // backward compat
},
program_types: this.state.program_types.map(pt => ({ ...pt })),
blocks: this.state.blocks.map(b => ({ ...b }))
blocks: this.state.blocks.map(b => ({
id: b.id,
date: b.date,
start: b.start,
end: b.end,
title: b.title,
type_id: b.type_id,
responsible: b.responsible || null,
notes: b.notes || null,
url: b.url || null,
series_id: b.series_id || null,
}))
};
},
@@ -104,7 +115,9 @@ const App = {
this.state.program_types = (doc.program_types || []).map(pt => ({ ...pt }));
this.state.blocks = (doc.blocks || []).map(b => ({
...b,
id: b.id || this.uid()
id: b.id || this.uid(),
url: b.url || null, // backward compat: older JSONs lack this
series_id: b.series_id || null,
}));
this.syncEventToUI();
this.renderTypes();