Revert "Add clear GPS endpoint + frontend button"

This reverts commit ca77a29d7d.
This commit is contained in:
2026-05-22 23:32:51 -04:00
parent ca77a29d7d
commit a0e6f627f4
3 changed files with 0 additions and 70 deletions
-27
View File
@@ -1249,7 +1249,6 @@
</div>
<div style="display:flex;gap:8px;margin-bottom:10px;">
<button class="btn btn-outline btn-sm" onclick="editAsset()" style="flex:1;">✏️ Edit</button>
<button class="btn btn-outline btn-sm" id="detailClearGpsBtn" onclick="clearAssetGps()" style="flex:1;display:none;">📍 Clear GPS</button>
<button class="btn btn-danger btn-sm" onclick="deleteAsset()" style="flex:1;">🗑️ Delete</button>
</div>
</div>
@@ -3606,14 +3605,6 @@
navBtn.style.display = 'none';
}
// Clear GPS button — show when asset has GPS
const clearGpsBtn = document.getElementById('detailClearGpsBtn');
if (a.latitude != null && a.longitude != null) {
clearGpsBtn.style.display = '';
} else {
clearGpsBtn.style.display = 'none';
}
// Keys + Badges
const keys = a.keys || [];
const badges = a.badges || (Array.isArray(a.badge_names) ? a.badge_names : []);
@@ -4005,24 +3996,6 @@
}
}
// ── Clear GPS ──────────────────────────────────────────────────────────
async function clearAssetGps() {
if (!AppState.currentAssetId) return;
const confirmed = await showModal(
'Clear GPS Data',
'Remove GPS coordinates from this asset?',
'Clear GPS'
);
if (!confirmed) return;
try {
await api('/api/assets/' + AppState.currentAssetId + '/gps', { method: 'DELETE' });
showToast('GPS data cleared');
viewAsset(AppState.currentAssetId);
} catch (e) {
showToast(e.message, true);
}
}
// ── Delete ────────────────────────────────────────────────────────────
async function deleteAsset() {
if (!AppState.currentAssetId) return;