Merge pull request 'Auto-commit local changes before build (2026-01-03 17:50:38)' (#25) from v20260103-12-reports-columns-selector-init-fix into main

Reviewed-on: #25
This commit is contained in:
Ivo Oskamp 2026-01-06 09:28:23 +01:00
commit fcd8518598
4 changed files with 11 additions and 2 deletions

View File

@ -1 +1 @@
v20260103-11-reports-view-raw-columns-fix v20260103-12-reports-columns-selector-init-fix

View File

@ -198,6 +198,7 @@
<script> <script>
window.__reportColumnsMeta = {{ columns_meta|tojson }}; window.__reportColumnsMeta = {{ columns_meta|tojson }};
window.__initialCustomers = {{ initial_customers|tojson }};
window.addEventListener('DOMContentLoaded', function () { window.addEventListener('DOMContentLoaded', function () {
function qs(id) { return document.getElementById(id); } function qs(id) { return document.getElementById(id); }
@ -529,6 +530,7 @@
} }
function loadCustomers() { function loadCustomers() {
var initialCustomers = window.__initialCustomers || null;
if (initialCustomers && Array.isArray(initialCustomers) && initialCustomers.length) { if (initialCustomers && Array.isArray(initialCustomers) && initialCustomers.length) {
// Already rendered server-side. Keep the selects usable even if API calls fail. // Already rendered server-side. Keep the selects usable even if API calls fail.
return; return;

View File

@ -100,6 +100,13 @@
- Updated the Reports UI to use embedded column metadata as a fallback, ensuring column selection is available even when an API fetch fails. - Updated the Reports UI to use embedded column metadata as a fallback, ensuring column selection is available even when an API fetch fails.
- Improved column metadata loading logic to only fetch metadata when it is not already present in the report payload. - Improved column metadata loading logic to only fetch metadata when it is not already present in the report payload.
---
## v20260103-12-reports-columns-selector-init-fix
- Fixed /api/reports/columns to always return the column metadata payload (removed incorrect indentation that prevented a response for authorized users).
- Ensured the “New report” page always initializes the column selector by providing the initial customers payload to the frontend (prevents JS initialization issues that could stop the column lists from rendering).
================================================================================================================================================ ================================================================================================================================================