bmc_hub/app/services/m365_calendar.py
Christian ceb560e2f2 feat: Add bottom bar functionality with real-time updates and manual endpoint tests
- Implemented a new bottom bar feature in `bottom-bar.js` that fetches and displays various notifications and statuses in real-time.
- Added functions for handling visibility, state updates, and user interactions within the bottom bar.
- Introduced WebSocket connection for real-time updates and fallback polling mechanism.
- Created a manual testing script `test_manual.py` to validate API endpoints for the manual module.
- Included tests for various paths to ensure expected responses from the server.
2026-04-12 02:27:01 +02:00

24 lines
743 B
Python

import logging
from typing import List, Dict, Any
logger = logging.getLogger(__name__)
class M365CalendarService:
"""
Håndterer opslag mod brugernes M365 kalendere for at se om de er:
- Optaget i møde
- Ledige de næste X minutter til at tage en opgave
Dette bruges af TaskRouter til workload-balancing (Phase 4).
"""
def __init__(self):
self.is_connected = False
async def get_user_free_time(self, current_time: str, hours_ahead: int = 2) -> int:
"""
Returnerer antallet af minutter brugeren formodes ledig i den givne periode.
(Mock MVP implementering)
"""
logger.info("Slår opledig tid op i M365 (mock)")
return 90 # Mock: 1.5 timers ledig tid