- 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.
34 lines
1.1 KiB
Python
34 lines
1.1 KiB
Python
import logging
|
|
from typing import Dict, Any, Optional
|
|
|
|
logger = logging.getLogger(__name__)
|
|
|
|
class TaskRouter:
|
|
"""
|
|
Kernekomponentet for "Giv mig næste opgave"-knappen (Phase 3).
|
|
Udregner den optimale næste opgave ud fra:
|
|
1. Hastesager (SLA warnings etc.) i sags-køen
|
|
2. Medarbejderens ledige tid i kalenderen (skal integreres mod M365)
|
|
3. Kompetenceniveau (tags på sager vs bruger)
|
|
"""
|
|
|
|
def __init__(self):
|
|
pass
|
|
|
|
async def get_next_best_task(self, user_id: int) -> Optional[Dict[str, Any]]:
|
|
"""
|
|
Beregner den næste bedste opgave.
|
|
(Dummy-implementering til MVP Bottom Bar)
|
|
"""
|
|
logger.info(f"Omsætter opgaveruter for bruger {user_id}")
|
|
|
|
# P.t. er dette blot en mock respons til at matche bottom barens forventning
|
|
# TODO: Implementér ægte opslag mod databasens sag_queue
|
|
return {
|
|
"case_id": 8192,
|
|
"title": "Netværksudfald i afd. B",
|
|
"priority": "high",
|
|
"estimated_minutes": 30,
|
|
"assigned_reason": "SLA udløber om 40 minutter"
|
|
}
|