/**
 * public/js/reportview-select.js
 * Ersetzt onchange="this.form.submit()" im Report-Filter (CSP-sicher)
 */
document.addEventListener('DOMContentLoaded', function () {
  ['reportYear', 'reportQuarter'].forEach(function (id) {
    const el = document.getElementById(id);
    if (el) {
      el.addEventListener('change', function () {
        const form = this.closest('form');
        if (form) form.submit();
      });
    }
  });
});
