import { ActiveMeeting, RecentRoom, CommunicationStats } from './types'
import { formatDuration, formatTimeAgo, getRoomTypeBadge } from './helpers'
export function ActiveMeetingsSection({
activeMeetings,
loading,
onRefresh,
}: {
activeMeetings: ActiveMeeting[]
loading: boolean
onRefresh: () => void
}) {
return (
Aktive Meetings
{activeMeetings.length === 0 ? (
) : (
| Meeting |
Teilnehmer |
Gestartet |
Dauer |
{activeMeetings.map((meeting, idx) => (
|
{meeting.display_name}
{meeting.room_name}
|
{meeting.participants}
|
{formatTimeAgo(meeting.started_at)} |
{formatDuration(meeting.duration_minutes)} |
))}
)}
)
}
export function ChatRoomsAndUsage({
recentRooms,
stats,
}: {
recentRooms: RecentRoom[]
stats: CommunicationStats | null
}) {
return (
Aktive Chat-Räume
{recentRooms.length === 0 ? (
) : (
{recentRooms.slice(0, 5).map((room, idx) => (
{room.name}
{room.member_count} Mitglieder
{room.room_type}
{formatTimeAgo(room.last_activity)}
))}
)}
{/* Usage Statistics */}
Nutzungsstatistiken
Call-Minuten heute
{stats?.jitsi.total_minutes_today || 0} Min.
Aktive Chat-Räume
{stats?.matrix.active_rooms || 0} / {stats?.matrix.total_rooms || 0}
Aktive Nutzer
{stats?.matrix.active_users || 0} / {stats?.matrix.total_users || 0}
{/* Quick Actions */}
)
}