ahs-cti 0.0.5 → 0.0.7
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-ZR7U2LLB.mjs +17 -0
- package/dist/{agentPerformanceReport-U2QGVTXF.mjs → agentPerformanceReport-JZK5DN5E.mjs} +59 -57
- package/dist/{agentPerformanceReport-U2QGVTXF.mjs.map → agentPerformanceReport-JZK5DN5E.mjs.map} +1 -1
- package/dist/{auditReport-DEVQDTDT.mjs → auditReport-6ZUJ4UFO.mjs} +5 -5
- package/dist/{callHistory-MRBBY3UO.mjs → callHistory-T3M76D4B.mjs} +147 -156
- package/dist/{callHistory-MRBBY3UO.mjs.map → callHistory-T3M76D4B.mjs.map} +1 -1
- package/dist/{campaigns-ERO3QM6I.mjs → campaigns-5PVHXBSD.mjs} +384 -386
- package/dist/{campaigns-ERO3QM6I.mjs.map → campaigns-5PVHXBSD.mjs.map} +1 -1
- package/dist/{caroQualityAuditDashboard-NRWY6SEC.mjs → caroQualityAuditDashboard-EUDYZ3QY.mjs} +6 -5
- package/dist/{caroQualityAuditDashboard-NRWY6SEC.mjs.map → caroQualityAuditDashboard-EUDYZ3QY.mjs.map} +1 -1
- package/dist/{caroVoiceAI-Z5BDDDSY.mjs → caroVoiceAI-GGJCVUIQ.mjs} +5 -4
- package/dist/{caroVoiceAI-Z5BDDDSY.mjs.map → caroVoiceAI-GGJCVUIQ.mjs.map} +1 -1
- package/dist/{cdrReport-EZNOCELK.mjs → cdrReport-ZMDHSZUW.mjs} +101 -100
- package/dist/{cdrReport-EZNOCELK.mjs.map → cdrReport-ZMDHSZUW.mjs.map} +1 -1
- package/dist/{chunk-53DYH64M.mjs → chunk-2M3YEXYA.mjs} +91 -64
- package/dist/chunk-2M3YEXYA.mjs.map +1 -0
- package/dist/{chunk-ISQBOS5Q.mjs → chunk-33QNSXP7.mjs} +160 -160
- package/dist/{chunk-ISQBOS5Q.mjs.map → chunk-33QNSXP7.mjs.map} +1 -1
- package/dist/{chunk-YFW47Y76.mjs → chunk-3J7KQNEU.mjs} +15 -12
- package/dist/{chunk-YFW47Y76.mjs.map → chunk-3J7KQNEU.mjs.map} +1 -1
- package/dist/{chunk-MBHP7UOP.mjs → chunk-6WLG2PXL.mjs} +2 -2
- package/dist/{chunk-MBXHRFGP.mjs → chunk-7LE2VTAI.mjs} +2 -2
- package/dist/{chunk-MFZKONNR.mjs → chunk-AOJRUZTO.mjs} +2 -2
- package/dist/chunk-DF5EFKXC.mjs +28690 -0
- package/dist/chunk-DF5EFKXC.mjs.map +1 -0
- package/dist/{chunk-5FSMIU5K.mjs → chunk-DJP744FF.mjs} +2 -2
- package/dist/{chunk-BVQNDAS6.mjs → chunk-DNTGBNZD.mjs} +18 -14
- package/dist/{chunk-BVQNDAS6.mjs.map → chunk-DNTGBNZD.mjs.map} +1 -1
- package/dist/{chunk-AJQBR3AZ.mjs → chunk-E6KYWWAI.mjs} +4243 -7804
- package/dist/chunk-E6KYWWAI.mjs.map +1 -0
- package/dist/{chunk-3DOSR6LQ.mjs → chunk-FRKV2U3I.mjs} +2 -2
- package/dist/{chunk-ICGEHYJL.mjs → chunk-H7GRWLYI.mjs} +5 -5
- package/dist/{chunk-6MURUWDX.mjs → chunk-IDZWA6HG.mjs} +154 -156
- package/dist/{chunk-6MURUWDX.mjs.map → chunk-IDZWA6HG.mjs.map} +1 -1
- package/dist/chunk-LHE4QGJJ.mjs +10920 -0
- package/dist/chunk-LHE4QGJJ.mjs.map +1 -0
- package/dist/{chunk-HBR2JS4C.mjs → chunk-NAZO4HKB.mjs} +8 -4
- package/dist/{chunk-HBR2JS4C.mjs.map → chunk-NAZO4HKB.mjs.map} +1 -1
- package/dist/{chunk-DXZIYCNQ.mjs → chunk-OHJIW3I3.mjs} +2 -2
- package/dist/chunk-Q6G3MPS7.mjs +37797 -0
- package/dist/chunk-Q6G3MPS7.mjs.map +1 -0
- package/dist/{chunk-QPOHVXUK.mjs → chunk-U2UDKXMB.mjs} +2 -2
- package/dist/{chunk-XMRM5VR4.mjs → chunk-VBIDPX5Z.mjs} +18 -14
- package/dist/{chunk-XMRM5VR4.mjs.map → chunk-VBIDPX5Z.mjs.map} +1 -1
- package/dist/{chunk-6ICPXSN6.mjs → chunk-VVDJLUYT.mjs} +8 -4
- package/dist/{chunk-6ICPXSN6.mjs.map → chunk-VVDJLUYT.mjs.map} +1 -1
- package/dist/{chunk-XA5SCAZJ.mjs → chunk-WTBVFN4H.mjs} +2 -2
- package/dist/{chunk-RSL5OBRQ.mjs → chunk-YAQYTUTX.mjs} +2 -2
- package/dist/index.js +117240 -32148
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +276 -296
- package/dist/index.mjs.map +1 -1
- package/dist/{liveStatus-F6AKCC27.mjs → liveStatus-YSBYSVOO.mjs} +123 -122
- package/dist/{liveStatus-F6AKCC27.mjs.map → liveStatus-YSBYSVOO.mjs.map} +1 -1
- package/dist/{loginReport-MWTI4G6O.mjs → loginReport-YIVBJVJD.mjs} +118 -116
- package/dist/{loginReport-MWTI4G6O.mjs.map → loginReport-YIVBJVJD.mjs.map} +1 -1
- package/dist/managementDashboard-7EMQC2UA.mjs +536 -0
- package/dist/{managementDashboard-6UBOCLBA.mjs.map → managementDashboard-7EMQC2UA.mjs.map} +1 -1
- package/dist/{qualityAuditDashboard-ZJEEAMBS.mjs → qualityAuditDashboard-ENGQN2WQ.mjs} +6 -5
- package/dist/{qualityAuditDashboard-ZJEEAMBS.mjs.map → qualityAuditDashboard-ENGQN2WQ.mjs.map} +1 -1
- package/package.json +1 -1
- package/dist/agentDetailReport-F7XZLVVO.mjs +0 -16
- package/dist/chunk-53DYH64M.mjs.map +0 -1
- package/dist/chunk-AJQBR3AZ.mjs.map +0 -1
- package/dist/chunk-Q7FIRWF2.mjs +0 -1067
- package/dist/chunk-Q7FIRWF2.mjs.map +0 -1
- package/dist/chunk-UB5HSUGK.mjs +0 -65
- package/dist/chunk-UB5HSUGK.mjs.map +0 -1
- package/dist/managementDashboard-6UBOCLBA.mjs +0 -536
- /package/dist/{agentDetailReport-F7XZLVVO.mjs.map → agentDetailReport-ZR7U2LLB.mjs.map} +0 -0
- /package/dist/{auditReport-DEVQDTDT.mjs.map → auditReport-6ZUJ4UFO.mjs.map} +0 -0
- /package/dist/{chunk-MBHP7UOP.mjs.map → chunk-6WLG2PXL.mjs.map} +0 -0
- /package/dist/{chunk-MBXHRFGP.mjs.map → chunk-7LE2VTAI.mjs.map} +0 -0
- /package/dist/{chunk-MFZKONNR.mjs.map → chunk-AOJRUZTO.mjs.map} +0 -0
- /package/dist/{chunk-5FSMIU5K.mjs.map → chunk-DJP744FF.mjs.map} +0 -0
- /package/dist/{chunk-3DOSR6LQ.mjs.map → chunk-FRKV2U3I.mjs.map} +0 -0
- /package/dist/{chunk-ICGEHYJL.mjs.map → chunk-H7GRWLYI.mjs.map} +0 -0
- /package/dist/{chunk-DXZIYCNQ.mjs.map → chunk-OHJIW3I3.mjs.map} +0 -0
- /package/dist/{chunk-QPOHVXUK.mjs.map → chunk-U2UDKXMB.mjs.map} +0 -0
- /package/dist/{chunk-XA5SCAZJ.mjs.map → chunk-WTBVFN4H.mjs.map} +0 -0
- /package/dist/{chunk-RSL5OBRQ.mjs.map → chunk-YAQYTUTX.mjs.map} +0 -0
|
@@ -1,71 +1,71 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Bar,
|
|
3
|
+
BarChart,
|
|
4
|
+
CartesianGrid,
|
|
5
|
+
Cell,
|
|
6
|
+
LabelList,
|
|
7
|
+
Legend,
|
|
8
|
+
Pie,
|
|
9
|
+
PieChart,
|
|
10
|
+
ResponsiveContainer,
|
|
11
|
+
Tooltip,
|
|
12
|
+
XAxis,
|
|
13
|
+
YAxis
|
|
14
|
+
} from "./chunk-DF5EFKXC.mjs";
|
|
1
15
|
import {
|
|
2
16
|
FileDownload_default
|
|
3
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-AOJRUZTO.mjs";
|
|
4
18
|
import {
|
|
5
19
|
PlayArrow_default
|
|
6
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-7LE2VTAI.mjs";
|
|
7
21
|
import {
|
|
8
22
|
PageHeader
|
|
9
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-VBIDPX5Z.mjs";
|
|
10
24
|
import {
|
|
11
25
|
AppButton
|
|
12
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-NAZO4HKB.mjs";
|
|
13
27
|
import {
|
|
14
28
|
AdapterDayjs,
|
|
15
29
|
DateRangePicker,
|
|
16
|
-
LocalizationProvider
|
|
17
|
-
|
|
30
|
+
LocalizationProvider,
|
|
31
|
+
require_dayjs_min
|
|
32
|
+
} from "./chunk-E6KYWWAI.mjs";
|
|
18
33
|
import {
|
|
19
34
|
Refresh_default,
|
|
20
35
|
Search_default
|
|
21
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-YAQYTUTX.mjs";
|
|
22
37
|
import {
|
|
23
38
|
SDKProvider
|
|
24
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-VVDJLUYT.mjs";
|
|
25
40
|
import {
|
|
26
41
|
END_POINT,
|
|
27
42
|
axios_default,
|
|
28
43
|
deepFindArray,
|
|
29
44
|
sdkStateManager
|
|
30
|
-
} from "./chunk-
|
|
45
|
+
} from "./chunk-LHE4QGJJ.mjs";
|
|
31
46
|
import {
|
|
47
|
+
Alert_default,
|
|
48
|
+
Box_default,
|
|
49
|
+
Chip_default,
|
|
50
|
+
CircularProgress_default,
|
|
51
|
+
IconButton_default,
|
|
52
|
+
TableBody_default,
|
|
53
|
+
TableCell_default,
|
|
54
|
+
TableContainer_default,
|
|
55
|
+
TableHead_default,
|
|
56
|
+
TablePagination_default,
|
|
57
|
+
TableRow_default,
|
|
58
|
+
Table_default,
|
|
59
|
+
Tooltip_default,
|
|
60
|
+
Typography_default,
|
|
32
61
|
__spreadProps,
|
|
33
|
-
__spreadValues
|
|
34
|
-
|
|
62
|
+
__spreadValues,
|
|
63
|
+
__toESM
|
|
64
|
+
} from "./chunk-Q6G3MPS7.mjs";
|
|
35
65
|
|
|
36
66
|
// call-control-sdk/lib/pages/agentDetailReport/index.tsx
|
|
37
67
|
import { useState as useState2, useEffect, useMemo, useCallback as useCallback2 } from "react";
|
|
38
|
-
|
|
39
|
-
Box,
|
|
40
|
-
Typography,
|
|
41
|
-
Table,
|
|
42
|
-
TableBody,
|
|
43
|
-
TableCell,
|
|
44
|
-
TableContainer,
|
|
45
|
-
TableHead,
|
|
46
|
-
TableRow,
|
|
47
|
-
TablePagination,
|
|
48
|
-
IconButton,
|
|
49
|
-
Chip,
|
|
50
|
-
CircularProgress,
|
|
51
|
-
Alert
|
|
52
|
-
} from "@mui/material";
|
|
53
|
-
import Tooltip from "@mui/material/Tooltip";
|
|
54
|
-
import {
|
|
55
|
-
BarChart,
|
|
56
|
-
Bar,
|
|
57
|
-
XAxis,
|
|
58
|
-
YAxis,
|
|
59
|
-
CartesianGrid,
|
|
60
|
-
Tooltip as RTooltip,
|
|
61
|
-
PieChart,
|
|
62
|
-
Pie,
|
|
63
|
-
Cell,
|
|
64
|
-
Legend,
|
|
65
|
-
ResponsiveContainer,
|
|
66
|
-
LabelList
|
|
67
|
-
} from "recharts";
|
|
68
|
-
import dayjs from "dayjs";
|
|
68
|
+
var import_dayjs = __toESM(require_dayjs_min());
|
|
69
69
|
|
|
70
70
|
// call-control-sdk/lib/pages/agentDetailReport/useAgentDetailReport.ts
|
|
71
71
|
import { useCallback, useState } from "react";
|
|
@@ -138,7 +138,7 @@ var C = {
|
|
|
138
138
|
var monoSx = { fontFamily: "'JetBrains Mono', monospace", fontSize: 11, fontWeight: 600 };
|
|
139
139
|
var QUEUE_COLORS = [C.blue, C.green, C.purple, C.amber, C.teal, C.red, C.navy];
|
|
140
140
|
function StatCard({ value, label, color }) {
|
|
141
|
-
return /* @__PURE__ */ jsxs(
|
|
141
|
+
return /* @__PURE__ */ jsxs(Box_default, { sx: {
|
|
142
142
|
px: 1.5,
|
|
143
143
|
py: 1.2,
|
|
144
144
|
borderRadius: "10px",
|
|
@@ -148,15 +148,15 @@ function StatCard({ value, label, color }) {
|
|
|
148
148
|
borderLeftStyle: "solid",
|
|
149
149
|
borderLeftColor: color
|
|
150
150
|
}, children: [
|
|
151
|
-
/* @__PURE__ */ jsx(
|
|
152
|
-
/* @__PURE__ */ jsx(
|
|
151
|
+
/* @__PURE__ */ jsx(Typography_default, { sx: { fontFamily: "poppins, Arial, sans-serif", fontSize: "0.72rem", fontWeight: 600, color: "#888", mb: 0.3 }, children: label }),
|
|
152
|
+
/* @__PURE__ */ jsx(Typography_default, { sx: { fontFamily: "poppins, Arial, sans-serif", fontSize: "0.95rem", fontWeight: 700, color: "#1a1a1a" }, children: value })
|
|
153
153
|
] });
|
|
154
154
|
}
|
|
155
155
|
function StatusChip({ status }) {
|
|
156
156
|
const s = status == null ? void 0 : status.toLowerCase();
|
|
157
157
|
const isAns = s === "answered";
|
|
158
158
|
const isAband = s === "abandoned";
|
|
159
|
-
return /* @__PURE__ */ jsx(
|
|
159
|
+
return /* @__PURE__ */ jsx(Chip_default, { label: status || "\u2014", size: "small", sx: {
|
|
160
160
|
fontSize: 11,
|
|
161
161
|
fontWeight: 700,
|
|
162
162
|
height: 22,
|
|
@@ -168,7 +168,7 @@ function StatusChip({ status }) {
|
|
|
168
168
|
}
|
|
169
169
|
function CallTypeChip({ type }) {
|
|
170
170
|
const isIn = (type == null ? void 0 : type.toLowerCase()) === "inbound";
|
|
171
|
-
return /* @__PURE__ */ jsx(
|
|
171
|
+
return /* @__PURE__ */ jsx(Chip_default, { label: type || "\u2014", size: "small", sx: {
|
|
172
172
|
fontSize: 11,
|
|
173
173
|
fontWeight: 700,
|
|
174
174
|
height: 22,
|
|
@@ -183,9 +183,9 @@ function RecordingCell({ callUuid, recordingPath }) {
|
|
|
183
183
|
const [loading, setLoading] = useState2(false);
|
|
184
184
|
const [error, setError] = useState2(false);
|
|
185
185
|
if (!recordingPath) {
|
|
186
|
-
return /* @__PURE__ */ jsxs(
|
|
187
|
-
/* @__PURE__ */ jsx(
|
|
188
|
-
/* @__PURE__ */ jsx(
|
|
186
|
+
return /* @__PURE__ */ jsxs(Box_default, { sx: { display: "flex", alignItems: "center", gap: 0.3 }, children: [
|
|
187
|
+
/* @__PURE__ */ jsx(Tooltip_default, { title: "No recording available", children: /* @__PURE__ */ jsx("span", { children: /* @__PURE__ */ jsx(IconButton_default, { size: "small", disabled: true, sx: { p: 0.4 }, children: /* @__PURE__ */ jsx(PlayArrow_default, { sx: { fontSize: 16 } }) }) }) }),
|
|
188
|
+
/* @__PURE__ */ jsx(Tooltip_default, { title: "No recording available", children: /* @__PURE__ */ jsx("span", { children: /* @__PURE__ */ jsx(IconButton_default, { size: "small", disabled: true, sx: { p: 0.4 }, children: /* @__PURE__ */ jsx(FileDownload_default, { sx: { fontSize: 16 } }) }) }) })
|
|
189
189
|
] });
|
|
190
190
|
}
|
|
191
191
|
const handlePlay = async () => {
|
|
@@ -215,7 +215,7 @@ function RecordingCell({ callUuid, recordingPath }) {
|
|
|
215
215
|
}
|
|
216
216
|
};
|
|
217
217
|
if (audioUrl) {
|
|
218
|
-
return /* @__PURE__ */ jsxs(
|
|
218
|
+
return /* @__PURE__ */ jsxs(Box_default, { sx: { display: "flex", alignItems: "center", gap: 0.5 }, children: [
|
|
219
219
|
/* @__PURE__ */ jsx(
|
|
220
220
|
"audio",
|
|
221
221
|
{
|
|
@@ -229,13 +229,13 @@ function RecordingCell({ callUuid, recordingPath }) {
|
|
|
229
229
|
style: { width: 140, height: 30 }
|
|
230
230
|
}
|
|
231
231
|
),
|
|
232
|
-
/* @__PURE__ */ jsx(
|
|
232
|
+
/* @__PURE__ */ jsx(Tooltip_default, { title: "Download", children: /* @__PURE__ */ jsx(IconButton_default, { size: "small", onClick: handleDownload, sx: { color: C.blue, p: 0.4 }, children: /* @__PURE__ */ jsx(FileDownload_default, { sx: { fontSize: 16 } }) }) })
|
|
233
233
|
] });
|
|
234
234
|
}
|
|
235
|
-
return /* @__PURE__ */ jsxs(
|
|
236
|
-
/* @__PURE__ */ jsx(
|
|
237
|
-
/* @__PURE__ */ jsx(
|
|
238
|
-
error && /* @__PURE__ */ jsx(
|
|
235
|
+
return /* @__PURE__ */ jsxs(Box_default, { sx: { display: "flex", alignItems: "center", gap: 0.3 }, children: [
|
|
236
|
+
/* @__PURE__ */ jsx(Tooltip_default, { title: error ? "Recording unavailable" : "Play", children: /* @__PURE__ */ jsx("span", { children: /* @__PURE__ */ jsx(IconButton_default, { size: "small", onClick: handlePlay, disabled: loading || error, sx: { color: C.green, p: 0.4 }, children: loading ? /* @__PURE__ */ jsx(CircularProgress_default, { size: 14 }) : /* @__PURE__ */ jsx(PlayArrow_default, { sx: { fontSize: 16 } }) }) }) }),
|
|
237
|
+
/* @__PURE__ */ jsx(Tooltip_default, { title: error ? "Recording unavailable" : "Download", children: /* @__PURE__ */ jsx("span", { children: /* @__PURE__ */ jsx(IconButton_default, { size: "small", onClick: handleDownload, disabled: loading || error, sx: { color: C.blue, p: 0.4 }, children: /* @__PURE__ */ jsx(FileDownload_default, { sx: { fontSize: 16 } }) }) }) }),
|
|
238
|
+
error && /* @__PURE__ */ jsx(Chip_default, { label: "No File", size: "small", sx: { fontSize: "0.6rem", height: 18 } })
|
|
239
239
|
] });
|
|
240
240
|
}
|
|
241
241
|
var cdrHeadSx = {
|
|
@@ -253,8 +253,8 @@ function AgentDetailReportContent({ agentRow: propAgentRow, onBack, from, initia
|
|
|
253
253
|
const isFromReportsList = from === "REPORTS_LIST";
|
|
254
254
|
const agentIdFromRow = isFromReportsList ? ((_a = agentRow == null ? void 0 : agentRow.agentDetails) == null ? void 0 : _a.agentId) || "" : sdkStateManager.getState().agentId || ((_b = agentRow == null ? void 0 : agentRow.agentDetails) == null ? void 0 : _b.agentId) || "";
|
|
255
255
|
const [quickRange, setQuickRange] = useState2(initialQuickRange || "today");
|
|
256
|
-
const [startDate, setStartDate] = useState2(initialStartDate != null ? initialStartDate :
|
|
257
|
-
const [endDate, setEndDate] = useState2(initialEndDate != null ? initialEndDate :
|
|
256
|
+
const [startDate, setStartDate] = useState2(initialStartDate != null ? initialStartDate : (0, import_dayjs.default)());
|
|
257
|
+
const [endDate, setEndDate] = useState2(initialEndDate != null ? initialEndDate : (0, import_dayjs.default)());
|
|
258
258
|
const syncFilterToUrl = (_sd, _ed, _range) => {
|
|
259
259
|
};
|
|
260
260
|
const [activeTab, setActiveTab] = useState2(0);
|
|
@@ -272,7 +272,7 @@ function AgentDetailReportContent({ agentRow: propAgentRow, onBack, from, initia
|
|
|
272
272
|
const showInitialSpinner = !isFromReportsList && detailLoading && !profile && !((_d = agentRow == null ? void 0 : agentRow.agentDetails) == null ? void 0 : _d.fullName);
|
|
273
273
|
const setQuick = (range) => {
|
|
274
274
|
setQuickRange(range);
|
|
275
|
-
const today =
|
|
275
|
+
const today = (0, import_dayjs.default)();
|
|
276
276
|
let sd = today;
|
|
277
277
|
const ed = today;
|
|
278
278
|
if (range === "week") sd = today.startOf("week");
|
|
@@ -288,7 +288,7 @@ function AgentDetailReportContent({ agentRow: propAgentRow, onBack, from, initia
|
|
|
288
288
|
setDetailError("");
|
|
289
289
|
const res = await getAgentDetailReport(agentIdFromRow, {
|
|
290
290
|
start_date: sd.startOf("day").format("YYYY-MM-DDTHH:mm:ss"),
|
|
291
|
-
end_date: ed.isSame(
|
|
291
|
+
end_date: ed.isSame((0, import_dayjs.default)(), "day") ? (0, import_dayjs.default)().format("YYYY-MM-DDTHH:mm:ss") : ed.endOf("day").format("YYYY-MM-DDTHH:mm:ss")
|
|
292
292
|
});
|
|
293
293
|
setDetail(res);
|
|
294
294
|
} catch (err) {
|
|
@@ -305,7 +305,7 @@ function AgentDetailReportContent({ agentRow: propAgentRow, onBack, from, initia
|
|
|
305
305
|
setCdrError("");
|
|
306
306
|
const params = {
|
|
307
307
|
start_date: sd.startOf("day").format("YYYY-MM-DDTHH:mm:ss"),
|
|
308
|
-
end_date: ed.isSame(
|
|
308
|
+
end_date: ed.isSame((0, import_dayjs.default)(), "day") ? (0, import_dayjs.default)().format("YYYY-MM-DDTHH:mm:ss") : ed.endOf("day").format("YYYY-MM-DDTHH:mm:ss"),
|
|
309
309
|
search: agentIdFromRow,
|
|
310
310
|
page: page + 1,
|
|
311
311
|
pageSize
|
|
@@ -386,7 +386,7 @@ function AgentDetailReportContent({ agentRow: propAgentRow, onBack, from, initia
|
|
|
386
386
|
}, [detail]);
|
|
387
387
|
const hourlyChartTitle = useMemo(() => {
|
|
388
388
|
if (quickRange === "today") return "Hourly Call Volume \u2014 Today";
|
|
389
|
-
if (quickRange === "month") return `Hourly Call Volume \u2014 ${
|
|
389
|
+
if (quickRange === "month") return `Hourly Call Volume \u2014 ${(0, import_dayjs.default)().format("MMMM YYYY")}`;
|
|
390
390
|
if (quickRange === "week") return "Hourly Call Volume \u2014 This Week";
|
|
391
391
|
if (startDate && endDate) {
|
|
392
392
|
if (startDate.isSame(endDate, "day")) return `Hourly Call Volume \u2014 ${startDate.format("DD MMM YYYY")}`;
|
|
@@ -398,16 +398,16 @@ function AgentDetailReportContent({ agentRow: propAgentRow, onBack, from, initia
|
|
|
398
398
|
onBack == null ? void 0 : onBack();
|
|
399
399
|
}, [onBack]);
|
|
400
400
|
if (!agentIdFromRow) {
|
|
401
|
-
return /* @__PURE__ */ jsxs(
|
|
402
|
-
/* @__PURE__ */ jsx(
|
|
401
|
+
return /* @__PURE__ */ jsxs(Box_default, { sx: { p: 4, textAlign: "center" }, children: [
|
|
402
|
+
/* @__PURE__ */ jsx(Typography_default, { sx: { color: C.t3, mb: 2 }, children: "No agent selected." }),
|
|
403
403
|
isFromReportsList && /* @__PURE__ */ jsx(AppButton, { onClick: handleBack, children: "Go Back" })
|
|
404
404
|
] });
|
|
405
405
|
}
|
|
406
406
|
if (showInitialSpinner) {
|
|
407
|
-
return /* @__PURE__ */ jsx(
|
|
407
|
+
return /* @__PURE__ */ jsx(Box_default, { sx: { display: "flex", alignItems: "center", justifyContent: "center", minHeight: 400 }, children: /* @__PURE__ */ jsx(CircularProgress_default, { size: 36 }) });
|
|
408
408
|
}
|
|
409
409
|
const tabs = ["Overview", "Call History", "Break Details"];
|
|
410
|
-
return /* @__PURE__ */ jsx(LocalizationProvider, { dateAdapter: AdapterDayjs, children: /* @__PURE__ */ jsxs(
|
|
410
|
+
return /* @__PURE__ */ jsx(LocalizationProvider, { dateAdapter: AdapterDayjs, children: /* @__PURE__ */ jsxs(Box_default, { sx: { background: C.bg, minHeight: "100vh" }, children: [
|
|
411
411
|
/* @__PURE__ */ jsx(
|
|
412
412
|
PageHeader,
|
|
413
413
|
{
|
|
@@ -416,7 +416,7 @@ function AgentDetailReportContent({ agentRow: propAgentRow, onBack, from, initia
|
|
|
416
416
|
onBack: handleBack
|
|
417
417
|
}
|
|
418
418
|
),
|
|
419
|
-
/* @__PURE__ */ jsxs(
|
|
419
|
+
/* @__PURE__ */ jsxs(Box_default, { sx: { display: "flex", alignItems: "center", gap: 1, flexWrap: "wrap", pb: 1.5, px: 2 }, children: [
|
|
420
420
|
/* @__PURE__ */ jsx(
|
|
421
421
|
DateRangePicker,
|
|
422
422
|
{
|
|
@@ -439,10 +439,10 @@ function AgentDetailReportContent({ agentRow: propAgentRow, onBack, from, initia
|
|
|
439
439
|
/* @__PURE__ */ jsx(AppButton, { variant: quickRange === "week" ? "primary" : "outlined", onClick: () => setQuick("week"), sx: { whiteSpace: "nowrap" }, children: "This Week" }),
|
|
440
440
|
/* @__PURE__ */ jsx(AppButton, { variant: quickRange === "month" ? "primary" : "outlined", onClick: () => setQuick("month"), sx: { whiteSpace: "nowrap" }, children: "This Month" })
|
|
441
441
|
] }),
|
|
442
|
-
/* @__PURE__ */ jsxs(
|
|
443
|
-
detailLoading && /* @__PURE__ */ jsx(
|
|
444
|
-
detailError && /* @__PURE__ */ jsx(
|
|
445
|
-
/* @__PURE__ */ jsx(
|
|
442
|
+
/* @__PURE__ */ jsxs(Box_default, { sx: { py: 2, px: 2, position: "relative" }, children: [
|
|
443
|
+
detailLoading && /* @__PURE__ */ jsx(Box_default, { sx: { position: "absolute", top: 0, left: 0, right: 0, bottom: 0, background: "rgba(240,244,248,0.7)", display: "flex", alignItems: "center", justifyContent: "center", zIndex: 10 }, children: /* @__PURE__ */ jsx(CircularProgress_default, {}) }),
|
|
444
|
+
detailError && /* @__PURE__ */ jsx(Alert_default, { severity: "error", sx: { mb: 2 }, onClose: () => setDetailError(""), children: detailError }),
|
|
445
|
+
/* @__PURE__ */ jsx(Box_default, { sx: { display: "grid", gridTemplateColumns: { xs: "1fr 1fr", sm: "repeat(3, 1fr)", md: "repeat(5, 1fr)" }, gap: 1.5, mb: 2 }, children: [
|
|
446
446
|
{ v: (_e = profile == null ? void 0 : profile.totalCalls) != null ? _e : 0, l: "Total Calls", c: C.navy },
|
|
447
447
|
{ v: (_f = profile == null ? void 0 : profile.answeredCalls) != null ? _f : 0, l: "Answered", c: C.green },
|
|
448
448
|
{ v: (_g = profile == null ? void 0 : profile.missedCalls) != null ? _g : 0, l: "Missed", c: C.red },
|
|
@@ -453,7 +453,7 @@ function AgentDetailReportContent({ agentRow: propAgentRow, onBack, from, initia
|
|
|
453
453
|
{ v: (profile == null ? void 0 : profile.handleTimeFormatted) || "00:00:00", l: "Handle Time", c: C.purple },
|
|
454
454
|
{ v: (profile == null ? void 0 : profile.breakTimeFormatted) || "00:00:00", l: "Break Time", c: C.amber },
|
|
455
455
|
{ v: `${((_i = profile == null ? void 0 : profile.adherencePct) != null ? _i : 0).toFixed(1)}%`, l: `Adherence${(profile == null ? void 0 : profile.adherenceGrade) ? ` (${profile.adherenceGrade})` : ""}`, c: C.teal }
|
|
456
|
-
].map((kpi, i) => /* @__PURE__ */ jsxs(
|
|
456
|
+
].map((kpi, i) => /* @__PURE__ */ jsxs(Box_default, { sx: {
|
|
457
457
|
px: 1.5,
|
|
458
458
|
py: 1.2,
|
|
459
459
|
borderRadius: "10px",
|
|
@@ -464,23 +464,23 @@ function AgentDetailReportContent({ agentRow: propAgentRow, onBack, from, initia
|
|
|
464
464
|
borderLeftStyle: "solid",
|
|
465
465
|
borderLeftColor: kpi.c
|
|
466
466
|
}, children: [
|
|
467
|
-
/* @__PURE__ */ jsx(
|
|
467
|
+
/* @__PURE__ */ jsx(Typography_default, { sx: {
|
|
468
468
|
fontFamily: "poppins, Arial, sans-serif",
|
|
469
469
|
fontSize: "0.72rem",
|
|
470
470
|
fontWeight: 600,
|
|
471
471
|
color: "#888",
|
|
472
472
|
mb: 0.3
|
|
473
473
|
}, children: kpi.l }),
|
|
474
|
-
/* @__PURE__ */ jsx(
|
|
474
|
+
/* @__PURE__ */ jsx(Typography_default, { sx: {
|
|
475
475
|
fontFamily: "poppins, Arial, sans-serif",
|
|
476
476
|
fontSize: "0.95rem",
|
|
477
477
|
fontWeight: 700,
|
|
478
478
|
color: "#1a1a1a"
|
|
479
479
|
}, children: kpi.v })
|
|
480
480
|
] }, i)) }),
|
|
481
|
-
/* @__PURE__ */ jsxs(
|
|
482
|
-
/* @__PURE__ */ jsx(
|
|
483
|
-
|
|
481
|
+
/* @__PURE__ */ jsxs(Box_default, { sx: { display: "flex", alignItems: { xs: "flex-start", sm: "center" }, justifyContent: "space-between", flexDirection: { xs: "column", sm: "row" }, gap: 1, borderBottom: `2px solid ${C.b1}`, mb: 2 }, children: [
|
|
482
|
+
/* @__PURE__ */ jsx(Box_default, { sx: { display: "flex", gap: 0.5, flexWrap: "wrap" }, children: tabs.map((tab, idx) => /* @__PURE__ */ jsx(
|
|
483
|
+
Box_default,
|
|
484
484
|
{
|
|
485
485
|
onClick: () => setActiveTab(idx),
|
|
486
486
|
sx: {
|
|
@@ -499,7 +499,7 @@ function AgentDetailReportContent({ agentRow: propAgentRow, onBack, from, initia
|
|
|
499
499
|
},
|
|
500
500
|
tab
|
|
501
501
|
)) }),
|
|
502
|
-
/* @__PURE__ */ jsxs(
|
|
502
|
+
/* @__PURE__ */ jsxs(Box_default, { sx: { display: "flex", alignItems: "center", gap: 0.5, mb: "-2px" }, children: [
|
|
503
503
|
/* @__PURE__ */ jsx(
|
|
504
504
|
AppButton,
|
|
505
505
|
{
|
|
@@ -513,43 +513,43 @@ function AgentDetailReportContent({ agentRow: propAgentRow, onBack, from, initia
|
|
|
513
513
|
/* @__PURE__ */ jsx(AppButton, { size: "small", startIcon: /* @__PURE__ */ jsx(Search_default, {}), onClick: () => handleSearch(), children: "Search" })
|
|
514
514
|
] })
|
|
515
515
|
] }),
|
|
516
|
-
activeTab === 0 && /* @__PURE__ */ jsxs(
|
|
517
|
-
/* @__PURE__ */ jsxs(
|
|
518
|
-
/* @__PURE__ */ jsxs(
|
|
519
|
-
/* @__PURE__ */ jsxs(
|
|
520
|
-
/* @__PURE__ */ jsx(
|
|
521
|
-
/* @__PURE__ */ jsx(
|
|
516
|
+
activeTab === 0 && /* @__PURE__ */ jsxs(Box_default, { children: [
|
|
517
|
+
/* @__PURE__ */ jsxs(Box_default, { sx: { display: "grid", gridTemplateColumns: { xs: "1fr", md: "1fr 1fr" }, gap: 2, mb: 2 }, children: [
|
|
518
|
+
/* @__PURE__ */ jsxs(Box_default, { sx: { border: `1px solid ${C.b1}`, borderRadius: "10px", overflow: "hidden", background: "transparent" }, children: [
|
|
519
|
+
/* @__PURE__ */ jsxs(Box_default, { sx: { px: 2, py: 1.2, background: C.s2, borderBottom: `1px solid ${C.b1}`, display: "flex", alignItems: "center", justifyContent: "space-between" }, children: [
|
|
520
|
+
/* @__PURE__ */ jsx(Typography_default, { sx: { fontSize: 12, fontWeight: 700, letterSpacing: 0.8, textTransform: "uppercase", color: C.t2 }, children: hourlyChartTitle }),
|
|
521
|
+
/* @__PURE__ */ jsx(Chip_default, { label: agentName, size: "small", sx: { fontSize: 11, fontWeight: 700, background: C.blt, color: C.blue, border: `1px solid rgba(21,101,200,.2)` } })
|
|
522
522
|
] }),
|
|
523
|
-
/* @__PURE__ */ jsx(
|
|
523
|
+
/* @__PURE__ */ jsx(Box_default, { sx: { p: 2, height: 260 }, children: /* @__PURE__ */ jsx(ResponsiveContainer, { width: "100%", height: "100%", children: /* @__PURE__ */ jsxs(BarChart, { data: hourlyCallData, barGap: 1, children: [
|
|
524
524
|
/* @__PURE__ */ jsx(CartesianGrid, { strokeDasharray: "3 3", stroke: C.b1 }),
|
|
525
525
|
/* @__PURE__ */ jsx(XAxis, { dataKey: "hour", tick: { fontSize: 11, fill: C.t3 } }),
|
|
526
526
|
/* @__PURE__ */ jsx(YAxis, { tick: { fontSize: 11, fill: C.t3 }, allowDecimals: false }),
|
|
527
|
-
/* @__PURE__ */ jsx(
|
|
527
|
+
/* @__PURE__ */ jsx(Tooltip, { labelFormatter: (label) => `${String(label).padStart(2, "0")}:00`, contentStyle: { fontSize: 12, borderRadius: 8, border: `1px solid ${C.b2}` } }),
|
|
528
528
|
/* @__PURE__ */ jsx(Legend, { wrapperStyle: { fontSize: 11 } }),
|
|
529
529
|
/* @__PURE__ */ jsx(Bar, { dataKey: "answered", name: "Answered", fill: C.blue, radius: [3, 3, 0, 0] }),
|
|
530
530
|
/* @__PURE__ */ jsx(Bar, { dataKey: "abandoned", name: "Abandoned", fill: C.red, radius: [3, 3, 0, 0] })
|
|
531
531
|
] }) }) })
|
|
532
532
|
] }),
|
|
533
|
-
/* @__PURE__ */ jsxs(
|
|
534
|
-
/* @__PURE__ */ jsx(
|
|
535
|
-
/* @__PURE__ */ jsx(
|
|
533
|
+
/* @__PURE__ */ jsxs(Box_default, { sx: { border: `1px solid ${C.b1}`, borderRadius: "10px", overflow: "hidden", background: "transparent" }, children: [
|
|
534
|
+
/* @__PURE__ */ jsx(Box_default, { sx: { px: 2, py: 1.2, background: C.s2, borderBottom: `1px solid ${C.b1}` }, children: /* @__PURE__ */ jsx(Typography_default, { sx: { fontSize: 12, fontWeight: 700, letterSpacing: 0.8, textTransform: "uppercase", color: C.t2 }, children: "Time Utilisation Breakdown" }) }),
|
|
535
|
+
/* @__PURE__ */ jsx(Box_default, { sx: { p: 2, height: 260 }, children: timeUtilData.length > 0 ? /* @__PURE__ */ jsx(ResponsiveContainer, { width: "100%", height: "100%", children: /* @__PURE__ */ jsxs(PieChart, { children: [
|
|
536
536
|
/* @__PURE__ */ jsx(Pie, { data: timeUtilData, cx: "50%", cy: "50%", innerRadius: 60, outerRadius: 95, dataKey: "value", nameKey: "name", minAngle: 8, children: timeUtilData.map((entry, idx) => /* @__PURE__ */ jsx(Cell, { fill: entry.color }, idx)) }),
|
|
537
|
-
/* @__PURE__ */ jsx(
|
|
537
|
+
/* @__PURE__ */ jsx(Tooltip, { formatter: (_val, name, entry) => [`${entry.payload.formatted} (${entry.payload.pct.toFixed(1)}%)`, name], contentStyle: { fontSize: 12, borderRadius: 8, border: `1px solid ${C.b2}` } }),
|
|
538
538
|
/* @__PURE__ */ jsx(Legend, { wrapperStyle: { fontSize: 12 }, formatter: (value) => /* @__PURE__ */ jsx("span", { style: { color: C.t1, fontWeight: 500 }, children: value }) })
|
|
539
|
-
] }) }) : /* @__PURE__ */ jsx(
|
|
539
|
+
] }) }) : /* @__PURE__ */ jsx(Box_default, { sx: { display: "flex", alignItems: "center", justifyContent: "center", height: "100%", color: C.t3, fontSize: 13 }, children: "No data" }) })
|
|
540
540
|
] })
|
|
541
541
|
] }),
|
|
542
|
-
/* @__PURE__ */ jsxs(
|
|
543
|
-
/* @__PURE__ */ jsxs(
|
|
544
|
-
/* @__PURE__ */ jsx(
|
|
545
|
-
/* @__PURE__ */ jsx(
|
|
542
|
+
/* @__PURE__ */ jsxs(Box_default, { sx: { border: `1px solid ${C.b1}`, borderRadius: "10px", overflow: "hidden", background: "transparent", mb: 2 }, children: [
|
|
543
|
+
/* @__PURE__ */ jsxs(Box_default, { sx: { px: 2, py: 1.2, background: C.s2, borderBottom: `1px solid ${C.b1}`, display: "flex", alignItems: "center", justifyContent: "space-between" }, children: [
|
|
544
|
+
/* @__PURE__ */ jsx(Typography_default, { sx: { fontSize: 12, fontWeight: 700, letterSpacing: 0.8, textTransform: "uppercase", color: C.t2 }, children: "Talk Duration Distribution" }),
|
|
545
|
+
/* @__PURE__ */ jsx(Chip_default, { label: `${talkDurationTotal} call${talkDurationTotal === 1 ? "" : "s"}`, size: "small", sx: { fontSize: 11, fontWeight: 700, background: C.glt, color: C.green, border: `1px solid rgba(10,154,98,.2)` } })
|
|
546
546
|
] }),
|
|
547
|
-
/* @__PURE__ */ jsx(
|
|
547
|
+
/* @__PURE__ */ jsx(Box_default, { sx: { p: 2, height: 260 }, children: talkDurationBuckets.length > 0 ? /* @__PURE__ */ jsx(ResponsiveContainer, { width: "100%", height: "100%", children: /* @__PURE__ */ jsxs(BarChart, { data: talkDurationBuckets, margin: { top: 16, right: 16, left: 0, bottom: 20 }, children: [
|
|
548
548
|
/* @__PURE__ */ jsx(CartesianGrid, { strokeDasharray: "3 3", stroke: C.b1 }),
|
|
549
549
|
/* @__PURE__ */ jsx(XAxis, { dataKey: "bucket", tick: { fontSize: 11, fill: C.t3 }, label: { value: "Talking Duration", position: "insideBottom", offset: -5, style: { fontSize: 11, fontWeight: 600, fill: C.t2 } } }),
|
|
550
550
|
/* @__PURE__ */ jsx(YAxis, { tick: { fontSize: 11, fill: C.t3 }, allowDecimals: false, label: { value: "Call Count", angle: -90, position: "insideLeft", offset: 10, style: { fontSize: 11, fontWeight: 600, fill: C.t2 } } }),
|
|
551
551
|
/* @__PURE__ */ jsx(
|
|
552
|
-
|
|
552
|
+
Tooltip,
|
|
553
553
|
{
|
|
554
554
|
contentStyle: { fontSize: 12, borderRadius: 8, border: `1px solid ${C.b2}` },
|
|
555
555
|
labelFormatter: (label, payload) => {
|
|
@@ -566,15 +566,15 @@ function AgentDetailReportContent({ agentRow: propAgentRow, onBack, from, initia
|
|
|
566
566
|
}
|
|
567
567
|
),
|
|
568
568
|
/* @__PURE__ */ jsx(Bar, { dataKey: "count", name: "Calls", fill: C.teal, radius: [4, 4, 0, 0], children: /* @__PURE__ */ jsx(LabelList, { dataKey: "count", position: "top", style: { fontSize: 11, fontWeight: 700, fill: C.t1 } }) })
|
|
569
|
-
] }) }) : /* @__PURE__ */ jsx(
|
|
569
|
+
] }) }) : /* @__PURE__ */ jsx(Box_default, { sx: { display: "flex", alignItems: "center", justifyContent: "center", height: "100%", color: C.t3, fontSize: 13 }, children: "No data" }) })
|
|
570
570
|
] }),
|
|
571
|
-
/* @__PURE__ */ jsxs(
|
|
572
|
-
/* @__PURE__ */ jsxs(
|
|
573
|
-
/* @__PURE__ */ jsx(
|
|
574
|
-
/* @__PURE__ */ jsx(
|
|
571
|
+
/* @__PURE__ */ jsxs(Box_default, { sx: { display: "grid", gridTemplateColumns: { xs: "1fr", md: "1fr 1fr" }, gap: 2 }, children: [
|
|
572
|
+
/* @__PURE__ */ jsxs(Box_default, { sx: { border: `1px solid ${C.b1}`, borderRadius: "10px", overflow: "hidden", background: "transparent" }, children: [
|
|
573
|
+
/* @__PURE__ */ jsx(Box_default, { sx: { px: 2, py: 1.2, background: C.s2, borderBottom: `1px solid ${C.b1}` }, children: /* @__PURE__ */ jsx(Typography_default, { sx: { fontSize: 12, fontWeight: 700, letterSpacing: 0.8, textTransform: "uppercase", color: C.t2 }, children: "Calls by Queue" }) }),
|
|
574
|
+
/* @__PURE__ */ jsx(Box_default, { sx: { p: 2, height: 260 }, children: queuePieData.length > 0 ? /* @__PURE__ */ jsx(ResponsiveContainer, { width: "100%", height: "100%", children: /* @__PURE__ */ jsxs(PieChart, { children: [
|
|
575
575
|
/* @__PURE__ */ jsx(Pie, { data: queuePieData, cx: "50%", cy: "50%", outerRadius: 90, dataKey: "value", nameKey: "name", children: queuePieData.map((entry, idx) => /* @__PURE__ */ jsx(Cell, { fill: entry.color }, idx)) }),
|
|
576
576
|
/* @__PURE__ */ jsx(
|
|
577
|
-
|
|
577
|
+
Tooltip,
|
|
578
578
|
{
|
|
579
579
|
contentStyle: { fontSize: 12, borderRadius: 8, border: `1px solid ${C.b2}` },
|
|
580
580
|
formatter: (val, name, entry) => {
|
|
@@ -585,22 +585,22 @@ function AgentDetailReportContent({ agentRow: propAgentRow, onBack, from, initia
|
|
|
585
585
|
}
|
|
586
586
|
),
|
|
587
587
|
/* @__PURE__ */ jsx(Legend, { wrapperStyle: { fontSize: 12 }, formatter: (value) => /* @__PURE__ */ jsx("span", { style: { color: C.t1, fontWeight: 500 }, children: value }) })
|
|
588
|
-
] }) }) : /* @__PURE__ */ jsx(
|
|
588
|
+
] }) }) : /* @__PURE__ */ jsx(Box_default, { sx: { display: "flex", alignItems: "center", justifyContent: "center", height: "100%", color: C.t3, fontSize: 13 }, children: "No queue data" }) })
|
|
589
589
|
] }),
|
|
590
|
-
/* @__PURE__ */ jsxs(
|
|
591
|
-
/* @__PURE__ */ jsx(
|
|
592
|
-
/* @__PURE__ */ jsx(
|
|
590
|
+
/* @__PURE__ */ jsxs(Box_default, { sx: { border: `1px solid ${C.b1}`, borderRadius: "10px", overflow: "hidden", background: "transparent" }, children: [
|
|
591
|
+
/* @__PURE__ */ jsx(Box_default, { sx: { px: 2, py: 1.2, background: C.s2, borderBottom: `1px solid ${C.b1}` }, children: /* @__PURE__ */ jsx(Typography_default, { sx: { fontSize: 12, fontWeight: 700, letterSpacing: 0.8, textTransform: "uppercase", color: C.t2 }, children: "Queue Performance Metrics" }) }),
|
|
592
|
+
/* @__PURE__ */ jsx(Box_default, { sx: { p: 2 }, children: queueMetrics.length > 0 ? queueMetrics.map((q) => {
|
|
593
593
|
var _a2, _b2, _c2;
|
|
594
|
-
return /* @__PURE__ */ jsxs(
|
|
595
|
-
/* @__PURE__ */ jsxs(
|
|
596
|
-
/* @__PURE__ */ jsxs(
|
|
597
|
-
/* @__PURE__ */ jsx(
|
|
598
|
-
/* @__PURE__ */ jsx(
|
|
594
|
+
return /* @__PURE__ */ jsxs(Box_default, { sx: { mb: 2, "&:last-child": { mb: 0 } }, children: [
|
|
595
|
+
/* @__PURE__ */ jsxs(Box_default, { sx: { display: "flex", alignItems: "center", justifyContent: "space-between", mb: 0.3 }, children: [
|
|
596
|
+
/* @__PURE__ */ jsxs(Box_default, { sx: { display: "flex", alignItems: "center", gap: 1 }, children: [
|
|
597
|
+
/* @__PURE__ */ jsx(Box_default, { sx: { width: 10, height: 10, borderRadius: "50%", background: q.color, flexShrink: 0 } }),
|
|
598
|
+
/* @__PURE__ */ jsx(Typography_default, { sx: { fontSize: 13, fontWeight: 700, color: C.t1 }, children: q.queueName })
|
|
599
599
|
] }),
|
|
600
|
-
/* @__PURE__ */ jsxs(
|
|
600
|
+
/* @__PURE__ */ jsxs(Typography_default, { sx: __spreadProps(__spreadValues({}, monoSx), { fontSize: 13, fontWeight: 800, color: q.color }), children: [
|
|
601
601
|
q.totalCalls,
|
|
602
602
|
" calls",
|
|
603
|
-
/* @__PURE__ */ jsxs(
|
|
603
|
+
/* @__PURE__ */ jsxs(Typography_default, { component: "span", sx: __spreadProps(__spreadValues({}, monoSx), { color: C.t3, ml: 0.5 }), children: [
|
|
604
604
|
"(",
|
|
605
605
|
q.answeredCalls,
|
|
606
606
|
" ans / ",
|
|
@@ -609,52 +609,52 @@ function AgentDetailReportContent({ agentRow: propAgentRow, onBack, from, initia
|
|
|
609
609
|
] })
|
|
610
610
|
] })
|
|
611
611
|
] }),
|
|
612
|
-
/* @__PURE__ */ jsx(
|
|
613
|
-
/* @__PURE__ */ jsxs(
|
|
614
|
-
/* @__PURE__ */ jsxs(
|
|
612
|
+
/* @__PURE__ */ jsx(Box_default, { sx: { height: 6, background: C.s3, borderRadius: 3, overflow: "hidden", mb: 0.3 }, children: /* @__PURE__ */ jsx(Box_default, { sx: { height: "100%", width: `${(_a2 = q.pctOfTotal) != null ? _a2 : 0}%`, background: q.color, borderRadius: 3 } }) }),
|
|
613
|
+
/* @__PURE__ */ jsxs(Box_default, { sx: { display: "flex", flexWrap: "wrap", columnGap: 1.5, rowGap: 0.2 }, children: [
|
|
614
|
+
/* @__PURE__ */ jsxs(Typography_default, { sx: { fontSize: 11, color: C.t3 }, children: [
|
|
615
615
|
((_b2 = q.pctOfTotal) != null ? _b2 : 0).toFixed(0),
|
|
616
616
|
"% of total"
|
|
617
617
|
] }),
|
|
618
|
-
/* @__PURE__ */ jsxs(
|
|
618
|
+
/* @__PURE__ */ jsxs(Typography_default, { sx: { fontSize: 11, color: C.t3 }, children: [
|
|
619
619
|
"Ans: ",
|
|
620
620
|
((_c2 = q.answerRate) != null ? _c2 : 0).toFixed(0),
|
|
621
621
|
"%"
|
|
622
622
|
] }),
|
|
623
|
-
/* @__PURE__ */ jsxs(
|
|
623
|
+
/* @__PURE__ */ jsxs(Typography_default, { sx: { fontSize: 11, color: C.t3 }, children: [
|
|
624
624
|
"Talk: ",
|
|
625
625
|
/* @__PURE__ */ jsx("span", { style: __spreadProps(__spreadValues({}, monoSx), { color: C.t2 }), children: q.avgTalkFormatted })
|
|
626
626
|
] }),
|
|
627
|
-
/* @__PURE__ */ jsxs(
|
|
627
|
+
/* @__PURE__ */ jsxs(Typography_default, { sx: { fontSize: 11, color: C.t3 }, children: [
|
|
628
628
|
"Hold: ",
|
|
629
629
|
/* @__PURE__ */ jsx("span", { style: __spreadProps(__spreadValues({}, monoSx), { color: C.t2 }), children: q.avgHoldFormatted })
|
|
630
630
|
] }),
|
|
631
|
-
/* @__PURE__ */ jsxs(
|
|
631
|
+
/* @__PURE__ */ jsxs(Typography_default, { sx: { fontSize: 11, color: C.t3 }, children: [
|
|
632
632
|
"Wrap: ",
|
|
633
633
|
/* @__PURE__ */ jsx("span", { style: __spreadProps(__spreadValues({}, monoSx), { color: C.t2 }), children: q.avgWrapupFormatted })
|
|
634
634
|
] }),
|
|
635
|
-
/* @__PURE__ */ jsxs(
|
|
635
|
+
/* @__PURE__ */ jsxs(Typography_default, { sx: { fontSize: 11, color: C.t3 }, children: [
|
|
636
636
|
"AHT: ",
|
|
637
637
|
/* @__PURE__ */ jsx("span", { style: __spreadProps(__spreadValues({}, monoSx), { color: C.t2 }), children: q.avgAhtFormatted })
|
|
638
638
|
] })
|
|
639
639
|
] })
|
|
640
640
|
] }, q.queueName);
|
|
641
|
-
}) : /* @__PURE__ */ jsx(
|
|
641
|
+
}) : /* @__PURE__ */ jsx(Box_default, { sx: { textAlign: "center", py: 4, color: C.t3, fontSize: 13 }, children: "No queue data" }) })
|
|
642
642
|
] })
|
|
643
643
|
] })
|
|
644
644
|
] }),
|
|
645
|
-
activeTab === 1 && /* @__PURE__ */ jsxs(
|
|
646
|
-
/* @__PURE__ */ jsx(
|
|
647
|
-
/* @__PURE__ */ jsx(
|
|
648
|
-
/* @__PURE__ */ jsx(
|
|
645
|
+
activeTab === 1 && /* @__PURE__ */ jsxs(Box_default, { sx: { borderRadius: "8px", border: "1px solid #e0e7ef", overflow: "hidden", background: "transparent" }, children: [
|
|
646
|
+
/* @__PURE__ */ jsx(Box_default, { sx: { px: 2, py: 1.2, background: C.s2, borderBottom: `1px solid ${C.b1}`, display: "flex", alignItems: "center", justifyContent: "space-between" }, children: /* @__PURE__ */ jsxs(Box_default, { sx: { display: "flex", alignItems: "center", gap: 1 }, children: [
|
|
647
|
+
/* @__PURE__ */ jsx(Typography_default, { sx: { fontSize: 12, fontWeight: 700, letterSpacing: 0.8, textTransform: "uppercase", color: C.t2 }, children: "Call History" }),
|
|
648
|
+
/* @__PURE__ */ jsx(Chip_default, { label: `${cdrTotal} records`, size: "small", sx: { fontSize: 11, fontWeight: 700, background: C.s2, color: C.t3, border: `1px solid ${C.b2}` } })
|
|
649
649
|
] }) }),
|
|
650
|
-
cdrError && /* @__PURE__ */ jsx(
|
|
651
|
-
/* @__PURE__ */ jsxs(
|
|
652
|
-
cdrLoading && /* @__PURE__ */ jsx(
|
|
653
|
-
/* @__PURE__ */ jsxs(
|
|
650
|
+
cdrError && /* @__PURE__ */ jsx(Alert_default, { severity: "error", sx: { mx: 2, mt: 1 }, onClose: () => setCdrError(""), children: cdrError }),
|
|
651
|
+
/* @__PURE__ */ jsxs(TableContainer_default, { sx: { position: "relative" }, children: [
|
|
652
|
+
cdrLoading && /* @__PURE__ */ jsx(Box_default, { sx: { position: "absolute", top: 0, left: 0, right: 0, bottom: 0, background: "rgba(255,255,255,0.7)", display: "flex", alignItems: "center", justifyContent: "center", zIndex: 5 }, children: /* @__PURE__ */ jsx(CircularProgress_default, { size: 28 }) }),
|
|
653
|
+
/* @__PURE__ */ jsxs(Table_default, { size: "small", sx: {
|
|
654
654
|
minWidth: 1400,
|
|
655
655
|
"& .MuiTableCell-root": { fontSize: "0.75rem", borderBottom: "1px solid #eef1f6", py: 0.6, px: 1 }
|
|
656
656
|
}, children: [
|
|
657
|
-
/* @__PURE__ */ jsx(
|
|
657
|
+
/* @__PURE__ */ jsx(TableHead_default, { children: /* @__PURE__ */ jsx(TableRow_default, { children: [
|
|
658
658
|
"Phone Number",
|
|
659
659
|
"Call Start",
|
|
660
660
|
"Call Type",
|
|
@@ -668,35 +668,35 @@ function AgentDetailReportContent({ agentRow: propAgentRow, onBack, from, initia
|
|
|
668
668
|
"Disposition",
|
|
669
669
|
"Transferred",
|
|
670
670
|
"Recording"
|
|
671
|
-
].map((label) => /* @__PURE__ */ jsx(
|
|
672
|
-
/* @__PURE__ */ jsxs(
|
|
671
|
+
].map((label) => /* @__PURE__ */ jsx(TableCell_default, { sx: cdrHeadSx, children: label }, label)) }) }),
|
|
672
|
+
/* @__PURE__ */ jsxs(TableBody_default, { children: [
|
|
673
673
|
cdrRecords.map((row, idx) => {
|
|
674
674
|
var _a2;
|
|
675
|
-
return /* @__PURE__ */ jsxs(
|
|
675
|
+
return /* @__PURE__ */ jsxs(TableRow_default, { hover: true, sx: {
|
|
676
676
|
backgroundColor: "#fff",
|
|
677
677
|
"&:hover": { backgroundColor: "#f0f7f8" }
|
|
678
678
|
}, children: [
|
|
679
|
-
/* @__PURE__ */ jsx(
|
|
680
|
-
/* @__PURE__ */ jsx(
|
|
681
|
-
/* @__PURE__ */ jsx(
|
|
682
|
-
/* @__PURE__ */ jsx(
|
|
683
|
-
/* @__PURE__ */ jsx(
|
|
684
|
-
/* @__PURE__ */ jsx(
|
|
685
|
-
/* @__PURE__ */ jsx(
|
|
686
|
-
/* @__PURE__ */ jsx(
|
|
687
|
-
/* @__PURE__ */ jsx(
|
|
688
|
-
/* @__PURE__ */ jsx(
|
|
689
|
-
/* @__PURE__ */ jsx(
|
|
690
|
-
/* @__PURE__ */ jsx(
|
|
691
|
-
/* @__PURE__ */ jsx(
|
|
679
|
+
/* @__PURE__ */ jsx(TableCell_default, { sx: { fontWeight: 600, color: C.navy, fontSize: "0.75rem" }, children: row.phoneNumber || "" }),
|
|
680
|
+
/* @__PURE__ */ jsx(TableCell_default, { sx: { fontSize: "0.73rem", color: "#4a5568" }, children: row.callStartTime ? (0, import_dayjs.default)(row.callStartTime).format("DD MMM YYYY hh:mm A") : "" }),
|
|
681
|
+
/* @__PURE__ */ jsx(TableCell_default, { children: /* @__PURE__ */ jsx(CallTypeChip, { type: row.callType || "" }) }),
|
|
682
|
+
/* @__PURE__ */ jsx(TableCell_default, { children: /* @__PURE__ */ jsx(StatusChip, { status: row.callStatus || "" }) }),
|
|
683
|
+
/* @__PURE__ */ jsx(TableCell_default, { children: row.queueName ? /* @__PURE__ */ jsx(Chip_default, { label: row.queueName, size: "small", sx: { backgroundColor: "#f0ebfa", color: C.purple, fontWeight: 500, fontSize: "0.67rem", height: 22 } }) : "" }),
|
|
684
|
+
/* @__PURE__ */ jsx(TableCell_default, { sx: { fontSize: "0.73rem", color: "#4a5568" }, children: row.extension || "" }),
|
|
685
|
+
/* @__PURE__ */ jsx(TableCell_default, { sx: { fontWeight: 600, color: C.blue, fontSize: "0.75rem", fontVariantNumeric: "tabular-nums" }, children: row.talkDurationFmt || "" }),
|
|
686
|
+
/* @__PURE__ */ jsx(TableCell_default, { sx: { fontWeight: 500, color: C.amber, fontSize: "0.75rem", fontVariantNumeric: "tabular-nums" }, children: row.holdDurationFmt || "" }),
|
|
687
|
+
/* @__PURE__ */ jsx(TableCell_default, { sx: { fontWeight: 500, fontSize: "0.75rem", fontVariantNumeric: "tabular-nums" }, children: row.ringingDurationFmt || "" }),
|
|
688
|
+
/* @__PURE__ */ jsx(TableCell_default, { sx: { fontWeight: 500, color: C.purple, fontSize: "0.75rem", fontVariantNumeric: "tabular-nums" }, children: row.wrapupDurationFmt || "" }),
|
|
689
|
+
/* @__PURE__ */ jsx(TableCell_default, { sx: { fontSize: "0.73rem", color: "#4a5568" }, children: row.disposition || "" }),
|
|
690
|
+
/* @__PURE__ */ jsx(TableCell_default, { children: row.wasTransferred ? /* @__PURE__ */ jsx(Chip_default, { label: "Yes", size: "small", sx: { backgroundColor: "#e6f7ef", color: C.green, fontWeight: 600, fontSize: "0.65rem", height: 20, borderRadius: "6px" } }) : /* @__PURE__ */ jsx(Chip_default, { label: "No", size: "small", sx: { backgroundColor: "transparent", color: "#6b7b8d", fontWeight: 600, fontSize: "0.65rem", height: 20, borderRadius: "6px" } }) }),
|
|
691
|
+
/* @__PURE__ */ jsx(TableCell_default, { children: row.callUuid ? /* @__PURE__ */ jsx(RecordingCell, { callUuid: row.callUuid, recordingPath: (_a2 = row.recordingPath) != null ? _a2 : null }) : "" })
|
|
692
692
|
] }, row.callUuid || idx);
|
|
693
693
|
}),
|
|
694
|
-
!cdrLoading && cdrRecords.length === 0 && /* @__PURE__ */ jsx(
|
|
694
|
+
!cdrLoading && cdrRecords.length === 0 && /* @__PURE__ */ jsx(TableRow_default, { children: /* @__PURE__ */ jsx(TableCell_default, { colSpan: 13, sx: { textAlign: "center", py: 4, color: C.t3, fontSize: 13 }, children: "No call records found" }) })
|
|
695
695
|
] })
|
|
696
696
|
] })
|
|
697
697
|
] }),
|
|
698
698
|
/* @__PURE__ */ jsx(
|
|
699
|
-
|
|
699
|
+
TablePagination_default,
|
|
700
700
|
{
|
|
701
701
|
component: "div",
|
|
702
702
|
count: cdrTotal,
|
|
@@ -712,21 +712,21 @@ function AgentDetailReportContent({ agentRow: propAgentRow, onBack, from, initia
|
|
|
712
712
|
}
|
|
713
713
|
)
|
|
714
714
|
] }),
|
|
715
|
-
activeTab === 2 && /* @__PURE__ */ jsxs(
|
|
716
|
-
/* @__PURE__ */ jsxs(
|
|
715
|
+
activeTab === 2 && /* @__PURE__ */ jsxs(Box_default, { children: [
|
|
716
|
+
/* @__PURE__ */ jsxs(Box_default, { sx: { display: "grid", gridTemplateColumns: { xs: "1fr 1fr", md: "repeat(3, 1fr)", lg: "repeat(4, 1fr)" }, gap: { xs: 1.5, lg: 2 }, mb: 2 }, children: [
|
|
717
717
|
/* @__PURE__ */ jsx(StatCard, { value: (profile == null ? void 0 : profile.breakTimeFormatted) || "00:00:00", label: "Total Break Time", color: C.amber }),
|
|
718
718
|
/* @__PURE__ */ jsx(StatCard, { value: (_j = profile == null ? void 0 : profile.breaksTaken) != null ? _j : 0, label: "Breaks Taken", color: C.purple }),
|
|
719
719
|
/* @__PURE__ */ jsx(StatCard, { value: (profile == null ? void 0 : profile.productionFormatted) || "00:00:00", label: "Production Time", color: C.green }),
|
|
720
720
|
/* @__PURE__ */ jsx(StatCard, { value: (profile == null ? void 0 : profile.loginDurationFormatted) || "00:00:00", label: "Login Duration", color: C.teal })
|
|
721
721
|
] }),
|
|
722
|
-
/* @__PURE__ */ jsxs(
|
|
723
|
-
/* @__PURE__ */ jsx(
|
|
724
|
-
/* @__PURE__ */ jsx(
|
|
725
|
-
{ label: "First Login", value: (profile == null ? void 0 : profile.firstLoginTime) ?
|
|
722
|
+
/* @__PURE__ */ jsxs(Box_default, { children: [
|
|
723
|
+
/* @__PURE__ */ jsx(Typography_default, { sx: { fontSize: "0.72rem", fontWeight: 700, color: "#888", textTransform: "uppercase", letterSpacing: 0.8, mb: 1, fontFamily: "poppins, Arial, sans-serif" }, children: "Attendance Summary" }),
|
|
724
|
+
/* @__PURE__ */ jsx(Box_default, { sx: { display: "grid", gridTemplateColumns: { xs: "1fr 1fr", md: "repeat(4, 1fr)" }, gap: 1.5 }, children: [
|
|
725
|
+
{ label: "First Login", value: (profile == null ? void 0 : profile.firstLoginTime) ? (0, import_dayjs.default)(profile.firstLoginTime).format("YYYY-MM-DD HH:mm:ss") : "\u2014", color: C.blue },
|
|
726
726
|
{ label: "Adherence Score", value: `${(_k = profile == null ? void 0 : profile.adherencePct) != null ? _k : 0}%`, color: C.green },
|
|
727
727
|
{ label: "Adherence Grade", value: (profile == null ? void 0 : profile.adherenceGrade) || "\u2014", color: C.purple },
|
|
728
728
|
{ label: "Answer Rate", value: `${((_l = profile == null ? void 0 : profile.answerRate) != null ? _l : 0).toFixed(1)}%`, color: C.teal }
|
|
729
|
-
].map((item) => /* @__PURE__ */ jsxs(
|
|
729
|
+
].map((item) => /* @__PURE__ */ jsxs(Box_default, { sx: {
|
|
730
730
|
px: 1.5,
|
|
731
731
|
py: 1.2,
|
|
732
732
|
borderRadius: "10px",
|
|
@@ -736,8 +736,8 @@ function AgentDetailReportContent({ agentRow: propAgentRow, onBack, from, initia
|
|
|
736
736
|
borderLeftStyle: "solid",
|
|
737
737
|
borderLeftColor: item.color
|
|
738
738
|
}, children: [
|
|
739
|
-
/* @__PURE__ */ jsx(
|
|
740
|
-
/* @__PURE__ */ jsx(
|
|
739
|
+
/* @__PURE__ */ jsx(Typography_default, { sx: { fontFamily: "poppins, Arial, sans-serif", fontSize: "0.72rem", fontWeight: 600, color: "#888", mb: 0.3 }, children: item.label }),
|
|
740
|
+
/* @__PURE__ */ jsx(Typography_default, { sx: { fontFamily: "poppins, Arial, sans-serif", fontSize: "0.95rem", fontWeight: 700, color: "#1a1a1a" }, children: item.value })
|
|
741
741
|
] }, item.label)) })
|
|
742
742
|
] })
|
|
743
743
|
] })
|
|
@@ -750,4 +750,4 @@ var agentDetailReport_default = AgentDetailReport;
|
|
|
750
750
|
export {
|
|
751
751
|
agentDetailReport_default
|
|
752
752
|
};
|
|
753
|
-
//# sourceMappingURL=chunk-
|
|
753
|
+
//# sourceMappingURL=chunk-33QNSXP7.mjs.map
|