mirror of
https://dev.azure.com/globalhealthx/EMR/_git/helix-engage-server
synced 2026-05-18 20:08:19 +00:00
feat: real-time active call SSE — hold/unhold status for supervisor live monitor
- SupervisorService: added activeCallSubject (RxJS Subject), emits on all
activeCalls Map mutations (Answered, Calling, Disconnect, Hold, Unhold)
- SupervisorController: new @Sse('active-calls/stream') endpoint
- OzonetelAgentController: callControl HOLD/UNHOLD updates activeCalls Map
status via supervisor.updateCallStatus()
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -13,6 +13,16 @@ export class SupervisorController {
|
||||
return this.supervisor.getActiveCalls();
|
||||
}
|
||||
|
||||
@Sse('active-calls/stream')
|
||||
streamActiveCalls(): Observable<MessageEvent> {
|
||||
this.logger.log('[SSE] Active calls stream opened');
|
||||
return this.supervisor.activeCallSubject.pipe(
|
||||
map(event => ({
|
||||
data: JSON.stringify(event),
|
||||
} as MessageEvent)),
|
||||
);
|
||||
}
|
||||
|
||||
@Get('team-performance')
|
||||
async getTeamPerformance(@Query('date') date?: string) {
|
||||
const targetDate = date ?? new Date().toISOString().split('T')[0];
|
||||
|
||||
Reference in New Issue
Block a user