categories now only once defined in db.php, not longer multiple hardcoded definitions

This commit is contained in:
2026-04-22 15:49:12 +02:00
parent 7e6b55abd4
commit f107d97b87

View File

@@ -327,11 +327,11 @@ if (!$municipality) {
<script src="https://cdn.jsdelivr.net/npm/sweetalert2@11.14.0/dist/sweetalert2.all.min.js"></script>
<!-- ============================================================= -->
<!-- Municipality Configuration (passed to JavaScript) -->
<!-- Municipality Configuration passed to JavaScript -->
<!-- ============================================================= -->
<script>
// Municipality Configuration from Database — used by app.js
var MUNICIPALITY = {
const MUNICIPALITY = {
id: <?= $municipality['municipality_id'] ?>,
name: "<?= htmlspecialchars($municipality['name'], ENT_QUOTES) ?>",
slug: "<?= htmlspecialchars($municipality['slug'], ENT_QUOTES) ?>",
@@ -341,7 +341,7 @@ if (!$municipality) {
};
// Category Definitions from Database
var CATEGORIES = <?= json_encode(get_categories(), JSON_UNESCAPED_UNICODE) ?>;
const CATEGORIES = <?= json_encode(get_categories(), JSON_UNESCAPED_UNICODE) ?>;
</script>
<!-- Application Logic -->