From ffe9090668df93466bce7fab4fa2064e5215676d Mon Sep 17 00:00:00 2001 From: Shawn Date: Wed, 20 May 2026 18:35:23 -0400 Subject: [PATCH] Fix: move GPS geocode block outside payload object literal The F2 auto-populate address block was accidentally inserted inside the payload={} object literal, causing a JS syntax error that broke the entire script and prevented the login screen from showing. --- static/index.html | 12 ++++++------ tests/test_map_api.db-shm | Bin 0 -> 32768 bytes tests/test_map_api.db-wal | 0 3 files changed, 6 insertions(+), 6 deletions(-) create mode 100644 tests/test_map_api.db-shm create mode 100644 tests/test_map_api.db-wal diff --git a/static/index.html b/static/index.html index 9d5fb18..fc4cbe3 100644 --- a/static/index.html +++ b/static/index.html @@ -3079,12 +3079,6 @@ const makeName = makeId ? (settingsCache.makes.find(m => m.id == makeId) || {}).name || '' : ''; const modelName = modelId ? (settingsCache.models.find(m => m.id == modelId) || {}).name || '' : ''; - const payload = { - machine_id: machineId, - name: name, - serial_number: document.getElementById('manSerialNumber').value.trim(), - description: document.getElementById('manDescription').value.trim(), - // F2: Auto-populate address from GPS (only if address field is empty) if (AppState.gpsLat && !document.getElementById('manAddress').value.trim()) { const geo = await reverseGeocode(AppState.gpsLat, AppState.gpsLng); @@ -3096,6 +3090,12 @@ } } } + + const payload = { + machine_id: machineId, + name: name, + serial_number: document.getElementById('manSerialNumber').value.trim(), + description: document.getElementById('manDescription').value.trim(), category: document.getElementById('manCatSelect').value || 'Other', make: makeName, model: modelName, diff --git a/tests/test_map_api.db-shm b/tests/test_map_api.db-shm new file mode 100644 index 0000000000000000000000000000000000000000..fe9ac2845eca6fe6da8a63cd096d9cf9e24ece10 GIT binary patch literal 32768 zcmeIuAr62r3