Drone management improvements

This commit is contained in:
2026-06-21 17:26:42 -04:00
parent 5e33c1d47b
commit a3f1a10bf5
3 changed files with 453 additions and 88 deletions
+10
View File
@@ -128,6 +128,13 @@
loadArrivals();
showNotification('Arrival updated');
}
if (data.type && data.type.startsWith('drone_request_')) {
if (typeof window.refreshDroneRequestBadge === 'function') {
window.refreshDroneRequestBadge();
}
showNotification('Drone request updated');
}
} catch (error) {
console.error('Error parsing WebSocket message:', error);
}
@@ -513,6 +520,9 @@
await updateUserRole(); // Update role-based UI
startSessionExpiryCheck(); // Start monitoring session expiry
connectWebSocket(); // Connect WebSocket for real-time updates
if (typeof window.refreshDroneRequestBadge === 'function') {
window.refreshDroneRequestBadge();
}
loadPPRs();
} else {
throw new Error(data.detail || 'Authentication failed');