Drone management improvements
This commit is contained in:
@@ -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');
|
||||
|
||||
Reference in New Issue
Block a user