ahs-cti 0.0.8 → 0.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/agentDetailReport-F44HMQ5O.mjs +27 -0
- package/dist/agentDetailReport-F44HMQ5O.mjs.map +1 -0
- package/dist/{agentPerformanceReport-JZK5DN5E.mjs → agentPerformanceReport-TTOMNENK.mjs} +25 -15
- package/dist/{agentPerformanceReport-JZK5DN5E.mjs.map → agentPerformanceReport-TTOMNENK.mjs.map} +1 -1
- package/dist/auditReport-QTMAKVTN.mjs +26 -0
- package/dist/auditReport-QTMAKVTN.mjs.map +1 -0
- package/dist/{callHistory-T3M76D4B.mjs → callHistory-4J4J2XHA.mjs} +20 -10
- package/dist/{callHistory-T3M76D4B.mjs.map → callHistory-4J4J2XHA.mjs.map} +1 -1
- package/dist/{campaigns-5PVHXBSD.mjs → campaigns-N3UNUGQP.mjs} +23 -13
- package/dist/{campaigns-5PVHXBSD.mjs.map → campaigns-N3UNUGQP.mjs.map} +1 -1
- package/dist/{caroQualityAuditDashboard-EUDYZ3QY.mjs → caroQualityAuditDashboard-TNS4L2NR.mjs} +12 -2
- package/dist/{caroQualityAuditDashboard-EUDYZ3QY.mjs.map → caroQualityAuditDashboard-TNS4L2NR.mjs.map} +1 -1
- package/dist/{caroVoiceAI-GGJCVUIQ.mjs → caroVoiceAI-OUTAAIFE.mjs} +12 -2
- package/dist/{caroVoiceAI-GGJCVUIQ.mjs.map → caroVoiceAI-OUTAAIFE.mjs.map} +1 -1
- package/dist/{cdrReport-ZMDHSZUW.mjs → cdrReport-Z35OLYUL.mjs} +26 -16
- package/dist/{cdrReport-ZMDHSZUW.mjs.map → cdrReport-Z35OLYUL.mjs.map} +1 -1
- package/dist/chunk-3PNP6G5P.mjs +92 -0
- package/dist/chunk-3PNP6G5P.mjs.map +1 -0
- package/dist/{chunk-DF5EFKXC.mjs → chunk-45MLTWV7.mjs} +12 -2
- package/dist/{chunk-DF5EFKXC.mjs.map → chunk-45MLTWV7.mjs.map} +1 -1
- package/dist/chunk-635IIVZE.mjs +24 -0
- package/dist/{chunk-FRKV2U3I.mjs.map → chunk-635IIVZE.mjs.map} +1 -1
- package/dist/chunk-677RFPP5.mjs +24 -0
- package/dist/{chunk-7LE2VTAI.mjs.map → chunk-677RFPP5.mjs.map} +1 -1
- package/dist/{chunk-Q6G3MPS7.mjs → chunk-ERSNXW5X.mjs} +11 -1
- package/dist/{chunk-Q6G3MPS7.mjs.map → chunk-ERSNXW5X.mjs.map} +1 -1
- package/dist/{chunk-H7GRWLYI.mjs → chunk-G6KRLGGC.mjs} +13 -3
- package/dist/{chunk-H7GRWLYI.mjs.map → chunk-G6KRLGGC.mjs.map} +1 -1
- package/dist/chunk-GFVR3HLK.mjs +24 -0
- package/dist/{chunk-6WLG2PXL.mjs.map → chunk-GFVR3HLK.mjs.map} +1 -1
- package/dist/{chunk-E6KYWWAI.mjs → chunk-GTI2ZVQX.mjs} +12 -2
- package/dist/{chunk-E6KYWWAI.mjs.map → chunk-GTI2ZVQX.mjs.map} +1 -1
- package/dist/chunk-H22TUCN3.mjs +24 -0
- package/dist/{chunk-AOJRUZTO.mjs.map → chunk-H22TUCN3.mjs.map} +1 -1
- package/dist/{chunk-YAQYTUTX.mjs → chunk-HAOFUADN.mjs} +12 -2
- package/dist/{chunk-YAQYTUTX.mjs.map → chunk-HAOFUADN.mjs.map} +1 -1
- package/dist/{chunk-33QNSXP7.mjs → chunk-JHC7OUQG.mjs} +21 -11
- package/dist/chunk-JHC7OUQG.mjs.map +1 -0
- package/dist/chunk-KSVNZKRD.mjs +10930 -0
- package/dist/chunk-KSVNZKRD.mjs.map +1 -0
- package/dist/{chunk-VVDJLUYT.mjs → chunk-M7FJYZF6.mjs} +12 -2
- package/dist/{chunk-VVDJLUYT.mjs.map → chunk-M7FJYZF6.mjs.map} +1 -1
- package/dist/{chunk-DNTGBNZD.mjs → chunk-NDZDJWXY.mjs} +13 -3
- package/dist/{chunk-DNTGBNZD.mjs.map → chunk-NDZDJWXY.mjs.map} +1 -1
- package/dist/chunk-S2SMCH2C.mjs +71 -0
- package/dist/chunk-S2SMCH2C.mjs.map +1 -0
- package/dist/{chunk-IDZWA6HG.mjs → chunk-S34CQVTF.mjs} +14 -4
- package/dist/{chunk-IDZWA6HG.mjs.map → chunk-S34CQVTF.mjs.map} +1 -1
- package/dist/{chunk-2M3YEXYA.mjs → chunk-SUS5RUCA.mjs} +17 -7
- package/dist/{chunk-2M3YEXYA.mjs.map → chunk-SUS5RUCA.mjs.map} +1 -1
- package/dist/{chunk-3J7KQNEU.mjs → chunk-TCYBXDAP.mjs} +13 -3
- package/dist/{chunk-3J7KQNEU.mjs.map → chunk-TCYBXDAP.mjs.map} +1 -1
- package/dist/chunk-VII5JNA6.mjs +24 -0
- package/dist/{chunk-WTBVFN4H.mjs.map → chunk-VII5JNA6.mjs.map} +1 -1
- package/dist/chunk-W3ECDLUB.mjs +24 -0
- package/dist/{chunk-OHJIW3I3.mjs.map → chunk-W3ECDLUB.mjs.map} +1 -1
- package/dist/{chunk-VBIDPX5Z.mjs → chunk-Y4PAUTZ4.mjs} +13 -3
- package/dist/{chunk-VBIDPX5Z.mjs.map → chunk-Y4PAUTZ4.mjs.map} +1 -1
- package/dist/{chunk-NAZO4HKB.mjs → chunk-ZSRD3ZXF.mjs} +12 -2
- package/dist/{chunk-NAZO4HKB.mjs.map → chunk-ZSRD3ZXF.mjs.map} +1 -1
- package/dist/index.mjs +33 -23
- package/dist/index.mjs.map +1 -1
- package/dist/{liveStatus-YSBYSVOO.mjs → liveStatus-PRDEL7CK.mjs} +16 -6
- package/dist/{liveStatus-YSBYSVOO.mjs.map → liveStatus-PRDEL7CK.mjs.map} +1 -1
- package/dist/{loginReport-YIVBJVJD.mjs → loginReport-47QNACQU.mjs} +22 -12
- package/dist/{loginReport-YIVBJVJD.mjs.map → loginReport-47QNACQU.mjs.map} +1 -1
- package/dist/{managementDashboard-7EMQC2UA.mjs → managementDashboard-SZFYULKA.mjs} +22 -12
- package/dist/{managementDashboard-7EMQC2UA.mjs.map → managementDashboard-SZFYULKA.mjs.map} +1 -1
- package/dist/{qualityAuditDashboard-ENGQN2WQ.mjs → qualityAuditDashboard-FHRGB77R.mjs} +12 -2
- package/dist/{qualityAuditDashboard-ENGQN2WQ.mjs.map → qualityAuditDashboard-FHRGB77R.mjs.map} +1 -1
- package/dist-react/agentDetailReport-PDKQKJNL.mjs +23 -0
- package/dist-react/agentPerformanceReport-MU2FASNN.mjs +544 -0
- package/dist-react/agentPerformanceReport-MU2FASNN.mjs.map +1 -0
- package/dist-react/auditReport-WH2KDNYT.mjs +25 -0
- package/{dist/auditReport-6ZUJ4UFO.mjs.map → dist-react/auditReport-WH2KDNYT.mjs.map} +1 -1
- package/dist-react/callHistory-HXXRYUIV.mjs +832 -0
- package/dist-react/callHistory-HXXRYUIV.mjs.map +1 -0
- package/dist-react/campaigns-J7KIAATE.mjs +3139 -0
- package/dist-react/campaigns-J7KIAATE.mjs.map +1 -0
- package/dist-react/caroQualityAuditDashboard-THYPVOCP.mjs +76 -0
- package/dist-react/caroQualityAuditDashboard-THYPVOCP.mjs.map +1 -0
- package/dist-react/caroVoiceAI-XGDUETXI.mjs +31 -0
- package/dist-react/caroVoiceAI-XGDUETXI.mjs.map +1 -0
- package/dist-react/cdrReport-SX2FZAO6.mjs +858 -0
- package/dist-react/cdrReport-SX2FZAO6.mjs.map +1 -0
- package/dist-react/chunk-4YF4IDV6.mjs +72 -0
- package/dist-react/chunk-4YF4IDV6.mjs.map +1 -0
- package/dist-react/chunk-ADM2JJCP.mjs +190 -0
- package/dist-react/chunk-ADM2JJCP.mjs.map +1 -0
- package/dist-react/chunk-EN7HM2MD.mjs +688 -0
- package/dist-react/chunk-EN7HM2MD.mjs.map +1 -0
- package/{dist/chunk-LHE4QGJJ.mjs → dist-react/chunk-F7G2XFRU.mjs} +12 -2
- package/{dist/chunk-LHE4QGJJ.mjs.map → dist-react/chunk-F7G2XFRU.mjs.map} +1 -1
- package/{dist/chunk-DJP744FF.mjs → dist-react/chunk-GUMGXVIT.mjs} +12 -2
- package/{dist/chunk-DJP744FF.mjs.map → dist-react/chunk-GUMGXVIT.mjs.map} +1 -1
- package/dist-react/chunk-KRXHK4AU.mjs +127 -0
- package/dist-react/chunk-KRXHK4AU.mjs.map +1 -0
- package/{dist/chunk-U2UDKXMB.mjs → dist-react/chunk-LWDAC6QU.mjs} +12 -2
- package/{dist/chunk-U2UDKXMB.mjs.map → dist-react/chunk-LWDAC6QU.mjs.map} +1 -1
- package/dist-react/chunk-LX6I32Y4.mjs +106 -0
- package/dist-react/chunk-LX6I32Y4.mjs.map +1 -0
- package/dist-react/chunk-MCD5FQNY.mjs +428 -0
- package/dist-react/chunk-MCD5FQNY.mjs.map +1 -0
- package/dist-react/chunk-MD472UKG.mjs +757 -0
- package/{dist/chunk-33QNSXP7.mjs.map → dist-react/chunk-MD472UKG.mjs.map} +1 -1
- package/dist-react/chunk-ORNNWQI6.mjs +67 -0
- package/dist-react/chunk-ORNNWQI6.mjs.map +1 -0
- package/dist-react/chunk-S4J35V4B.mjs +126 -0
- package/dist-react/chunk-S4J35V4B.mjs.map +1 -0
- package/dist-react/chunk-T53WMN5A.mjs +126 -0
- package/dist-react/chunk-T53WMN5A.mjs.map +1 -0
- package/dist-react/chunk-UTSRABCL.mjs +96 -0
- package/dist-react/chunk-UTSRABCL.mjs.map +1 -0
- package/dist-react/incoming-4WP3FJI4.mp3 +0 -0
- package/dist-react/incoming.mp3 +0 -0
- package/dist-react/index.d.mts +2476 -0
- package/dist-react/index.d.ts +2477 -0
- package/dist-react/index.js +26713 -0
- package/dist-react/index.js.map +1 -0
- package/dist-react/index.mjs +4675 -0
- package/dist-react/index.mjs.map +1 -0
- package/dist-react/liveStatus-IDZ7CPYK.mjs +1087 -0
- package/dist-react/liveStatus-IDZ7CPYK.mjs.map +1 -0
- package/dist-react/loginReport-F47GUU53.mjs +990 -0
- package/dist-react/loginReport-F47GUU53.mjs.map +1 -0
- package/dist-react/managementDashboard-GC5E7NEL.mjs +540 -0
- package/dist-react/managementDashboard-GC5E7NEL.mjs.map +1 -0
- package/dist-react/qualityAuditDashboard-ZAM7HRNH.mjs +76 -0
- package/dist-react/qualityAuditDashboard-ZAM7HRNH.mjs.map +1 -0
- package/package.json +17 -2
- package/dist/agentDetailReport-ZR7U2LLB.mjs +0 -17
- package/dist/auditReport-6ZUJ4UFO.mjs +0 -16
- package/dist/chunk-6WLG2PXL.mjs +0 -14
- package/dist/chunk-7LE2VTAI.mjs +0 -14
- package/dist/chunk-AOJRUZTO.mjs +0 -14
- package/dist/chunk-FRKV2U3I.mjs +0 -14
- package/dist/chunk-OHJIW3I3.mjs +0 -14
- package/dist/chunk-WTBVFN4H.mjs +0 -14
- /package/{dist/agentDetailReport-ZR7U2LLB.mjs.map → dist-react/agentDetailReport-PDKQKJNL.mjs.map} +0 -0
|
@@ -0,0 +1,1087 @@
|
|
|
1
|
+
import * as __ext_react from "react";
|
|
2
|
+
import * as __ext_react_dom from "react-dom";
|
|
3
|
+
import * as __ext_react_jsx from "react/jsx-runtime";
|
|
4
|
+
var __cjsExternals = { "react": __ext_react, "react-dom": __ext_react_dom, "react/jsx-runtime": __ext_react_jsx };
|
|
5
|
+
var require = function (id) {
|
|
6
|
+
var mod = __cjsExternals[id];
|
|
7
|
+
if (mod) return mod.default || mod;
|
|
8
|
+
throw new Error('Dynamic require of "' + id + '" is not supported');
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
import {
|
|
12
|
+
useCallMonitoring
|
|
13
|
+
} from "./chunk-LWDAC6QU.mjs";
|
|
14
|
+
import {
|
|
15
|
+
SDKPermissionGuard
|
|
16
|
+
} from "./chunk-ADM2JJCP.mjs";
|
|
17
|
+
import {
|
|
18
|
+
SDKProvider,
|
|
19
|
+
useToast
|
|
20
|
+
} from "./chunk-4YF4IDV6.mjs";
|
|
21
|
+
import {
|
|
22
|
+
END_POINT,
|
|
23
|
+
SDK_PERMISSIONS,
|
|
24
|
+
axios_default
|
|
25
|
+
} from "./chunk-F7G2XFRU.mjs";
|
|
26
|
+
import {
|
|
27
|
+
__spreadProps,
|
|
28
|
+
__spreadValues
|
|
29
|
+
} from "./chunk-S4J35V4B.mjs";
|
|
30
|
+
|
|
31
|
+
// call-control-sdk/lib/pages/liveStatus/index.tsx
|
|
32
|
+
import React, { useCallback as useCallback2, useState as useState2, useEffect as useEffect2 } from "react";
|
|
33
|
+
import { Box as Box2, CircularProgress } from "@mui/material";
|
|
34
|
+
|
|
35
|
+
// call-control-sdk/lib/pages/liveStatus/useLiveStatus.ts
|
|
36
|
+
import { useCallback, useEffect, useRef, useState } from "react";
|
|
37
|
+
var POLL_INTERVAL_MS = 5e3;
|
|
38
|
+
var LONG_CALL_SECS = 420;
|
|
39
|
+
var WAITING_THRESHOLD = 3;
|
|
40
|
+
function parseDur(dur) {
|
|
41
|
+
const p = (dur || "00:00:00").split(":").map(Number);
|
|
42
|
+
return (p[0] || 0) * 3600 + (p[1] || 0) * 60 + (p[2] || 0);
|
|
43
|
+
}
|
|
44
|
+
function fmtDur(s) {
|
|
45
|
+
const h = Math.floor(s / 3600);
|
|
46
|
+
const m = Math.floor(s % 3600 / 60);
|
|
47
|
+
const sc = s % 60;
|
|
48
|
+
return [h, m, sc].map((x) => String(x).padStart(2, "0")).join(":");
|
|
49
|
+
}
|
|
50
|
+
var STATUS_PRIORITY = {
|
|
51
|
+
"s-oncall-in": 0,
|
|
52
|
+
"s-oncall-out": 1,
|
|
53
|
+
"s-break": 2,
|
|
54
|
+
"s-wrapup": 3,
|
|
55
|
+
"s-idle": 4
|
|
56
|
+
};
|
|
57
|
+
function getAgentStatusKey(status, callDirection) {
|
|
58
|
+
const lower = (status || "").toLowerCase();
|
|
59
|
+
if (lower.includes("idle") || lower.includes("ready") || lower.includes("available")) return "s-idle";
|
|
60
|
+
if (lower.includes("break") || lower.includes("pause")) return "s-break";
|
|
61
|
+
if (lower.includes("wrap") || lower.includes("acw")) return "s-wrapup";
|
|
62
|
+
if (lower.includes("outbound") || lower.includes("outgoing") || lower.includes("dialing")) return "s-oncall-out";
|
|
63
|
+
if (lower.includes("call") || lower.includes("busy") || lower.includes("oncall") || lower.includes("on-call") || lower.includes("on_call") || lower.includes("incoming") || lower.includes("ringing") || lower.includes("connected")) {
|
|
64
|
+
return callDirection === "OUTBOUND" ? "s-oncall-out" : "s-oncall-in";
|
|
65
|
+
}
|
|
66
|
+
return "s-idle";
|
|
67
|
+
}
|
|
68
|
+
function getSortedAgents(list) {
|
|
69
|
+
return [...list].sort(
|
|
70
|
+
(a, b) => {
|
|
71
|
+
var _a, _b;
|
|
72
|
+
return ((_a = STATUS_PRIORITY[getAgentStatusKey(a.status, a.callDirection)]) != null ? _a : 9) - ((_b = STATUS_PRIORITY[getAgentStatusKey(b.status, b.callDirection)]) != null ? _b : 9);
|
|
73
|
+
}
|
|
74
|
+
);
|
|
75
|
+
}
|
|
76
|
+
async function fetchTopStats() {
|
|
77
|
+
const res = await axios_default.get(END_POINT.DASHBOARD_TOP_STATS);
|
|
78
|
+
return res.data;
|
|
79
|
+
}
|
|
80
|
+
async function fetchAgents() {
|
|
81
|
+
const res = await axios_default.get(END_POINT.DASHBOARD_AGENTS);
|
|
82
|
+
return res.data;
|
|
83
|
+
}
|
|
84
|
+
async function fetchQueues() {
|
|
85
|
+
const res = await axios_default.get(END_POINT.DASHBOARD_QUEUES);
|
|
86
|
+
return res.data;
|
|
87
|
+
}
|
|
88
|
+
async function fetchAlerts() {
|
|
89
|
+
const res = await axios_default.get(END_POINT.DASHBOARD_ALERTS);
|
|
90
|
+
return res.data;
|
|
91
|
+
}
|
|
92
|
+
async function fetchQueuePulse() {
|
|
93
|
+
const res = await axios_default.get(END_POINT.DASHBOARD_QUEUE_PULSE);
|
|
94
|
+
return res.data;
|
|
95
|
+
}
|
|
96
|
+
function useLiveStatus() {
|
|
97
|
+
const [isLoading, setIsLoading] = useState(true);
|
|
98
|
+
const [topStats, setTopStats] = useState(null);
|
|
99
|
+
const [agents, setAgents] = useState([]);
|
|
100
|
+
const [queues, setQueues] = useState([]);
|
|
101
|
+
const [alerts, setAlerts] = useState([]);
|
|
102
|
+
const [queuePulse, setQueuePulse] = useState(null);
|
|
103
|
+
const [durations, setDurations] = useState({});
|
|
104
|
+
const [clockStr, setClockStr] = useState("--:--:--");
|
|
105
|
+
const [dateStr, setDateStr] = useState("");
|
|
106
|
+
const agentsRef = useRef(agents);
|
|
107
|
+
agentsRef.current = agents;
|
|
108
|
+
const fetchDashboard = useCallback(async () => {
|
|
109
|
+
var _a;
|
|
110
|
+
try {
|
|
111
|
+
const [topStatsRes, agentsRes, queuesRes, alertsRes, pulseRes] = await Promise.allSettled([
|
|
112
|
+
fetchTopStats(),
|
|
113
|
+
fetchAgents(),
|
|
114
|
+
fetchQueues(),
|
|
115
|
+
fetchAlerts(),
|
|
116
|
+
fetchQueuePulse()
|
|
117
|
+
]);
|
|
118
|
+
if (topStatsRes.status === "fulfilled" && topStatsRes.value) setTopStats(topStatsRes.value);
|
|
119
|
+
if (agentsRes.status === "fulfilled" && ((_a = agentsRes.value) == null ? void 0 : _a.length)) {
|
|
120
|
+
setAgents(agentsRes.value);
|
|
121
|
+
const m = {};
|
|
122
|
+
agentsRes.value.forEach((a) => {
|
|
123
|
+
m[a.agentId] = parseDur(a.statusDuration || "00:00:00");
|
|
124
|
+
});
|
|
125
|
+
setDurations(m);
|
|
126
|
+
}
|
|
127
|
+
if (queuesRes.status === "fulfilled" && queuesRes.value) setQueues(queuesRes.value);
|
|
128
|
+
if (alertsRes.status === "fulfilled" && alertsRes.value) setAlerts(alertsRes.value);
|
|
129
|
+
if (pulseRes.status === "fulfilled" && pulseRes.value) setQueuePulse(pulseRes.value);
|
|
130
|
+
} catch (e) {
|
|
131
|
+
} finally {
|
|
132
|
+
setIsLoading(false);
|
|
133
|
+
}
|
|
134
|
+
}, []);
|
|
135
|
+
useEffect(() => {
|
|
136
|
+
fetchDashboard();
|
|
137
|
+
const iv = setInterval(fetchDashboard, POLL_INTERVAL_MS);
|
|
138
|
+
return () => clearInterval(iv);
|
|
139
|
+
}, [fetchDashboard]);
|
|
140
|
+
useEffect(() => {
|
|
141
|
+
const iv = setInterval(() => {
|
|
142
|
+
const now = /* @__PURE__ */ new Date();
|
|
143
|
+
setClockStr(
|
|
144
|
+
[now.getHours(), now.getMinutes(), now.getSeconds()].map((v) => String(v).padStart(2, "0")).join(":")
|
|
145
|
+
);
|
|
146
|
+
setDateStr(
|
|
147
|
+
now.toLocaleDateString("en-US", {
|
|
148
|
+
weekday: "long",
|
|
149
|
+
year: "numeric",
|
|
150
|
+
month: "long",
|
|
151
|
+
day: "numeric"
|
|
152
|
+
})
|
|
153
|
+
);
|
|
154
|
+
setDurations((prev) => {
|
|
155
|
+
const next = __spreadValues({}, prev);
|
|
156
|
+
for (const key of Object.keys(next)) next[key] = next[key] + 1;
|
|
157
|
+
return next;
|
|
158
|
+
});
|
|
159
|
+
}, 1e3);
|
|
160
|
+
return () => clearInterval(iv);
|
|
161
|
+
}, []);
|
|
162
|
+
return {
|
|
163
|
+
isLoading,
|
|
164
|
+
topStats,
|
|
165
|
+
agents,
|
|
166
|
+
queues,
|
|
167
|
+
alerts,
|
|
168
|
+
queuePulse,
|
|
169
|
+
durations,
|
|
170
|
+
clockStr,
|
|
171
|
+
dateStr,
|
|
172
|
+
refresh: fetchDashboard
|
|
173
|
+
};
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
// call-control-sdk/lib/pages/liveStatus/styles.ts
|
|
177
|
+
import { Box, styled } from "@mui/material";
|
|
178
|
+
import { keyframes } from "@mui/material/styles";
|
|
179
|
+
var pulse = keyframes`
|
|
180
|
+
0%, 100% { transform: scale(1); opacity: 1; }
|
|
181
|
+
50% { transform: scale(1.6); opacity: 0.3; }
|
|
182
|
+
`;
|
|
183
|
+
var slideUp = keyframes`
|
|
184
|
+
from { transform: translateY(16px); opacity: 0; }
|
|
185
|
+
to { transform: translateY(0); opacity: 1; }
|
|
186
|
+
`;
|
|
187
|
+
var flashBg = keyframes`
|
|
188
|
+
0%, 100% { background: #fdf3e0; }
|
|
189
|
+
50% { background: #fff7e0; }
|
|
190
|
+
`;
|
|
191
|
+
var rowBlink = keyframes`
|
|
192
|
+
0%, 100% { background: rgba(204,42,42,.07); }
|
|
193
|
+
50% { background: rgba(204,42,42,.2); }
|
|
194
|
+
`;
|
|
195
|
+
var ticker = keyframes`
|
|
196
|
+
0% { transform: translateX(0); }
|
|
197
|
+
100% { transform: translateX(-50%); }
|
|
198
|
+
`;
|
|
199
|
+
var C = {
|
|
200
|
+
bg0: "#eef2f7",
|
|
201
|
+
bg1: "#ffffff",
|
|
202
|
+
bg2: "#f4f7fb",
|
|
203
|
+
bg3: "#e4eaf3",
|
|
204
|
+
bg4: "#d5dfee",
|
|
205
|
+
b1: "rgba(30,60,120,.08)",
|
|
206
|
+
b2: "rgba(30,60,120,.14)",
|
|
207
|
+
t1: "#0d1e35",
|
|
208
|
+
t2: "#3a5278",
|
|
209
|
+
t3: "#7a93b5",
|
|
210
|
+
t4: "#b0c0d5",
|
|
211
|
+
green: "#0a9a62",
|
|
212
|
+
greenLt: "#e4f6ef",
|
|
213
|
+
greenBd: "rgba(10,154,98,.2)",
|
|
214
|
+
amber: "#c47c00",
|
|
215
|
+
amberLt: "#fdf3e0",
|
|
216
|
+
amberBd: "rgba(196,124,0,.2)",
|
|
217
|
+
blue: "#1565c8",
|
|
218
|
+
blueLt: "#e8f0fc",
|
|
219
|
+
blueBd: "rgba(21,101,200,.2)",
|
|
220
|
+
red: "#cc2a2a",
|
|
221
|
+
redLt: "#fde8e8",
|
|
222
|
+
redBd: "rgba(204,42,42,.2)",
|
|
223
|
+
purple: "#6b3fbf",
|
|
224
|
+
purpleLt: "#f0eafa",
|
|
225
|
+
purpleBd: "rgba(107,63,191,.2)",
|
|
226
|
+
teal: "#0b7a8f",
|
|
227
|
+
tealLt: "#e3f4f7",
|
|
228
|
+
tealBd: "rgba(11,122,143,.2)",
|
|
229
|
+
orange: "#c45a00",
|
|
230
|
+
orangeLt: "#fdf0e4",
|
|
231
|
+
navy: "#1A5F6C"
|
|
232
|
+
};
|
|
233
|
+
var STATUS_COLORS = {
|
|
234
|
+
"s-oncall-in": { bg: "#fff8e1", border: "rgba(196,124,0,.3)", bar: "#e68a00", text: "#b36b00" },
|
|
235
|
+
"s-oncall-out": { bg: "#e3f2fd", border: "rgba(21,101,200,.3)", bar: "#1976d2", text: "#0d47a1" },
|
|
236
|
+
"s-wrapup": { bg: "#f3e5f5", border: "rgba(107,63,191,.3)", bar: "#8e24aa", text: "#6a1b9a" },
|
|
237
|
+
"s-break": { bg: "#ffebee", border: "rgba(204,42,42,.3)", bar: "#e53935", text: "#c62828" },
|
|
238
|
+
"s-idle": { bg: "#e8f5e9", border: "rgba(46,125,50,.25)", bar: "#2e7d32", text: "#1b5e20" }
|
|
239
|
+
};
|
|
240
|
+
var WallboardRoot = styled(Box, {
|
|
241
|
+
shouldForwardProp: (prop) => prop !== "isTv"
|
|
242
|
+
})(({ theme, isTv }) => ({
|
|
243
|
+
display: "grid",
|
|
244
|
+
gridTemplateRows: "auto auto 1fr auto",
|
|
245
|
+
minHeight: isTv ? "100vh" : "calc(100vh - 60px)",
|
|
246
|
+
height: isTv ? "100vh" : "calc(100vh - 60px)",
|
|
247
|
+
fontFamily: "'Poppins', Arial, sans-serif",
|
|
248
|
+
background: "transparent",
|
|
249
|
+
color: C.t1,
|
|
250
|
+
[theme.breakpoints.up("lg")]: {
|
|
251
|
+
height: isTv ? "100vh" : "calc(100vh - 60px)",
|
|
252
|
+
overflow: "hidden"
|
|
253
|
+
}
|
|
254
|
+
}));
|
|
255
|
+
var TopBar = styled(Box)(({ theme }) => ({
|
|
256
|
+
background: C.navy,
|
|
257
|
+
display: "flex",
|
|
258
|
+
alignItems: "center",
|
|
259
|
+
justifyContent: "space-between",
|
|
260
|
+
padding: "0 10px",
|
|
261
|
+
height: 34,
|
|
262
|
+
minHeight: 34,
|
|
263
|
+
borderBottom: `1px solid ${C.blue}`,
|
|
264
|
+
flexWrap: "wrap",
|
|
265
|
+
gap: 4,
|
|
266
|
+
[theme.breakpoints.up("sm")]: { padding: "0 14px", flexWrap: "nowrap" }
|
|
267
|
+
}));
|
|
268
|
+
var BrandLogo = styled(Box)({
|
|
269
|
+
width: 22,
|
|
270
|
+
height: 22,
|
|
271
|
+
borderRadius: 4,
|
|
272
|
+
background: "#fff",
|
|
273
|
+
display: "flex",
|
|
274
|
+
alignItems: "center",
|
|
275
|
+
justifyContent: "center",
|
|
276
|
+
overflow: "hidden"
|
|
277
|
+
});
|
|
278
|
+
var LiveBadge = styled(Box)({
|
|
279
|
+
display: "flex",
|
|
280
|
+
alignItems: "center",
|
|
281
|
+
gap: 4,
|
|
282
|
+
background: "rgba(10,154,98,.2)",
|
|
283
|
+
border: "1px solid rgba(10,154,98,.4)",
|
|
284
|
+
borderRadius: 12,
|
|
285
|
+
padding: "2px 7px",
|
|
286
|
+
fontSize: 8,
|
|
287
|
+
fontWeight: 700,
|
|
288
|
+
letterSpacing: 1.5,
|
|
289
|
+
color: "#0ef5a8",
|
|
290
|
+
textTransform: "uppercase"
|
|
291
|
+
});
|
|
292
|
+
var PulseDot = styled("span")({
|
|
293
|
+
width: 5,
|
|
294
|
+
height: 5,
|
|
295
|
+
borderRadius: "50%",
|
|
296
|
+
background: "#0ef5a8",
|
|
297
|
+
display: "inline-block",
|
|
298
|
+
animation: `${pulse} 1.5s ease infinite`
|
|
299
|
+
});
|
|
300
|
+
var KpiStrip = styled(Box)(({ theme }) => ({
|
|
301
|
+
display: "grid",
|
|
302
|
+
gridTemplateColumns: "repeat(auto-fit, minmax(72px, 1fr))",
|
|
303
|
+
background: "transparent",
|
|
304
|
+
borderBottom: `1px solid ${C.b1}`,
|
|
305
|
+
[theme.breakpoints.up("xl")]: {
|
|
306
|
+
gridTemplateColumns: "repeat(14, 1fr)"
|
|
307
|
+
}
|
|
308
|
+
}));
|
|
309
|
+
var KpiCell = styled(Box)(({ accentColor }) => ({
|
|
310
|
+
padding: "4px 0 3px 8px",
|
|
311
|
+
borderRight: `1px solid ${C.b1}`,
|
|
312
|
+
borderBottom: `1px solid ${C.b1}`,
|
|
313
|
+
position: "relative",
|
|
314
|
+
cursor: "default",
|
|
315
|
+
"&:last-child": { borderRight: "none" },
|
|
316
|
+
"&::after": {
|
|
317
|
+
content: '""',
|
|
318
|
+
position: "absolute",
|
|
319
|
+
bottom: 0,
|
|
320
|
+
left: 0,
|
|
321
|
+
width: "100%",
|
|
322
|
+
height: 2,
|
|
323
|
+
background: accentColor
|
|
324
|
+
},
|
|
325
|
+
"@media (min-width: 960px)": { padding: "5px 0 4px 6px" }
|
|
326
|
+
}));
|
|
327
|
+
var KpiValue = styled("div")(({ kcolor, theme }) => ({
|
|
328
|
+
fontFamily: "'Poppins', Arial, sans-serif",
|
|
329
|
+
fontSize: 15,
|
|
330
|
+
fontWeight: 800,
|
|
331
|
+
lineHeight: 1,
|
|
332
|
+
color: kcolor,
|
|
333
|
+
[theme.breakpoints.up("md")]: { fontSize: 17 },
|
|
334
|
+
[theme.breakpoints.up("lg")]: { fontSize: 20 }
|
|
335
|
+
}));
|
|
336
|
+
var KpiLabel = styled("div")({
|
|
337
|
+
fontSize: 8,
|
|
338
|
+
letterSpacing: 0.8,
|
|
339
|
+
textTransform: "uppercase",
|
|
340
|
+
color: C.t3,
|
|
341
|
+
fontWeight: 600,
|
|
342
|
+
marginTop: 1
|
|
343
|
+
});
|
|
344
|
+
var BodyGrid = styled(Box)(({ theme }) => ({
|
|
345
|
+
display: "grid",
|
|
346
|
+
gridTemplateColumns: "1fr",
|
|
347
|
+
marginTop: 0,
|
|
348
|
+
overflow: "auto",
|
|
349
|
+
minHeight: 0,
|
|
350
|
+
[theme.breakpoints.up("md")]: { gridTemplateColumns: "2fr 1fr" },
|
|
351
|
+
[theme.breakpoints.up("lg")]: { gridTemplateColumns: "2fr 1fr", overflow: "hidden" }
|
|
352
|
+
}));
|
|
353
|
+
var Panel = styled(Box)(({ theme }) => ({
|
|
354
|
+
display: "flex",
|
|
355
|
+
flexDirection: "column",
|
|
356
|
+
overflow: "auto",
|
|
357
|
+
minHeight: 0,
|
|
358
|
+
borderRight: `1px solid ${C.b1}`,
|
|
359
|
+
[theme.breakpoints.up("lg")]: { overflow: "hidden" }
|
|
360
|
+
}));
|
|
361
|
+
var PanelHeader = styled(Box)({
|
|
362
|
+
display: "flex",
|
|
363
|
+
alignItems: "center",
|
|
364
|
+
justifyContent: "space-between",
|
|
365
|
+
padding: "4px 10px",
|
|
366
|
+
background: "transparent",
|
|
367
|
+
borderBottom: `1px solid ${C.b1}`,
|
|
368
|
+
flexShrink: 0
|
|
369
|
+
});
|
|
370
|
+
var PhTitle = styled("span")({
|
|
371
|
+
fontFamily: "'Poppins', Arial, sans-serif",
|
|
372
|
+
fontSize: 10,
|
|
373
|
+
fontWeight: 700,
|
|
374
|
+
letterSpacing: 1.2,
|
|
375
|
+
textTransform: "uppercase",
|
|
376
|
+
color: C.t2
|
|
377
|
+
});
|
|
378
|
+
var Badge = styled("span")(({ bg, color, border }) => ({
|
|
379
|
+
fontFamily: "'JetBrains Mono', monospace",
|
|
380
|
+
fontSize: 9,
|
|
381
|
+
fontWeight: 700,
|
|
382
|
+
padding: "1px 6px",
|
|
383
|
+
borderRadius: 3,
|
|
384
|
+
letterSpacing: 0.2,
|
|
385
|
+
background: bg,
|
|
386
|
+
color,
|
|
387
|
+
border: `1px solid ${border}`
|
|
388
|
+
}));
|
|
389
|
+
var StatusDot = styled("span")(({ dotColor, animated }) => __spreadValues({
|
|
390
|
+
width: 5,
|
|
391
|
+
height: 5,
|
|
392
|
+
borderRadius: "50%",
|
|
393
|
+
flexShrink: 0,
|
|
394
|
+
background: dotColor
|
|
395
|
+
}, animated ? { animation: `${pulse} 1.3s ease infinite` } : {}));
|
|
396
|
+
var AgentTable = styled("table")({
|
|
397
|
+
width: "100%",
|
|
398
|
+
borderCollapse: "collapse",
|
|
399
|
+
tableLayout: "auto"
|
|
400
|
+
});
|
|
401
|
+
var AgTh = styled("th")({
|
|
402
|
+
padding: "4px 8px",
|
|
403
|
+
fontSize: 8,
|
|
404
|
+
letterSpacing: 0.8,
|
|
405
|
+
textTransform: "uppercase",
|
|
406
|
+
color: C.t3,
|
|
407
|
+
fontWeight: 600,
|
|
408
|
+
textAlign: "left",
|
|
409
|
+
borderBottom: `1px solid ${C.b2}`,
|
|
410
|
+
background: C.bg2,
|
|
411
|
+
whiteSpace: "nowrap",
|
|
412
|
+
position: "sticky",
|
|
413
|
+
top: 0,
|
|
414
|
+
zIndex: 1
|
|
415
|
+
});
|
|
416
|
+
var AgTd = styled("td")({
|
|
417
|
+
padding: "4px 8px",
|
|
418
|
+
fontSize: 11,
|
|
419
|
+
borderBottom: `1px solid ${C.b1}`,
|
|
420
|
+
verticalAlign: "middle"
|
|
421
|
+
});
|
|
422
|
+
var PageInfo = styled(Box)({
|
|
423
|
+
display: "flex",
|
|
424
|
+
alignItems: "center",
|
|
425
|
+
justifyContent: "space-between",
|
|
426
|
+
padding: "2px 10px",
|
|
427
|
+
fontSize: 8,
|
|
428
|
+
color: C.t3,
|
|
429
|
+
background: C.bg2,
|
|
430
|
+
flexShrink: 0,
|
|
431
|
+
borderTop: `1px solid ${C.b1}`
|
|
432
|
+
});
|
|
433
|
+
var QName = styled("span")({
|
|
434
|
+
fontWeight: 600,
|
|
435
|
+
color: C.t1,
|
|
436
|
+
fontFamily: "'Poppins', Arial, sans-serif",
|
|
437
|
+
fontSize: 11,
|
|
438
|
+
"@media (min-width: 1280px)": { fontSize: 12 }
|
|
439
|
+
});
|
|
440
|
+
var QNum = styled("span")(({ numColor }) => ({
|
|
441
|
+
fontFamily: "'JetBrains Mono', monospace",
|
|
442
|
+
fontWeight: 700,
|
|
443
|
+
fontSize: 11,
|
|
444
|
+
color: numColor || C.t1
|
|
445
|
+
}));
|
|
446
|
+
var QBar = styled(Box)({ height: 4, background: C.bg3, borderRadius: 2, overflow: "hidden", width: 56 });
|
|
447
|
+
var QBarFill = styled(Box)(({ w, barColor }) => ({
|
|
448
|
+
height: "100%",
|
|
449
|
+
borderRadius: 3,
|
|
450
|
+
width: `${w}%`,
|
|
451
|
+
background: barColor
|
|
452
|
+
}));
|
|
453
|
+
var SbHeader = styled(Box)({
|
|
454
|
+
padding: "7px 12px",
|
|
455
|
+
display: "flex",
|
|
456
|
+
alignItems: "center",
|
|
457
|
+
justifyContent: "space-between",
|
|
458
|
+
background: C.bg2,
|
|
459
|
+
borderBottom: `1px solid ${C.b1}`
|
|
460
|
+
});
|
|
461
|
+
var SbTitle = styled("span")({
|
|
462
|
+
fontSize: 9,
|
|
463
|
+
fontWeight: 700,
|
|
464
|
+
letterSpacing: 1.5,
|
|
465
|
+
textTransform: "uppercase",
|
|
466
|
+
color: C.t3
|
|
467
|
+
});
|
|
468
|
+
var NoDataBox = styled(Box)({
|
|
469
|
+
display: "flex",
|
|
470
|
+
alignItems: "center",
|
|
471
|
+
justifyContent: "center",
|
|
472
|
+
padding: "12px 8px",
|
|
473
|
+
fontSize: 10,
|
|
474
|
+
fontWeight: 600,
|
|
475
|
+
color: C.t3,
|
|
476
|
+
letterSpacing: 0.5,
|
|
477
|
+
fontFamily: "'Poppins', Arial, sans-serif"
|
|
478
|
+
});
|
|
479
|
+
var Footer = styled(Box)({
|
|
480
|
+
background: C.navy,
|
|
481
|
+
borderTop: "1px solid rgba(255,255,255,.08)",
|
|
482
|
+
display: "flex",
|
|
483
|
+
alignItems: "center",
|
|
484
|
+
overflow: "hidden",
|
|
485
|
+
minHeight: 18,
|
|
486
|
+
height: 18,
|
|
487
|
+
position: "sticky",
|
|
488
|
+
bottom: 0,
|
|
489
|
+
zIndex: 5
|
|
490
|
+
});
|
|
491
|
+
var TickerLabel = styled("div")({
|
|
492
|
+
flexShrink: 0,
|
|
493
|
+
padding: "0 8px",
|
|
494
|
+
fontSize: 7,
|
|
495
|
+
fontWeight: 700,
|
|
496
|
+
letterSpacing: 1.2,
|
|
497
|
+
textTransform: "uppercase",
|
|
498
|
+
color: "rgba(255,255,255,.4)",
|
|
499
|
+
borderRight: "1px solid rgba(255,255,255,.1)",
|
|
500
|
+
whiteSpace: "nowrap"
|
|
501
|
+
});
|
|
502
|
+
var TickerTrack = styled(Box)({ flex: 1, overflow: "hidden", position: "relative" });
|
|
503
|
+
var TickerInner = styled(Box)({
|
|
504
|
+
display: "flex",
|
|
505
|
+
animation: `${ticker} 50s linear infinite`,
|
|
506
|
+
whiteSpace: "nowrap"
|
|
507
|
+
});
|
|
508
|
+
var TickerSpan = styled("span")(({ isWarn, isGood }) => ({
|
|
509
|
+
fontSize: 9,
|
|
510
|
+
color: "rgba(255,255,255,.55)",
|
|
511
|
+
padding: "0 16px",
|
|
512
|
+
letterSpacing: 0.3,
|
|
513
|
+
"& b": {
|
|
514
|
+
color: isWarn ? "#fcd34d" : isGood ? "#6ee7b7" : "rgba(255,255,255,.85)",
|
|
515
|
+
fontWeight: 600
|
|
516
|
+
}
|
|
517
|
+
}));
|
|
518
|
+
var MonitorBtn = styled("button")(({ variant }) => {
|
|
519
|
+
const colors = {
|
|
520
|
+
listen: { bg: "#e3f2fd", color: "#1976d2", hoverBg: "#bbdefb" },
|
|
521
|
+
whisper: { bg: "#fff3e0", color: "#ef6c00", hoverBg: "#ffe0b2" },
|
|
522
|
+
barge: { bg: "#fce4ec", color: "#c2185b", hoverBg: "#f8bbd0" },
|
|
523
|
+
stop: { bg: "#ffebee", color: "#c62828", hoverBg: "#ffcdd2" }
|
|
524
|
+
};
|
|
525
|
+
const c = colors[variant];
|
|
526
|
+
return {
|
|
527
|
+
padding: "2px 5px",
|
|
528
|
+
border: "none",
|
|
529
|
+
borderRadius: 3,
|
|
530
|
+
cursor: "pointer",
|
|
531
|
+
fontSize: 8,
|
|
532
|
+
fontWeight: 600,
|
|
533
|
+
display: "flex",
|
|
534
|
+
alignItems: "center",
|
|
535
|
+
gap: 2,
|
|
536
|
+
background: c.bg,
|
|
537
|
+
color: c.color,
|
|
538
|
+
transition: "all 0.2s",
|
|
539
|
+
"&:hover": { background: c.hoverBg },
|
|
540
|
+
"&:disabled": { opacity: 0.5, cursor: "not-allowed" }
|
|
541
|
+
};
|
|
542
|
+
});
|
|
543
|
+
var MonitorCard = styled(Box)({
|
|
544
|
+
position: "fixed",
|
|
545
|
+
bottom: 20,
|
|
546
|
+
right: 20,
|
|
547
|
+
width: 296,
|
|
548
|
+
background: "#fff",
|
|
549
|
+
borderRadius: 14,
|
|
550
|
+
boxShadow: "0 8px 32px rgba(13,30,53,0.18), 0 2px 8px rgba(13,30,53,0.08)",
|
|
551
|
+
zIndex: 1001,
|
|
552
|
+
overflow: "hidden",
|
|
553
|
+
animation: `${slideUp} 0.2s cubic-bezier(.22,.68,0,1.2)`
|
|
554
|
+
});
|
|
555
|
+
|
|
556
|
+
// call-control-sdk/lib/pages/liveStatus/index.tsx
|
|
557
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
558
|
+
var AgentTableRow = React.memo(({
|
|
559
|
+
agent,
|
|
560
|
+
durSecs,
|
|
561
|
+
onMonitor,
|
|
562
|
+
activeMonitoring,
|
|
563
|
+
onStopMonitoring
|
|
564
|
+
}) => {
|
|
565
|
+
const statusKey = getAgentStatusKey(agent.status, agent.callDirection);
|
|
566
|
+
const sc = STATUS_COLORS[statusKey];
|
|
567
|
+
const isOnCall = statusKey === "s-oncall-in" || statusKey === "s-oncall-out";
|
|
568
|
+
const isLong = isOnCall && durSecs >= LONG_CALL_SECS;
|
|
569
|
+
const isBeingMonitored = (activeMonitoring == null ? void 0 : activeMonitoring.agentId) === agent.agentId;
|
|
570
|
+
const statusColor = isOnCall ? agent.callDirection === "OUTBOUND" ? C.blue : C.green : sc.text;
|
|
571
|
+
const durColor = isLong ? C.red : statusColor;
|
|
572
|
+
return /* @__PURE__ */ jsxs("tr", { style: { background: isLong ? "rgba(204,42,42,.07)" : sc.bg, transition: "background 0.3s" }, children: [
|
|
573
|
+
/* @__PURE__ */ jsx(AgTd, { sx: { borderLeft: `2px solid ${sc.bar}`, pl: "8px", maxWidth: 160 }, children: /* @__PURE__ */ jsxs(Box2, { sx: { display: "flex", alignItems: "center", gap: "4px" }, children: [
|
|
574
|
+
/* @__PURE__ */ jsx(Box2, { sx: { fontFamily: "'Poppins', Arial, sans-serif", fontSize: 11, fontWeight: 700, color: C.t1, whiteSpace: "nowrap", overflow: "hidden", textOverflow: "ellipsis" }, children: agent.agentName }),
|
|
575
|
+
isLong && /* @__PURE__ */ jsx(Box2, { component: "span", sx: { fontSize: 7, fontWeight: 700, color: C.red, letterSpacing: 0.3, flexShrink: 0 }, children: "!7m" })
|
|
576
|
+
] }) }),
|
|
577
|
+
/* @__PURE__ */ jsx(AgTd, { children: /* @__PURE__ */ jsx(Box2, { sx: { fontFamily: "'JetBrains Mono', monospace", fontSize: 9, color: C.t3 }, children: agent.extension || "\u2014" }) }),
|
|
578
|
+
/* @__PURE__ */ jsx(AgTd, { children: /* @__PURE__ */ jsxs(Box2, { sx: { display: "flex", alignItems: "center", gap: "4px", flexWrap: "nowrap" }, children: [
|
|
579
|
+
/* @__PURE__ */ jsx(StatusDot, { dotColor: statusColor, animated: isOnCall }),
|
|
580
|
+
/* @__PURE__ */ jsx(Box2, { sx: { fontSize: 8, fontWeight: 700, letterSpacing: 0.6, textTransform: "uppercase", color: statusColor, whiteSpace: "nowrap" }, children: agent.status })
|
|
581
|
+
] }) }),
|
|
582
|
+
/* @__PURE__ */ jsx(AgTd, { children: /* @__PURE__ */ jsx(Box2, { sx: { fontFamily: "'JetBrains Mono', monospace", fontSize: 11, fontWeight: 700, color: durColor, whiteSpace: "nowrap" }, children: fmtDur(durSecs) }) }),
|
|
583
|
+
/* @__PURE__ */ jsx(AgTd, { children: /* @__PURE__ */ jsx(Box2, { sx: { fontFamily: "'JetBrains Mono', monospace", fontSize: 9, color: C.t3 }, children: agent.activeCallerNumber || "\u2014" }) }),
|
|
584
|
+
/* @__PURE__ */ jsx(AgTd, { children: /* @__PURE__ */ jsx(Box2, { sx: { fontSize: 9, color: C.t3, whiteSpace: "nowrap", overflow: "hidden", textOverflow: "ellipsis", maxWidth: 110 }, children: agent.queueNames || "\u2014" }) }),
|
|
585
|
+
/* @__PURE__ */ jsx(AgTd, { children: /* @__PURE__ */ jsx(Box2, { sx: { fontFamily: "'JetBrains Mono', monospace", fontSize: 10, fontWeight: 700, color: C.t2 }, children: agent.callsToday }) }),
|
|
586
|
+
onMonitor !== void 0 && /* @__PURE__ */ jsx(AgTd, { children: isOnCall && onMonitor && /* @__PURE__ */ jsx(Box2, { sx: { display: "flex", gap: "3px", flexWrap: "nowrap", alignItems: "center" }, children: isBeingMonitored ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
587
|
+
/* @__PURE__ */ jsxs(Box2, { sx: { fontSize: 7, color: C.green, fontWeight: 600, display: "flex", alignItems: "center", gap: "2px", whiteSpace: "nowrap" }, children: [
|
|
588
|
+
/* @__PURE__ */ jsx(StatusDot, { dotColor: C.green, animated: true }),
|
|
589
|
+
activeMonitoring == null ? void 0 : activeMonitoring.mode.toUpperCase()
|
|
590
|
+
] }),
|
|
591
|
+
/* @__PURE__ */ jsx(MonitorBtn, { variant: "stop", onClick: onStopMonitoring, children: "\u23F9 Stop" })
|
|
592
|
+
] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
593
|
+
/* @__PURE__ */ jsx(SDKPermissionGuard, { permission: SDK_PERMISSIONS.SUPERVISOR_MONITOR_LISTEN, showFallback: false, children: /* @__PURE__ */ jsx(MonitorBtn, { variant: "listen", onClick: () => onMonitor(agent, "listen"), title: "Start listening", children: "\u{1F442}" }) }),
|
|
594
|
+
/* @__PURE__ */ jsx(SDKPermissionGuard, { permission: SDK_PERMISSIONS.SUPERVISOR_MONITOR_WHISPER, showFallback: false, children: /* @__PURE__ */ jsx(MonitorBtn, { variant: "whisper", onClick: () => onMonitor(agent, "whisper"), title: "Whisper to agent", children: "\u{1F5E3}" }) }),
|
|
595
|
+
/* @__PURE__ */ jsx(SDKPermissionGuard, { permission: SDK_PERMISSIONS.SUPERVISOR_MONITOR_BARGE, showFallback: false, children: /* @__PURE__ */ jsx(MonitorBtn, { variant: "barge", onClick: () => onMonitor(agent, "barge"), title: "Barge in to call", children: "\u{1F4E2}" }) })
|
|
596
|
+
] }) }) })
|
|
597
|
+
] });
|
|
598
|
+
});
|
|
599
|
+
function LiveStatusPageInner({ isTvDashboard = false }) {
|
|
600
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q;
|
|
601
|
+
const toast = useToast();
|
|
602
|
+
const {
|
|
603
|
+
isLoading,
|
|
604
|
+
topStats,
|
|
605
|
+
agents,
|
|
606
|
+
queues,
|
|
607
|
+
alerts,
|
|
608
|
+
queuePulse,
|
|
609
|
+
durations,
|
|
610
|
+
clockStr,
|
|
611
|
+
dateStr
|
|
612
|
+
} = useLiveStatus();
|
|
613
|
+
const { startMonitoring, stopMonitoring, changeMode, isLoading: monitoringLoading } = useCallMonitoring();
|
|
614
|
+
const [monitoringSession, setMonitoringSession] = useState2(null);
|
|
615
|
+
const [showMonitorModal, setShowMonitorModal] = useState2(false);
|
|
616
|
+
const [selectedAgent, setSelectedAgent] = useState2(null);
|
|
617
|
+
const [selectedMode, setSelectedMode] = useState2("listen");
|
|
618
|
+
const [monitoringError, setMonitoringError] = useState2(null);
|
|
619
|
+
const handleOpenMonitorModal = useCallback2((agent, mode) => {
|
|
620
|
+
setSelectedAgent(agent);
|
|
621
|
+
setSelectedMode(mode);
|
|
622
|
+
setShowMonitorModal(true);
|
|
623
|
+
setMonitoringError(null);
|
|
624
|
+
}, []);
|
|
625
|
+
const handleStartMonitoring = useCallback2(async () => {
|
|
626
|
+
if (!selectedAgent) return;
|
|
627
|
+
if (!selectedAgent.activeCallUuid) {
|
|
628
|
+
setMonitoringError("No active call found for this agent");
|
|
629
|
+
return;
|
|
630
|
+
}
|
|
631
|
+
setMonitoringError(null);
|
|
632
|
+
const response = await startMonitoring({
|
|
633
|
+
call_id: selectedAgent.activeCallUuid,
|
|
634
|
+
agent_extension: selectedAgent.extension || "",
|
|
635
|
+
mode: selectedMode
|
|
636
|
+
});
|
|
637
|
+
if ((response == null ? void 0 : response.success) && (response == null ? void 0 : response.session_id)) {
|
|
638
|
+
setMonitoringSession({
|
|
639
|
+
sessionId: response.session_id,
|
|
640
|
+
agentId: selectedAgent.agentId,
|
|
641
|
+
agentName: selectedAgent.agentName,
|
|
642
|
+
agentExt: selectedAgent.extension || "",
|
|
643
|
+
mode: selectedMode,
|
|
644
|
+
callUuid: selectedAgent.activeCallUuid,
|
|
645
|
+
startTime: Date.now()
|
|
646
|
+
});
|
|
647
|
+
setShowMonitorModal(false);
|
|
648
|
+
if (response.message) toast.showToast(response.message, "success");
|
|
649
|
+
} else {
|
|
650
|
+
setMonitoringError((response == null ? void 0 : response.message) || "Failed to start monitoring");
|
|
651
|
+
}
|
|
652
|
+
}, [selectedAgent, selectedMode, startMonitoring, toast]);
|
|
653
|
+
const handleStopMonitoring = useCallback2(async () => {
|
|
654
|
+
if (!monitoringSession) return;
|
|
655
|
+
const response = await stopMonitoring({ call_uuid: monitoringSession.callUuid });
|
|
656
|
+
if ((response == null ? void 0 : response.success) && (response == null ? void 0 : response.message)) toast.showToast(response.message, "success");
|
|
657
|
+
setMonitoringSession(null);
|
|
658
|
+
}, [monitoringSession, stopMonitoring, toast]);
|
|
659
|
+
const handleChangeMode = useCallback2(async (newMode) => {
|
|
660
|
+
if (!monitoringSession) return;
|
|
661
|
+
const response = await changeMode({ call_uuid: monitoringSession.callUuid, mode: newMode });
|
|
662
|
+
if (response == null ? void 0 : response.success) {
|
|
663
|
+
setMonitoringSession((prev) => prev ? __spreadProps(__spreadValues({}, prev), { mode: newMode }) : null);
|
|
664
|
+
if (response.message) toast.showToast(response.message, "success");
|
|
665
|
+
}
|
|
666
|
+
}, [monitoringSession, changeMode, toast]);
|
|
667
|
+
const handleCloseMonitorModal = useCallback2(() => {
|
|
668
|
+
setShowMonitorModal(false);
|
|
669
|
+
setSelectedAgent(null);
|
|
670
|
+
setMonitoringError(null);
|
|
671
|
+
}, []);
|
|
672
|
+
useEffect2(() => {
|
|
673
|
+
var _a2;
|
|
674
|
+
if (!monitoringSession) return;
|
|
675
|
+
const agent = agents.find((a) => a.agentId === monitoringSession.agentId);
|
|
676
|
+
if (!agent) return;
|
|
677
|
+
const isOnCall = ((_a2 = agent.status) == null ? void 0 : _a2.toUpperCase()) === "ONCALL";
|
|
678
|
+
const callUuidChanged = agent.activeCallUuid !== monitoringSession.callUuid;
|
|
679
|
+
if (!isOnCall || callUuidChanged) {
|
|
680
|
+
setMonitoringSession(null);
|
|
681
|
+
setShowMonitorModal(false);
|
|
682
|
+
toast.showToast("Monitoring ended \u2014 agent call has ended.", "info");
|
|
683
|
+
}
|
|
684
|
+
}, [agents, monitoringSession, toast]);
|
|
685
|
+
const sorted = getSortedAgents(agents);
|
|
686
|
+
const oncallCount = (_a = topStats == null ? void 0 : topStats.onCall) != null ? _a : agents.filter((a) => getAgentStatusKey(a.status, a.callDirection).startsWith("s-oncall")).length;
|
|
687
|
+
const breakCount = (_b = topStats == null ? void 0 : topStats.onBreak) != null ? _b : agents.filter((a) => getAgentStatusKey(a.status, a.callDirection) === "s-break").length;
|
|
688
|
+
const longCallCount = agents.filter((a) => getAgentStatusKey(a.status, a.callDirection) === "s-oncall-in" && (durations[a.agentId] || 0) >= LONG_CALL_SECS).length;
|
|
689
|
+
const kpiTotalAgents = (_c = topStats == null ? void 0 : topStats.totalAgents) != null ? _c : agents.length;
|
|
690
|
+
const kpiLoginCount = (_d = topStats == null ? void 0 : topStats.loggedIn) != null ? _d : agents.length;
|
|
691
|
+
const kpiIdleCount = (_e = topStats == null ? void 0 : topStats.idleReady) != null ? _e : agents.filter((a) => getAgentStatusKey(a.status, a.callDirection) === "s-idle").length;
|
|
692
|
+
const kpiOnCallCount = (_f = topStats == null ? void 0 : topStats.onCall) != null ? _f : agents.filter((a) => getAgentStatusKey(a.status, a.callDirection).startsWith("s-oncall")).length;
|
|
693
|
+
const kpiWrapup = (_g = topStats == null ? void 0 : topStats.wrapup) != null ? _g : agents.filter((a) => getAgentStatusKey(a.status, a.callDirection) === "s-wrapup").length;
|
|
694
|
+
const kpiBreak = (_h = topStats == null ? void 0 : topStats.onBreak) != null ? _h : agents.filter((a) => getAgentStatusKey(a.status, a.callDirection) === "s-break").length;
|
|
695
|
+
const kpiNotLogged = (_i = topStats == null ? void 0 : topStats.notLogged) != null ? _i : Math.max(0, kpiTotalAgents - kpiLoginCount);
|
|
696
|
+
const tickerItems = queues.map((q) => ({
|
|
697
|
+
text: `${q.queueName} Queue \u2014 <b>${q.waitingCalls > 0 ? q.waitingCalls + " waiting" : "all clear"}</b> \xB7 avg ${q.avgWaitFormatted}`,
|
|
698
|
+
warn: q.waitingCalls > 0,
|
|
699
|
+
good: q.waitingCalls === 0
|
|
700
|
+
}));
|
|
701
|
+
if (isLoading) {
|
|
702
|
+
return /* @__PURE__ */ jsxs(Box2, { sx: {
|
|
703
|
+
height: "100vh",
|
|
704
|
+
display: "flex",
|
|
705
|
+
flexDirection: "column",
|
|
706
|
+
alignItems: "center",
|
|
707
|
+
justifyContent: "center",
|
|
708
|
+
background: "transparent",
|
|
709
|
+
gap: 2
|
|
710
|
+
}, children: [
|
|
711
|
+
/* @__PURE__ */ jsx(CircularProgress, { size: 48, sx: { color: C.blue } }),
|
|
712
|
+
/* @__PURE__ */ jsx(Box2, { sx: { fontFamily: "'Poppins', Arial, sans-serif", fontSize: 16, fontWeight: 600, color: C.t2, letterSpacing: 1, textTransform: "uppercase" }, children: "Loading Live Status..." })
|
|
713
|
+
] });
|
|
714
|
+
}
|
|
715
|
+
return /* @__PURE__ */ jsxs(WallboardRoot, { isTv: isTvDashboard, children: [
|
|
716
|
+
isTvDashboard && /* @__PURE__ */ jsxs(TopBar, { children: [
|
|
717
|
+
/* @__PURE__ */ jsxs(Box2, { sx: { display: "flex", alignItems: "center", gap: "10px" }, children: [
|
|
718
|
+
/* @__PURE__ */ jsx(BrandLogo, { children: /* @__PURE__ */ jsxs("svg", { viewBox: "0 0 26 26", fill: "none", width: 16, height: 16, children: [
|
|
719
|
+
/* @__PURE__ */ jsx("rect", { width: "26", height: "26", rx: "5", fill: "#1A5F6C" }),
|
|
720
|
+
/* @__PURE__ */ jsx("path", { d: "M5 18 Q5 8 13 8 Q21 8 21 18", stroke: "#1565c8", strokeWidth: "2.5", fill: "none", strokeLinecap: "round" }),
|
|
721
|
+
/* @__PURE__ */ jsx("path", { d: "M9 18 Q9 12 13 12 Q17 12 17 18", stroke: "#0a9a62", strokeWidth: "2", fill: "none", strokeLinecap: "round" }),
|
|
722
|
+
/* @__PURE__ */ jsx("circle", { cx: "13", cy: "19", r: "2", fill: "#1565c8" })
|
|
723
|
+
] }) }),
|
|
724
|
+
/* @__PURE__ */ jsxs(Box2, { sx: { color: "#fff" }, children: [
|
|
725
|
+
/* @__PURE__ */ jsx(Box2, { sx: { fontFamily: "'Poppins', Arial, sans-serif", fontSize: 13, fontWeight: 800, letterSpacing: 1.2, lineHeight: 1 }, children: "AHS" }),
|
|
726
|
+
/* @__PURE__ */ jsx(Box2, { sx: { fontSize: 7.5, letterSpacing: 1, color: "rgba(255,255,255,.45)", textTransform: "uppercase" }, children: "Supervisor Wallboard" })
|
|
727
|
+
] }),
|
|
728
|
+
/* @__PURE__ */ jsxs(LiveBadge, { children: [
|
|
729
|
+
/* @__PURE__ */ jsx(PulseDot, {}),
|
|
730
|
+
"LIVE"
|
|
731
|
+
] })
|
|
732
|
+
] }),
|
|
733
|
+
/* @__PURE__ */ jsxs(Box2, { sx: { textAlign: "right" }, children: [
|
|
734
|
+
/* @__PURE__ */ jsx(Box2, { sx: { fontFamily: "'JetBrains Mono', monospace", fontSize: 14, fontWeight: 700, color: "#fff", letterSpacing: 1.5, lineHeight: 1 }, children: clockStr }),
|
|
735
|
+
/* @__PURE__ */ jsx(Box2, { sx: { fontSize: 7.5, color: "rgba(255,255,255,.4)", letterSpacing: 0.5, mt: "1px" }, children: dateStr })
|
|
736
|
+
] })
|
|
737
|
+
] }),
|
|
738
|
+
/* @__PURE__ */ jsxs(KpiStrip, { children: [
|
|
739
|
+
/* @__PURE__ */ jsxs(KpiCell, { accentColor: "#94a3b8", children: [
|
|
740
|
+
/* @__PURE__ */ jsx(KpiValue, { kcolor: C.t1, children: kpiTotalAgents }),
|
|
741
|
+
/* @__PURE__ */ jsx(KpiLabel, { children: "Total Agents" })
|
|
742
|
+
] }),
|
|
743
|
+
/* @__PURE__ */ jsxs(KpiCell, { accentColor: C.green, children: [
|
|
744
|
+
/* @__PURE__ */ jsx(KpiValue, { kcolor: C.green, children: kpiLoginCount }),
|
|
745
|
+
/* @__PURE__ */ jsx(KpiLabel, { children: "Logged In" })
|
|
746
|
+
] }),
|
|
747
|
+
/* @__PURE__ */ jsxs(KpiCell, { accentColor: "#cbd5e1", children: [
|
|
748
|
+
/* @__PURE__ */ jsx(KpiValue, { kcolor: "#94a3b8", children: kpiNotLogged }),
|
|
749
|
+
/* @__PURE__ */ jsx(KpiLabel, { children: "Not Logged" })
|
|
750
|
+
] }),
|
|
751
|
+
/* @__PURE__ */ jsxs(KpiCell, { accentColor: C.teal, children: [
|
|
752
|
+
/* @__PURE__ */ jsx(KpiValue, { kcolor: C.teal, children: kpiIdleCount }),
|
|
753
|
+
/* @__PURE__ */ jsx(KpiLabel, { children: "Idle / Ready" })
|
|
754
|
+
] }),
|
|
755
|
+
/* @__PURE__ */ jsxs(KpiCell, { accentColor: C.amber, children: [
|
|
756
|
+
/* @__PURE__ */ jsx(KpiValue, { kcolor: C.amber, children: kpiOnCallCount }),
|
|
757
|
+
/* @__PURE__ */ jsx(KpiLabel, { children: "On Call" })
|
|
758
|
+
] }),
|
|
759
|
+
/* @__PURE__ */ jsxs(KpiCell, { accentColor: C.green, children: [
|
|
760
|
+
/* @__PURE__ */ jsx(KpiValue, { kcolor: C.green, children: (_j = topStats == null ? void 0 : topStats.inboundToday) != null ? _j : 0 }),
|
|
761
|
+
/* @__PURE__ */ jsx(KpiLabel, { children: "Inbound" })
|
|
762
|
+
] }),
|
|
763
|
+
/* @__PURE__ */ jsxs(KpiCell, { accentColor: C.blue, children: [
|
|
764
|
+
/* @__PURE__ */ jsx(KpiValue, { kcolor: C.blue, children: (_k = topStats == null ? void 0 : topStats.outboundToday) != null ? _k : 0 }),
|
|
765
|
+
/* @__PURE__ */ jsx(KpiLabel, { children: "Outbound" })
|
|
766
|
+
] }),
|
|
767
|
+
/* @__PURE__ */ jsxs(KpiCell, { accentColor: C.purple, children: [
|
|
768
|
+
/* @__PURE__ */ jsx(KpiValue, { kcolor: C.purple, children: kpiWrapup }),
|
|
769
|
+
/* @__PURE__ */ jsx(KpiLabel, { children: "Wrapup" })
|
|
770
|
+
] }),
|
|
771
|
+
/* @__PURE__ */ jsxs(KpiCell, { accentColor: C.red, children: [
|
|
772
|
+
/* @__PURE__ */ jsx(KpiValue, { kcolor: C.red, children: kpiBreak }),
|
|
773
|
+
/* @__PURE__ */ jsx(KpiLabel, { children: "On Break" })
|
|
774
|
+
] }),
|
|
775
|
+
/* @__PURE__ */ jsxs(KpiCell, { accentColor: C.blue, children: [
|
|
776
|
+
/* @__PURE__ */ jsx(KpiValue, { kcolor: C.blue, children: (_l = topStats == null ? void 0 : topStats.callsToday) != null ? _l : 0 }),
|
|
777
|
+
/* @__PURE__ */ jsx(KpiLabel, { children: "Calls Today" })
|
|
778
|
+
] }),
|
|
779
|
+
/* @__PURE__ */ jsxs(KpiCell, { accentColor: C.red, children: [
|
|
780
|
+
/* @__PURE__ */ jsx(KpiValue, { kcolor: C.red, children: (_m = topStats == null ? void 0 : topStats.abandonedToday) != null ? _m : 0 }),
|
|
781
|
+
/* @__PURE__ */ jsx(KpiLabel, { children: "Abandoned" })
|
|
782
|
+
] }),
|
|
783
|
+
/* @__PURE__ */ jsxs(KpiCell, { accentColor: C.green, children: [
|
|
784
|
+
/* @__PURE__ */ jsx(KpiValue, { kcolor: C.green, children: (topStats == null ? void 0 : topStats.slaThisHrPct) != null ? `${topStats.slaThisHrPct}%` : "\u2014" }),
|
|
785
|
+
/* @__PURE__ */ jsx(KpiLabel, { children: "SLA This Hr" })
|
|
786
|
+
] }),
|
|
787
|
+
/* @__PURE__ */ jsxs(KpiCell, { accentColor: C.amber, children: [
|
|
788
|
+
/* @__PURE__ */ jsx(KpiValue, { kcolor: C.amber, children: (_n = topStats == null ? void 0 : topStats.avgSpeedAnswerFormatted) != null ? _n : "00:00" }),
|
|
789
|
+
/* @__PURE__ */ jsx(KpiLabel, { children: "Avg Speed Ans" })
|
|
790
|
+
] })
|
|
791
|
+
] }),
|
|
792
|
+
/* @__PURE__ */ jsxs(BodyGrid, { children: [
|
|
793
|
+
/* @__PURE__ */ jsxs(Panel, { children: [
|
|
794
|
+
/* @__PURE__ */ jsxs(PanelHeader, { children: [
|
|
795
|
+
/* @__PURE__ */ jsxs(Box2, { sx: { display: "flex", alignItems: "center", gap: 1 }, children: [
|
|
796
|
+
/* @__PURE__ */ jsx(PhTitle, { children: "Agent Status" }),
|
|
797
|
+
/* @__PURE__ */ jsxs(Badge, { bg: C.amberLt, color: C.amber, border: C.amberBd, children: [
|
|
798
|
+
oncallCount,
|
|
799
|
+
" On-Call"
|
|
800
|
+
] }),
|
|
801
|
+
/* @__PURE__ */ jsxs(Badge, { bg: C.redLt, color: C.red, border: C.redBd, children: [
|
|
802
|
+
breakCount,
|
|
803
|
+
" Break"
|
|
804
|
+
] }),
|
|
805
|
+
longCallCount > 0 && /* @__PURE__ */ jsxs(Badge, { bg: C.redLt, color: C.red, border: C.redBd, children: [
|
|
806
|
+
longCallCount,
|
|
807
|
+
" Long"
|
|
808
|
+
] })
|
|
809
|
+
] }),
|
|
810
|
+
/* @__PURE__ */ jsxs(Box2, { sx: { fontSize: 8, color: C.t3 }, children: [
|
|
811
|
+
agents.length,
|
|
812
|
+
" agents"
|
|
813
|
+
] })
|
|
814
|
+
] }),
|
|
815
|
+
/* @__PURE__ */ jsx(Box2, { sx: {
|
|
816
|
+
overflowX: "auto",
|
|
817
|
+
overflowY: "auto",
|
|
818
|
+
flex: 1,
|
|
819
|
+
minHeight: 0,
|
|
820
|
+
"&::-webkit-scrollbar": { width: 3, height: 3 },
|
|
821
|
+
"&::-webkit-scrollbar-track": { background: C.bg2, borderRadius: 2 },
|
|
822
|
+
"&::-webkit-scrollbar-thumb": { background: C.t4, borderRadius: 2, "&:hover": { background: C.t3 } }
|
|
823
|
+
}, children: /* @__PURE__ */ jsxs(AgentTable, { children: [
|
|
824
|
+
/* @__PURE__ */ jsx("thead", { children: /* @__PURE__ */ jsxs("tr", { children: [
|
|
825
|
+
/* @__PURE__ */ jsx(AgTh, { style: { width: "20%" }, children: "Agent" }),
|
|
826
|
+
/* @__PURE__ */ jsx(AgTh, { style: { width: "7%" }, children: "Ext" }),
|
|
827
|
+
/* @__PURE__ */ jsx(AgTh, { style: { width: "14%" }, children: "Status" }),
|
|
828
|
+
/* @__PURE__ */ jsx(AgTh, { style: { width: "10%" }, children: "Duration" }),
|
|
829
|
+
/* @__PURE__ */ jsx(AgTh, { style: { width: "12%" }, children: "Caller" }),
|
|
830
|
+
/* @__PURE__ */ jsx(AgTh, { style: { width: "17%" }, children: "Queue" }),
|
|
831
|
+
/* @__PURE__ */ jsx(AgTh, { style: { width: "6%" }, children: "Calls" }),
|
|
832
|
+
!isTvDashboard && /* @__PURE__ */ jsx(AgTh, { style: { width: "14%" }, children: "Actions" })
|
|
833
|
+
] }) }),
|
|
834
|
+
/* @__PURE__ */ jsx("tbody", { children: sorted.length > 0 ? sorted.map((a) => /* @__PURE__ */ jsx(
|
|
835
|
+
AgentTableRow,
|
|
836
|
+
{
|
|
837
|
+
agent: a,
|
|
838
|
+
durSecs: durations[a.agentId] || 0,
|
|
839
|
+
onMonitor: isTvDashboard ? void 0 : handleOpenMonitorModal,
|
|
840
|
+
activeMonitoring: monitoringSession,
|
|
841
|
+
onStopMonitoring: handleStopMonitoring
|
|
842
|
+
},
|
|
843
|
+
a.agentId
|
|
844
|
+
)) : /* @__PURE__ */ jsx("tr", { children: /* @__PURE__ */ jsx(AgTd, { colSpan: isTvDashboard ? 7 : 8, children: /* @__PURE__ */ jsx(NoDataBox, { children: "No data available" }) }) }) })
|
|
845
|
+
] }) }),
|
|
846
|
+
/* @__PURE__ */ jsxs(PageInfo, { children: [
|
|
847
|
+
/* @__PURE__ */ jsxs("span", { children: [
|
|
848
|
+
agents.length,
|
|
849
|
+
" agents \xB7 ",
|
|
850
|
+
oncallCount,
|
|
851
|
+
" on call \xB7 ",
|
|
852
|
+
agents.filter((a) => getAgentStatusKey(a.status, a.callDirection) === "s-idle").length,
|
|
853
|
+
" idle"
|
|
854
|
+
] }),
|
|
855
|
+
/* @__PURE__ */ jsx("span", { children: "Auto-refreshes every 5s" })
|
|
856
|
+
] })
|
|
857
|
+
] }),
|
|
858
|
+
/* @__PURE__ */ jsxs(Panel, { sx: { borderRight: `1px solid ${C.b1}`, maxHeight: { xs: "none", lg: "calc(100vh - 96px)" } }, children: [
|
|
859
|
+
/* @__PURE__ */ jsxs(PanelHeader, { children: [
|
|
860
|
+
/* @__PURE__ */ jsxs(Box2, { sx: { display: "flex", alignItems: "center", gap: 1 }, children: [
|
|
861
|
+
/* @__PURE__ */ jsx(PhTitle, { children: "Queue Performance" }),
|
|
862
|
+
/* @__PURE__ */ jsx(Badge, { bg: C.greenLt, color: C.green, border: C.greenBd, children: "All Healthy" })
|
|
863
|
+
] }),
|
|
864
|
+
/* @__PURE__ */ jsx(Badge, { bg: C.bg2, color: C.t3, border: C.b2, children: "Live SLA" })
|
|
865
|
+
] }),
|
|
866
|
+
/* @__PURE__ */ jsxs(Box2, { sx: {
|
|
867
|
+
flex: 1,
|
|
868
|
+
minHeight: 0,
|
|
869
|
+
"&::-webkit-scrollbar": { width: 3 },
|
|
870
|
+
"&::-webkit-scrollbar-track": { background: C.bg2, borderRadius: 2 },
|
|
871
|
+
"&::-webkit-scrollbar-thumb": { background: C.t4, borderRadius: 2, "&:hover": { background: C.t3 } }
|
|
872
|
+
}, children: [
|
|
873
|
+
/* @__PURE__ */ jsx(Box2, { sx: { overflowX: "auto", "&::-webkit-scrollbar": { height: 3 }, "&::-webkit-scrollbar-track": { background: C.bg2, borderRadius: 2 }, "&::-webkit-scrollbar-thumb": { background: C.t4, borderRadius: 2 } }, children: /* @__PURE__ */ jsxs(AgentTable, { children: [
|
|
874
|
+
/* @__PURE__ */ jsx("thead", { children: /* @__PURE__ */ jsxs("tr", { children: [
|
|
875
|
+
/* @__PURE__ */ jsx(AgTh, { children: "Queue" }),
|
|
876
|
+
/* @__PURE__ */ jsx(AgTh, { children: "Agents" }),
|
|
877
|
+
/* @__PURE__ */ jsx(AgTh, { children: "Active" }),
|
|
878
|
+
/* @__PURE__ */ jsx(AgTh, { children: "Waiting" }),
|
|
879
|
+
/* @__PURE__ */ jsx(AgTh, { children: "Avg Wait" }),
|
|
880
|
+
/* @__PURE__ */ jsx(AgTh, { children: "Load" }),
|
|
881
|
+
/* @__PURE__ */ jsx(AgTh, { children: "SLA%" }),
|
|
882
|
+
/* @__PURE__ */ jsx(AgTh, { children: "C/hr" })
|
|
883
|
+
] }) }),
|
|
884
|
+
/* @__PURE__ */ jsx("tbody", { children: queues.length > 0 ? queues.map((q) => {
|
|
885
|
+
const loadColor = q.loadPct > 50 ? C.red : q.loadPct > 25 ? C.amber : C.green;
|
|
886
|
+
const slaColor = q.slaPct >= 95 ? C.green : q.slaPct >= 85 ? C.amber : C.red;
|
|
887
|
+
const isWaitingHigh = q.waitingCalls > WAITING_THRESHOLD;
|
|
888
|
+
return /* @__PURE__ */ jsxs(Box2, { component: "tr", sx: isWaitingHigh ? { animation: `${rowBlink} 1s ease infinite` } : q.slaPct < 90 ? { background: "rgba(204,42,42,.04)" } : {}, children: [
|
|
889
|
+
/* @__PURE__ */ jsx(AgTd, { children: /* @__PURE__ */ jsx(QName, { children: q.queueName }) }),
|
|
890
|
+
/* @__PURE__ */ jsx(AgTd, { children: /* @__PURE__ */ jsx(QNum, { numColor: C.blue, children: q.totalAgents }) }),
|
|
891
|
+
/* @__PURE__ */ jsx(AgTd, { children: /* @__PURE__ */ jsx(QNum, { numColor: C.amber, children: q.activeAgents }) }),
|
|
892
|
+
/* @__PURE__ */ jsx(AgTd, { children: /* @__PURE__ */ jsx(QNum, { numColor: isWaitingHigh ? C.red : q.waitingCalls > 0 ? C.red : C.green, children: q.waitingCalls }) }),
|
|
893
|
+
/* @__PURE__ */ jsx(AgTd, { children: /* @__PURE__ */ jsx(QNum, { numColor: C.green, children: q.avgWaitFormatted }) }),
|
|
894
|
+
/* @__PURE__ */ jsx(AgTd, { children: /* @__PURE__ */ jsxs(Box2, { sx: { display: "flex", alignItems: "center", gap: "5px" }, children: [
|
|
895
|
+
/* @__PURE__ */ jsx(QBar, { children: /* @__PURE__ */ jsx(QBarFill, { w: q.loadPct, barColor: loadColor }) }),
|
|
896
|
+
/* @__PURE__ */ jsxs(Box2, { sx: { fontFamily: "'JetBrains Mono', monospace", fontSize: 10, color: C.t3 }, children: [
|
|
897
|
+
q.loadPct,
|
|
898
|
+
"%"
|
|
899
|
+
] })
|
|
900
|
+
] }) }),
|
|
901
|
+
/* @__PURE__ */ jsx(AgTd, { children: /* @__PURE__ */ jsxs(QNum, { numColor: slaColor, children: [
|
|
902
|
+
q.slaPct,
|
|
903
|
+
"%"
|
|
904
|
+
] }) }),
|
|
905
|
+
/* @__PURE__ */ jsx(AgTd, { children: /* @__PURE__ */ jsx(QNum, { numColor: C.blue, children: q.callsPerHour }) })
|
|
906
|
+
] }, q.queueId);
|
|
907
|
+
}) : /* @__PURE__ */ jsx("tr", { children: /* @__PURE__ */ jsx(AgTd, { colSpan: 8, children: /* @__PURE__ */ jsx(NoDataBox, { children: "No data available" }) }) }) })
|
|
908
|
+
] }) }),
|
|
909
|
+
/* @__PURE__ */ jsxs(Box2, { sx: { borderTop: `1px solid ${C.b1}` }, children: [
|
|
910
|
+
/* @__PURE__ */ jsxs(SbHeader, { children: [
|
|
911
|
+
/* @__PURE__ */ jsxs(Box2, { sx: { display: "flex", alignItems: "center", gap: "7px" }, children: [
|
|
912
|
+
/* @__PURE__ */ jsx("svg", { width: "11", height: "11", viewBox: "0 0 16 16", fill: "none", children: /* @__PURE__ */ jsx("path", { d: "M1 8h2l2-5 2 9 2-7 2 5 1-2h3", stroke: C.blue, strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round", fill: "none" }) }),
|
|
913
|
+
/* @__PURE__ */ jsx(SbTitle, { children: "Queue Pulse" })
|
|
914
|
+
] }),
|
|
915
|
+
/* @__PURE__ */ jsx(Badge, { bg: C.greenLt, color: C.green, border: C.greenBd, children: "Live" })
|
|
916
|
+
] }),
|
|
917
|
+
/* @__PURE__ */ jsx(Box2, { sx: { display: "grid", gridTemplateColumns: "1fr 1fr 1fr", borderBottom: `1px solid ${C.b1}` }, children: [
|
|
918
|
+
{ label: "In Queue", value: (_o = queuePulse == null ? void 0 : queuePulse.runningInQueue) != null ? _o : 0, color: C.amber, bg: C.amberLt },
|
|
919
|
+
{ label: "Ready", value: (_p = queuePulse == null ? void 0 : queuePulse.readyAgents) != null ? _p : 0, color: C.green, bg: C.greenLt },
|
|
920
|
+
{ label: "Avg Wait", value: (_q = queuePulse == null ? void 0 : queuePulse.avgWaitFormatted) != null ? _q : "--:--", color: C.blue, bg: C.blueLt }
|
|
921
|
+
].map((s) => /* @__PURE__ */ jsxs(Box2, { sx: { p: "12px", borderRight: `1px solid ${C.b1}`, "&:last-child": { borderRight: "none" }, background: s.bg }, children: [
|
|
922
|
+
/* @__PURE__ */ jsx(Box2, { sx: { fontFamily: "'Poppins', Arial, sans-serif", fontSize: 20, fontWeight: 800, color: s.color, lineHeight: 1 }, children: s.value }),
|
|
923
|
+
/* @__PURE__ */ jsx(Box2, { sx: { fontSize: 8, letterSpacing: 0.8, textTransform: "uppercase", color: s.color, mt: "4px", fontWeight: 600, opacity: 0.75 }, children: s.label })
|
|
924
|
+
] }, s.label)) })
|
|
925
|
+
] }),
|
|
926
|
+
/* @__PURE__ */ jsxs(Box2, { children: [
|
|
927
|
+
/* @__PURE__ */ jsxs(SbHeader, { children: [
|
|
928
|
+
/* @__PURE__ */ jsxs(Box2, { sx: { display: "flex", alignItems: "center", gap: "7px" }, children: [
|
|
929
|
+
/* @__PURE__ */ jsxs("svg", { width: "11", height: "11", viewBox: "0 0 16 16", fill: "none", children: [
|
|
930
|
+
/* @__PURE__ */ jsx("path", { d: "M8 1.5a5 5 0 0 1 5 5v2.5l1 2H2l1-2V6.5a5 5 0 0 1 5-5z", stroke: alerts.length > 0 ? C.amber : C.t3, strokeWidth: "1.4", strokeLinejoin: "round" }),
|
|
931
|
+
/* @__PURE__ */ jsx("path", { d: "M6.5 13a1.5 1.5 0 0 0 3 0", stroke: alerts.length > 0 ? C.amber : C.t3, strokeWidth: "1.4", strokeLinecap: "round" })
|
|
932
|
+
] }),
|
|
933
|
+
/* @__PURE__ */ jsx(SbTitle, { children: "Live Alerts" })
|
|
934
|
+
] }),
|
|
935
|
+
/* @__PURE__ */ jsx(Badge, { bg: alerts.length > 0 ? C.amberLt : C.bg2, color: alerts.length > 0 ? C.amber : C.t3, border: alerts.length > 0 ? C.amberBd : C.b2, children: alerts.length })
|
|
936
|
+
] }),
|
|
937
|
+
/* @__PURE__ */ jsx(Box2, { sx: {
|
|
938
|
+
overflowY: "auto",
|
|
939
|
+
maxHeight: 220,
|
|
940
|
+
"&::-webkit-scrollbar": { width: 3 },
|
|
941
|
+
"&::-webkit-scrollbar-track": { background: C.bg2, borderRadius: 2 },
|
|
942
|
+
"&::-webkit-scrollbar-thumb": { background: C.t4, borderRadius: 2, "&:hover": { background: C.t3 } }
|
|
943
|
+
}, children: alerts.length > 0 ? alerts.map((a, i) => {
|
|
944
|
+
var _a2, _b2, _c2;
|
|
945
|
+
const sk = ((_a2 = a.severity) == null ? void 0 : _a2.toLowerCase()) === "critical" ? "red" : ((_b2 = a.severity) == null ? void 0 : _b2.toLowerCase()) === "warning" ? "amber" : "blue";
|
|
946
|
+
const ALERT_COLORS = {
|
|
947
|
+
red: { bg: C.redLt, color: C.red },
|
|
948
|
+
amber: { bg: C.amberLt, color: C.amber },
|
|
949
|
+
blue: { bg: C.blueLt, color: C.blue }
|
|
950
|
+
};
|
|
951
|
+
const ac = (_c2 = ALERT_COLORS[sk]) != null ? _c2 : ALERT_COLORS.blue;
|
|
952
|
+
return /* @__PURE__ */ jsxs(Box2, { sx: { display: "flex", gap: "10px", px: "12px", py: "9px", borderBottom: `1px solid ${C.b1}`, background: i % 2 === 0 ? "transparent" : C.bg2 }, children: [
|
|
953
|
+
/* @__PURE__ */ jsx(Box2, { sx: { width: 8, height: 8, borderRadius: "50%", background: ac.color, flexShrink: 0, mt: "3px" } }),
|
|
954
|
+
/* @__PURE__ */ jsxs(Box2, { sx: { flex: 1, minWidth: 0 }, children: [
|
|
955
|
+
/* @__PURE__ */ jsx(Box2, { sx: { fontSize: 11, fontWeight: 600, color: C.t1, mb: "2px" }, children: a.alertTitle }),
|
|
956
|
+
/* @__PURE__ */ jsx(Box2, { sx: { fontSize: 9, color: C.t3, lineHeight: 1.4 }, children: a.alertMessage })
|
|
957
|
+
] }),
|
|
958
|
+
/* @__PURE__ */ jsxs(Box2, { sx: { flexShrink: 0, display: "flex", flexDirection: "column", alignItems: "flex-end", gap: "4px" }, children: [
|
|
959
|
+
/* @__PURE__ */ jsx(Box2, { sx: { fontSize: 7, fontWeight: 700, px: "5px", py: "1px", borderRadius: "3px", background: ac.bg, color: ac.color, textTransform: "uppercase", letterSpacing: 0.5 }, children: a.severity }),
|
|
960
|
+
/* @__PURE__ */ jsx(Box2, { sx: { fontFamily: "'JetBrains Mono', monospace", fontSize: 9, color: C.t3 }, children: (() => {
|
|
961
|
+
try {
|
|
962
|
+
const [h, m] = a.alertTime.split(":");
|
|
963
|
+
const hr = parseInt(h, 10);
|
|
964
|
+
return `${hr % 12 || 12}:${m} ${hr >= 12 ? "PM" : "AM"}`;
|
|
965
|
+
} catch (e) {
|
|
966
|
+
return a.alertTime;
|
|
967
|
+
}
|
|
968
|
+
})() })
|
|
969
|
+
] })
|
|
970
|
+
] }, i);
|
|
971
|
+
}) : /* @__PURE__ */ jsx(NoDataBox, { children: "No active alerts" }) })
|
|
972
|
+
] })
|
|
973
|
+
] })
|
|
974
|
+
] })
|
|
975
|
+
] }),
|
|
976
|
+
/* @__PURE__ */ jsxs(Footer, { children: [
|
|
977
|
+
/* @__PURE__ */ jsx(TickerLabel, { children: "AHS Live" }),
|
|
978
|
+
/* @__PURE__ */ jsx(TickerTrack, { children: /* @__PURE__ */ jsx(TickerInner, { children: [...tickerItems, ...tickerItems].map((t, i) => /* @__PURE__ */ jsx(TickerSpan, { isWarn: t.warn, isGood: t.good, dangerouslySetInnerHTML: { __html: t.text } }, i)) }) })
|
|
979
|
+
] }),
|
|
980
|
+
showMonitorModal && selectedAgent && (() => {
|
|
981
|
+
const modeConfig = {
|
|
982
|
+
listen: { icon: "\u{1F442}", label: "Listen", desc: "Silent \u2013 agent unaware", accent: C.blue, accentLt: "#e3f2fd", accentText: "#1565c0" },
|
|
983
|
+
whisper: { icon: "\u{1F5E3}\uFE0F", label: "Whisper", desc: "Only agent hears you", accent: "#ef6c00", accentLt: "#fff3e0", accentText: "#e65100" },
|
|
984
|
+
barge: { icon: "\u{1F4E2}", label: "Barge", desc: "Both parties hear you", accent: "#c2185b", accentLt: "#fce4ec", accentText: "#880e4f" }
|
|
985
|
+
};
|
|
986
|
+
const m = modeConfig[selectedMode];
|
|
987
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
988
|
+
/* @__PURE__ */ jsx(Box2, { onClick: handleCloseMonitorModal, sx: { position: "fixed", inset: 0, zIndex: 1e3 } }),
|
|
989
|
+
/* @__PURE__ */ jsxs(MonitorCard, { children: [
|
|
990
|
+
/* @__PURE__ */ jsx(Box2, { sx: { height: 3, background: m.accent } }),
|
|
991
|
+
/* @__PURE__ */ jsxs(Box2, { sx: { p: "12px 14px" }, children: [
|
|
992
|
+
/* @__PURE__ */ jsxs(Box2, { sx: { display: "flex", alignItems: "center", justifyContent: "space-between", mb: 1.5 }, children: [
|
|
993
|
+
/* @__PURE__ */ jsxs(Box2, { sx: { display: "flex", alignItems: "center", gap: 1 }, children: [
|
|
994
|
+
/* @__PURE__ */ jsx(Box2, { sx: { width: 32, height: 32, borderRadius: "10px", background: m.accentLt, display: "flex", alignItems: "center", justifyContent: "center", fontSize: 16 }, children: m.icon }),
|
|
995
|
+
/* @__PURE__ */ jsxs(Box2, { children: [
|
|
996
|
+
/* @__PURE__ */ jsx(Box2, { sx: { fontWeight: 700, fontSize: 13, color: C.t1, lineHeight: 1.2 }, children: "Monitor Call" }),
|
|
997
|
+
/* @__PURE__ */ jsxs(Box2, { sx: { fontSize: 10, color: C.t3 }, children: [
|
|
998
|
+
selectedAgent.agentName,
|
|
999
|
+
" \xB7 ext ",
|
|
1000
|
+
selectedAgent.extension || ""
|
|
1001
|
+
] })
|
|
1002
|
+
] })
|
|
1003
|
+
] }),
|
|
1004
|
+
/* @__PURE__ */ jsx(Box2, { component: "button", onClick: handleCloseMonitorModal, sx: { border: "none", background: "none", cursor: "pointer", color: C.t4, fontSize: 18, lineHeight: 1, p: 0, "&:hover": { color: C.t2 } }, children: "\xD7" })
|
|
1005
|
+
] }),
|
|
1006
|
+
/* @__PURE__ */ jsx(Box2, { sx: { display: "grid", gridTemplateColumns: "1fr 1fr", gap: "4px 0", background: C.bg2, borderRadius: "8px", p: "8px 10px", mb: 1.5 }, children: [
|
|
1007
|
+
["Customer", selectedAgent.activeCallerNumber || "\u2014"],
|
|
1008
|
+
["Duration", fmtDur(durations[selectedAgent.agentId] || 0)]
|
|
1009
|
+
].map(([label, value]) => /* @__PURE__ */ jsxs(React.Fragment, { children: [
|
|
1010
|
+
/* @__PURE__ */ jsx(Box2, { sx: { fontSize: 10, color: C.t3, fontWeight: 500 }, children: label }),
|
|
1011
|
+
/* @__PURE__ */ jsx(Box2, { sx: { fontSize: 10, fontWeight: 600, color: C.t1, textAlign: "right" }, children: value })
|
|
1012
|
+
] }, label)) }),
|
|
1013
|
+
/* @__PURE__ */ jsx(Box2, { sx: { display: "flex", gap: "6px", mb: 1.5 }, children: ["listen", "whisper", "barge"].map((mode) => {
|
|
1014
|
+
const mc = modeConfig[mode];
|
|
1015
|
+
const active = selectedMode === mode;
|
|
1016
|
+
return /* @__PURE__ */ jsxs(Box2, { onClick: () => setSelectedMode(mode), sx: { flex: 1, textAlign: "center", py: "5px", borderRadius: "20px", fontSize: 9, fontWeight: 700, letterSpacing: 0.4, cursor: "pointer", textTransform: "uppercase", transition: "all 0.15s", background: active ? mc.accent : C.bg2, color: active ? "#fff" : C.t3, border: `1px solid ${active ? mc.accent : "transparent"}`, "&:hover": { background: active ? mc.accent : C.bg3 } }, children: [
|
|
1017
|
+
mc.icon,
|
|
1018
|
+
" ",
|
|
1019
|
+
mc.label
|
|
1020
|
+
] }, mode);
|
|
1021
|
+
}) }),
|
|
1022
|
+
/* @__PURE__ */ jsxs(Box2, { sx: { fontSize: 10, color: m.accentText, background: m.accentLt, borderRadius: "6px", px: 1.25, py: 0.75, mb: 1.5, display: "flex", alignItems: "center", gap: 0.5 }, children: [
|
|
1023
|
+
/* @__PURE__ */ jsx("span", { style: { fontSize: 11 }, children: "\u2139\uFE0F" }),
|
|
1024
|
+
" ",
|
|
1025
|
+
m.desc,
|
|
1026
|
+
" \xB7 Your dialer will ring to connect."
|
|
1027
|
+
] }),
|
|
1028
|
+
monitoringError && /* @__PURE__ */ jsx(Box2, { sx: { mb: 1.5, px: 1.25, py: 0.75, background: C.redLt, borderRadius: "6px", color: C.red, fontSize: 11 }, children: monitoringError }),
|
|
1029
|
+
/* @__PURE__ */ jsxs(Box2, { sx: { display: "flex", gap: "8px" }, children: [
|
|
1030
|
+
/* @__PURE__ */ jsx(Box2, { component: "button", onClick: handleCloseMonitorModal, sx: { flex: 1, py: "7px", border: `1px solid ${C.b2}`, borderRadius: "8px", cursor: "pointer", fontSize: 11, fontWeight: 500, background: "transparent", color: C.t2, "&:hover": { background: C.bg2 } }, children: "Cancel" }),
|
|
1031
|
+
/* @__PURE__ */ jsx(Box2, { component: "button", onClick: handleStartMonitoring, disabled: monitoringLoading, sx: { flex: 2, py: "7px", border: "none", borderRadius: "8px", cursor: monitoringLoading ? "not-allowed" : "pointer", fontSize: 11, fontWeight: 700, background: m.accent, color: "#fff", opacity: monitoringLoading ? 0.7 : 1, transition: "opacity 0.15s", "&:hover": { opacity: monitoringLoading ? 0.7 : 0.88 } }, children: monitoringLoading ? "Starting\u2026" : `\u25B6 Start ${m.label}` })
|
|
1032
|
+
] })
|
|
1033
|
+
] })
|
|
1034
|
+
] })
|
|
1035
|
+
] });
|
|
1036
|
+
})(),
|
|
1037
|
+
monitoringSession && (() => {
|
|
1038
|
+
var _a2;
|
|
1039
|
+
const sessionModeConfig = {
|
|
1040
|
+
listen: { icon: "\u{1F442}", accent: C.blue, accentLt: "#e3f2fd", label: "Listen" },
|
|
1041
|
+
whisper: { icon: "\u{1F5E3}\uFE0F", accent: "#ef6c00", accentLt: "#fff3e0", label: "Whisper" },
|
|
1042
|
+
barge: { icon: "\u{1F4E2}", accent: "#c2185b", accentLt: "#fce4ec", label: "Barge" }
|
|
1043
|
+
};
|
|
1044
|
+
const sm = (_a2 = sessionModeConfig[monitoringSession.mode]) != null ? _a2 : sessionModeConfig.listen;
|
|
1045
|
+
return /* @__PURE__ */ jsxs(Box2, { sx: { position: "fixed", bottom: 20, right: 20, width: 268, background: "#fff", borderRadius: "14px", boxShadow: "0 8px 28px rgba(13,30,53,0.16), 0 2px 6px rgba(13,30,53,0.08)", zIndex: 999, overflow: "hidden", animation: `${slideUp} 0.22s cubic-bezier(.22,.68,0,1.2)` }, children: [
|
|
1046
|
+
/* @__PURE__ */ jsx(Box2, { sx: { height: 3, background: sm.accent } }),
|
|
1047
|
+
/* @__PURE__ */ jsxs(Box2, { sx: { p: "10px 12px" }, children: [
|
|
1048
|
+
/* @__PURE__ */ jsxs(Box2, { sx: { display: "flex", alignItems: "center", gap: "8px", mb: 1 }, children: [
|
|
1049
|
+
/* @__PURE__ */ jsx(Box2, { sx: { width: 8, height: 8, borderRadius: "50%", background: C.green, flexShrink: 0, animation: `${pulse} 1.6s ease infinite` } }),
|
|
1050
|
+
/* @__PURE__ */ jsxs(Box2, { sx: { fontWeight: 700, fontSize: 11, color: C.t1, textTransform: "uppercase", letterSpacing: 0.6 }, children: [
|
|
1051
|
+
sm.icon,
|
|
1052
|
+
" ",
|
|
1053
|
+
sm.label,
|
|
1054
|
+
" Active"
|
|
1055
|
+
] }),
|
|
1056
|
+
/* @__PURE__ */ jsx(Box2, { sx: { ml: "auto", fontFamily: "'JetBrains Mono', monospace", fontSize: 11, fontWeight: 600, color: sm.accent }, children: fmtDur(Math.floor((Date.now() - monitoringSession.startTime) / 1e3)) })
|
|
1057
|
+
] }),
|
|
1058
|
+
/* @__PURE__ */ jsxs(Box2, { sx: { fontSize: 11, color: C.t2, mb: 1, pl: "16px" }, children: [
|
|
1059
|
+
monitoringSession.agentName,
|
|
1060
|
+
/* @__PURE__ */ jsx(Box2, { component: "span", sx: { color: C.t4, mx: 0.5 }, children: "\xB7" }),
|
|
1061
|
+
"ext ",
|
|
1062
|
+
monitoringSession.agentExt
|
|
1063
|
+
] }),
|
|
1064
|
+
/* @__PURE__ */ jsx(Box2, { sx: { borderTop: `1px solid ${C.b1}`, mb: 1 } }),
|
|
1065
|
+
/* @__PURE__ */ jsxs(Box2, { sx: { display: "flex", gap: "5px" }, children: [
|
|
1066
|
+
["listen", "whisper", "barge"].filter((m) => m !== monitoringSession.mode).map((mode) => {
|
|
1067
|
+
const mc = sessionModeConfig[mode];
|
|
1068
|
+
return /* @__PURE__ */ jsxs(MonitorBtn, { variant: mode, onClick: () => handleChangeMode(mode), style: { flex: 1, justifyContent: "center", padding: "4px 0", fontSize: 9, borderRadius: 4 }, children: [
|
|
1069
|
+
mc.icon,
|
|
1070
|
+
" ",
|
|
1071
|
+
mc.label
|
|
1072
|
+
] }, mode);
|
|
1073
|
+
}),
|
|
1074
|
+
/* @__PURE__ */ jsx(MonitorBtn, { variant: "stop", onClick: handleStopMonitoring, style: { flex: 1, justifyContent: "center", padding: "4px 0", fontSize: 9, borderRadius: 4 }, children: "\u23F9 Stop" })
|
|
1075
|
+
] })
|
|
1076
|
+
] })
|
|
1077
|
+
] });
|
|
1078
|
+
})()
|
|
1079
|
+
] });
|
|
1080
|
+
}
|
|
1081
|
+
function LiveStatusPage(props) {
|
|
1082
|
+
return /* @__PURE__ */ jsx(SDKProvider, { children: /* @__PURE__ */ jsx(LiveStatusPageInner, __spreadValues({}, props)) });
|
|
1083
|
+
}
|
|
1084
|
+
export {
|
|
1085
|
+
LiveStatusPage as default
|
|
1086
|
+
};
|
|
1087
|
+
//# sourceMappingURL=liveStatus-IDZ7CPYK.mjs.map
|