Fixed loadLocationsIntoSelect not working because of model change

This commit is contained in:
2025-10-31 08:03:23 +01:00
parent 0760e944b0
commit 3633fed908

View File

@@ -124,7 +124,8 @@ document.addEventListener('DOMContentLoaded', () => {
async function loadLocationsIntoSelect(selectElement, selectedValue = null) { async function loadLocationsIntoSelect(selectElement, selectedValue = null) {
try { try {
const response = await fetch('/Locations/Index'); const response = await fetch('/Locations/Index');
const locations = await response.json(); const data = await response.json();
const locations = data.locations;
const ts = selectElement.tomselect; const ts = selectElement.tomselect;