ahs-cti 0.0.11 → 0.0.13

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.
Files changed (122) hide show
  1. package/dist/{agentDetailReport-F44HMQ5O.mjs → agentDetailReport-PQ5GRWS7.mjs} +12 -12
  2. package/dist/{agentPerformanceReport-TTOMNENK.mjs → agentPerformanceReport-JIM2ESX3.mjs} +15 -15
  3. package/dist/{auditReport-QTMAKVTN.mjs → auditReport-S5JBBS4M.mjs} +5 -5
  4. package/dist/{callHistory-4J4J2XHA.mjs → callHistory-P5EYJFLL.mjs} +10 -10
  5. package/dist/{campaigns-N3UNUGQP.mjs → campaigns-E4EDJ4HQ.mjs} +39 -16
  6. package/dist/campaigns-E4EDJ4HQ.mjs.map +1 -0
  7. package/dist/{caroQualityAuditDashboard-PDXTFXYP.mjs → caroQualityAuditDashboard-U5SURE3Y.mjs} +2 -2
  8. package/dist/{caroVoiceAI-OUTAAIFE.mjs → caroVoiceAI-ALM7PXA4.mjs} +2 -2
  9. package/dist/{cdrReport-Z35OLYUL.mjs → cdrReport-ZODSASDX.mjs} +16 -16
  10. package/dist/{chunk-HAOFUADN.mjs → chunk-3W5XAE5U.mjs} +2 -2
  11. package/dist/{chunk-NDZDJWXY.mjs → chunk-7MLXSPRD.mjs} +3 -3
  12. package/dist/{chunk-KSVNZKRD.mjs → chunk-A3UIDKO2.mjs} +17 -5
  13. package/dist/chunk-A3UIDKO2.mjs.map +1 -0
  14. package/dist/{chunk-M7FJYZF6.mjs → chunk-BZDLXMEG.mjs} +2 -2
  15. package/dist/{chunk-W3ECDLUB.mjs → chunk-FJIO34QJ.mjs} +2 -2
  16. package/dist/{chunk-ZSRD3ZXF.mjs → chunk-GU67CHVR.mjs} +2 -2
  17. package/dist/{chunk-VII5JNA6.mjs → chunk-H5FOGKNG.mjs} +2 -2
  18. package/dist/{chunk-GTI2ZVQX.mjs → chunk-JLTFPMGH.mjs} +2 -2
  19. package/dist/{chunk-GFVR3HLK.mjs → chunk-JRCGL7H6.mjs} +2 -2
  20. package/dist/{chunk-S2SMCH2C.mjs → chunk-KMHK7F5B.mjs} +2 -2
  21. package/dist/{chunk-S34CQVTF.mjs → chunk-M4M3243J.mjs} +4 -4
  22. package/dist/{chunk-JHC7OUQG.mjs → chunk-NPMPNTMQ.mjs} +11 -11
  23. package/dist/{chunk-677RFPP5.mjs → chunk-QSHKNSVY.mjs} +2 -2
  24. package/dist/{chunk-3PNP6G5P.mjs → chunk-RKH7ICVQ.mjs} +2 -2
  25. package/dist/{chunk-TCYBXDAP.mjs → chunk-RPGIS6VI.mjs} +3 -3
  26. package/dist/{chunk-45MLTWV7.mjs → chunk-SG26PWKV.mjs} +2 -2
  27. package/dist/{chunk-SUS5RUCA.mjs → chunk-SYOIXQFQ.mjs} +7 -7
  28. package/dist/{chunk-H22TUCN3.mjs → chunk-U6GXXCCQ.mjs} +2 -2
  29. package/dist/{chunk-Y4PAUTZ4.mjs → chunk-VZXMSMLL.mjs} +3 -3
  30. package/dist/{chunk-635IIVZE.mjs → chunk-YNU5BQBL.mjs} +2 -2
  31. package/dist/{chunk-G6KRLGGC.mjs → chunk-Z2DNBN53.mjs} +3 -3
  32. package/dist/{chunk-ERSNXW5X.mjs → chunk-ZMO5SOQ4.mjs} +1543 -2176
  33. package/dist/chunk-ZMO5SOQ4.mjs.map +1 -0
  34. package/dist/index.d.mts +13 -3
  35. package/dist/index.d.ts +13 -3
  36. package/dist/index.js +6008 -6663
  37. package/dist/index.js.map +1 -1
  38. package/dist/index.mjs +36 -25
  39. package/dist/index.mjs.map +1 -1
  40. package/dist/{liveStatus-PRDEL7CK.mjs → liveStatus-HFFNXGEY.mjs} +6 -6
  41. package/dist/{loginReport-47QNACQU.mjs → loginReport-N6C37XY2.mjs} +12 -12
  42. package/dist/{managementDashboard-SZFYULKA.mjs → managementDashboard-PDXSO6BB.mjs} +137 -129
  43. package/dist/managementDashboard-PDXSO6BB.mjs.map +1 -0
  44. package/dist/{qualityAuditDashboard-L2KJETAG.mjs → qualityAuditDashboard-BIDWBG3T.mjs} +2 -2
  45. package/dist-react/{agentDetailReport-PDKQKJNL.mjs → agentDetailReport-YWDH7FQF.mjs} +3 -3
  46. package/dist-react/{agentPerformanceReport-MU2FASNN.mjs → agentPerformanceReport-EK4IN3W2.mjs} +5 -5
  47. package/dist-react/{auditReport-WH2KDNYT.mjs → auditReport-HE75S3GO.mjs} +3 -3
  48. package/dist-react/{callHistory-HXXRYUIV.mjs → callHistory-URUC4GXI.mjs} +2 -2
  49. package/dist-react/{campaigns-J7KIAATE.mjs → campaigns-5NECYMS4.mjs} +31 -8
  50. package/dist-react/campaigns-5NECYMS4.mjs.map +1 -0
  51. package/dist-react/{cdrReport-SX2FZAO6.mjs → cdrReport-O4VTSTYF.mjs} +6 -6
  52. package/dist-react/{chunk-ADM2JJCP.mjs → chunk-4YNVSGFP.mjs} +2 -2
  53. package/dist-react/{chunk-LWDAC6QU.mjs → chunk-CUCRBXTP.mjs} +2 -2
  54. package/dist-react/{chunk-ORNNWQI6.mjs → chunk-EUWUPOAN.mjs} +2 -2
  55. package/dist-react/{chunk-F7G2XFRU.mjs → chunk-FIIORG2R.mjs} +16 -4
  56. package/dist-react/chunk-FIIORG2R.mjs.map +1 -0
  57. package/dist-react/{chunk-MCD5FQNY.mjs → chunk-LSPQ6JOQ.mjs} +2 -2
  58. package/dist-react/{chunk-EN7HM2MD.mjs → chunk-QFFOIHHM.mjs} +2 -2
  59. package/dist-react/{chunk-MD472UKG.mjs → chunk-X7T3M2FT.mjs} +2 -2
  60. package/dist-react/{chunk-GUMGXVIT.mjs → chunk-XDSNFMUT.mjs} +2 -2
  61. package/dist-react/index.d.mts +13 -3
  62. package/dist-react/index.d.ts +13 -3
  63. package/dist-react/index.js +171 -134
  64. package/dist-react/index.js.map +1 -1
  65. package/dist-react/index.mjs +27 -19
  66. package/dist-react/index.mjs.map +1 -1
  67. package/dist-react/{liveStatus-IDZ7CPYK.mjs → liveStatus-WSPL4CIS.mjs} +4 -4
  68. package/dist-react/{loginReport-F47GUU53.mjs → loginReport-NHFJGL2A.mjs} +4 -4
  69. package/dist-react/{managementDashboard-GC5E7NEL.mjs → managementDashboard-PFGNWB7F.mjs} +117 -120
  70. package/dist-react/managementDashboard-PFGNWB7F.mjs.map +1 -0
  71. package/package.json +1 -1
  72. package/dist/campaigns-N3UNUGQP.mjs.map +0 -1
  73. package/dist/chunk-ERSNXW5X.mjs.map +0 -1
  74. package/dist/chunk-KSVNZKRD.mjs.map +0 -1
  75. package/dist/managementDashboard-SZFYULKA.mjs.map +0 -1
  76. package/dist-react/campaigns-J7KIAATE.mjs.map +0 -1
  77. package/dist-react/chunk-F7G2XFRU.mjs.map +0 -1
  78. package/dist-react/managementDashboard-GC5E7NEL.mjs.map +0 -1
  79. /package/dist/{agentDetailReport-F44HMQ5O.mjs.map → agentDetailReport-PQ5GRWS7.mjs.map} +0 -0
  80. /package/dist/{agentPerformanceReport-TTOMNENK.mjs.map → agentPerformanceReport-JIM2ESX3.mjs.map} +0 -0
  81. /package/dist/{auditReport-QTMAKVTN.mjs.map → auditReport-S5JBBS4M.mjs.map} +0 -0
  82. /package/dist/{callHistory-4J4J2XHA.mjs.map → callHistory-P5EYJFLL.mjs.map} +0 -0
  83. /package/dist/{caroQualityAuditDashboard-PDXTFXYP.mjs.map → caroQualityAuditDashboard-U5SURE3Y.mjs.map} +0 -0
  84. /package/dist/{caroVoiceAI-OUTAAIFE.mjs.map → caroVoiceAI-ALM7PXA4.mjs.map} +0 -0
  85. /package/dist/{cdrReport-Z35OLYUL.mjs.map → cdrReport-ZODSASDX.mjs.map} +0 -0
  86. /package/dist/{chunk-HAOFUADN.mjs.map → chunk-3W5XAE5U.mjs.map} +0 -0
  87. /package/dist/{chunk-NDZDJWXY.mjs.map → chunk-7MLXSPRD.mjs.map} +0 -0
  88. /package/dist/{chunk-M7FJYZF6.mjs.map → chunk-BZDLXMEG.mjs.map} +0 -0
  89. /package/dist/{chunk-W3ECDLUB.mjs.map → chunk-FJIO34QJ.mjs.map} +0 -0
  90. /package/dist/{chunk-ZSRD3ZXF.mjs.map → chunk-GU67CHVR.mjs.map} +0 -0
  91. /package/dist/{chunk-VII5JNA6.mjs.map → chunk-H5FOGKNG.mjs.map} +0 -0
  92. /package/dist/{chunk-GTI2ZVQX.mjs.map → chunk-JLTFPMGH.mjs.map} +0 -0
  93. /package/dist/{chunk-GFVR3HLK.mjs.map → chunk-JRCGL7H6.mjs.map} +0 -0
  94. /package/dist/{chunk-S2SMCH2C.mjs.map → chunk-KMHK7F5B.mjs.map} +0 -0
  95. /package/dist/{chunk-S34CQVTF.mjs.map → chunk-M4M3243J.mjs.map} +0 -0
  96. /package/dist/{chunk-JHC7OUQG.mjs.map → chunk-NPMPNTMQ.mjs.map} +0 -0
  97. /package/dist/{chunk-677RFPP5.mjs.map → chunk-QSHKNSVY.mjs.map} +0 -0
  98. /package/dist/{chunk-3PNP6G5P.mjs.map → chunk-RKH7ICVQ.mjs.map} +0 -0
  99. /package/dist/{chunk-TCYBXDAP.mjs.map → chunk-RPGIS6VI.mjs.map} +0 -0
  100. /package/dist/{chunk-45MLTWV7.mjs.map → chunk-SG26PWKV.mjs.map} +0 -0
  101. /package/dist/{chunk-SUS5RUCA.mjs.map → chunk-SYOIXQFQ.mjs.map} +0 -0
  102. /package/dist/{chunk-H22TUCN3.mjs.map → chunk-U6GXXCCQ.mjs.map} +0 -0
  103. /package/dist/{chunk-Y4PAUTZ4.mjs.map → chunk-VZXMSMLL.mjs.map} +0 -0
  104. /package/dist/{chunk-635IIVZE.mjs.map → chunk-YNU5BQBL.mjs.map} +0 -0
  105. /package/dist/{chunk-G6KRLGGC.mjs.map → chunk-Z2DNBN53.mjs.map} +0 -0
  106. /package/dist/{liveStatus-PRDEL7CK.mjs.map → liveStatus-HFFNXGEY.mjs.map} +0 -0
  107. /package/dist/{loginReport-47QNACQU.mjs.map → loginReport-N6C37XY2.mjs.map} +0 -0
  108. /package/dist/{qualityAuditDashboard-L2KJETAG.mjs.map → qualityAuditDashboard-BIDWBG3T.mjs.map} +0 -0
  109. /package/dist-react/{agentDetailReport-PDKQKJNL.mjs.map → agentDetailReport-YWDH7FQF.mjs.map} +0 -0
  110. /package/dist-react/{agentPerformanceReport-MU2FASNN.mjs.map → agentPerformanceReport-EK4IN3W2.mjs.map} +0 -0
  111. /package/dist-react/{auditReport-WH2KDNYT.mjs.map → auditReport-HE75S3GO.mjs.map} +0 -0
  112. /package/dist-react/{callHistory-HXXRYUIV.mjs.map → callHistory-URUC4GXI.mjs.map} +0 -0
  113. /package/dist-react/{cdrReport-SX2FZAO6.mjs.map → cdrReport-O4VTSTYF.mjs.map} +0 -0
  114. /package/dist-react/{chunk-ADM2JJCP.mjs.map → chunk-4YNVSGFP.mjs.map} +0 -0
  115. /package/dist-react/{chunk-LWDAC6QU.mjs.map → chunk-CUCRBXTP.mjs.map} +0 -0
  116. /package/dist-react/{chunk-ORNNWQI6.mjs.map → chunk-EUWUPOAN.mjs.map} +0 -0
  117. /package/dist-react/{chunk-MCD5FQNY.mjs.map → chunk-LSPQ6JOQ.mjs.map} +0 -0
  118. /package/dist-react/{chunk-EN7HM2MD.mjs.map → chunk-QFFOIHHM.mjs.map} +0 -0
  119. /package/dist-react/{chunk-MD472UKG.mjs.map → chunk-X7T3M2FT.mjs.map} +0 -0
  120. /package/dist-react/{chunk-GUMGXVIT.mjs.map → chunk-XDSNFMUT.mjs.map} +0 -0
  121. /package/dist-react/{liveStatus-IDZ7CPYK.mjs.map → liveStatus-WSPL4CIS.mjs.map} +0 -0
  122. /package/dist-react/{loginReport-F47GUU53.mjs.map → loginReport-NHFJGL2A.mjs.map} +0 -0
@@ -6866,8 +6866,8 @@ var init_sdk_constants = __esm({
6866
6866
  LIVE_STATUS: "live_status",
6867
6867
  MANAGEMENT_DASHBOARD: "management_dashboard",
6868
6868
  CARO_VOICE_AI: "caro_voice_ai",
6869
- QUALITY_AUDIT_DASHBOARD: "management_dashboard",
6870
- CARO_QUALITY_AUDIT_DASHBOARD: "management_dashboard"
6869
+ QUALITY_AUDIT_DASHBOARD: "quality_audit_dashboard",
6870
+ CARO_QUALITY_AUDIT_DASHBOARD: "caro_voice_ai_dashboard"
6871
6871
  };
6872
6872
  SDK_PERMISSIONS = {
6873
6873
  WILDCARD: SDK_WILDCARD,
@@ -6910,7 +6910,19 @@ var init_sdk_constants = __esm({
6910
6910
  // Supervisor Monitoring
6911
6911
  SUPERVISOR_MONITOR_LISTEN: "supervisor:monitor:listen",
6912
6912
  SUPERVISOR_MONITOR_WHISPER: "supervisor:monitor:whisper",
6913
- SUPERVISOR_MONITOR_BARGE: "supervisor:monitor:barge"
6913
+ SUPERVISOR_MONITOR_BARGE: "supervisor:monitor:barge",
6914
+ // Quality Audit Dashboards
6915
+ QUALITY_AUDIT_DASHBOARD_READ: "quality_audit_dashboard:read",
6916
+ CARO_VOICE_AI_DASHBOARD_READ: "caro_voice_ai_dashboard:read",
6917
+ // Call History
6918
+ REPORTS_CALL_HISTORY_READ: "reports:call_history:read",
6919
+ // Live Status
6920
+ DASHBOARD_LIVE_STATUS_READ: "dashboard:live_status:read",
6921
+ DASHBOARD_LIVE_STATUS_MANAGE: "dashboard:live_status:manage",
6922
+ // Management Dashboard
6923
+ MANAGEMENT_DASHBOARD_READ: "management_dashboard:read",
6924
+ // Caro Voice AI
6925
+ CARO_VOICE_AI_READ: "caro_voice_ai:read"
6914
6926
  };
6915
6927
  }
6916
6928
  });
@@ -13509,11 +13521,12 @@ function campaignToFormData(c) {
13509
13521
  priority: (_g = c.priority) != null ? _g : 5,
13510
13522
  settings: c.settings || {},
13511
13523
  queueLinks: (c.campaignQueues || []).map((q) => {
13512
- var _a3, _b2;
13524
+ var _a3, _b2, _c2;
13513
13525
  return {
13514
13526
  queueId: q.queueId,
13515
13527
  priorityOverride: (_a3 = q.priorityOverride) != null ? _a3 : 1,
13516
- minWaitBeforeCallback: (_b2 = q.minWaitBeforeCallback) != null ? _b2 : 0
13528
+ minWaitBeforeCallback: (_b2 = q.minWaitBeforeCallback) != null ? _b2 : 0,
13529
+ isAutoDialQueue: (_c2 = q.isAutoDialQueue) != null ? _c2 : false
13517
13530
  };
13518
13531
  })
13519
13532
  };
@@ -13859,7 +13872,8 @@ function QueueLinkingTab({
13859
13872
  const newLinks = selectedQueueIds.map((qId) => ({
13860
13873
  queueId: qId,
13861
13874
  priorityOverride: 5,
13862
- minWaitBeforeCallback: 0
13875
+ minWaitBeforeCallback: 0,
13876
+ isAutoDialQueue: false
13863
13877
  }));
13864
13878
  setFormData((prev) => __spreadProps(__spreadValues({}, prev), { queueLinks: [...prev.queueLinks || [], ...newLinks] }));
13865
13879
  showToast(`${selectedQueueIds.length} queue(s) added`, "success");
@@ -13879,6 +13893,13 @@ function QueueLinkingTab({
13879
13893
  )
13880
13894
  }));
13881
13895
  };
13896
+ const handleAutoDialToggle = (queueId, value) => {
13897
+ setFormData((prev) => __spreadProps(__spreadValues({}, prev), {
13898
+ queueLinks: (prev.queueLinks || []).map(
13899
+ (q) => q.queueId === queueId ? __spreadProps(__spreadValues({}, q), { isAutoDialQueue: value }) : q
13900
+ )
13901
+ }));
13902
+ };
13882
13903
  return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_material12.Box, { sx: { p: 2.5 }, children: [
13883
13904
  createOpen && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
13884
13905
  import_material12.Box,
@@ -14004,6 +14025,7 @@ function QueueLinkingTab({
14004
14025
  /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_material12.TableCell, { sx: headCellSx, children: "Queue Name" }),
14005
14026
  /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_material12.TableCell, { sx: headCellSx, children: "Priority Override" }),
14006
14027
  /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_material12.TableCell, { sx: headCellSx, children: "Min Wait Before Callback" }),
14028
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_material12.TableCell, { sx: __spreadProps(__spreadValues({}, headCellSx), { textAlign: "center" }), children: "Auto Dial" }),
14007
14029
  /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_material12.TableCell, { sx: __spreadProps(__spreadValues({}, headCellSx), { textAlign: "right" }), children: "Action" })
14008
14030
  ] }) }),
14009
14031
  /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_material12.TableBody, { children: queueLinks.map((q) => {
@@ -14034,6 +14056,18 @@ function QueueLinkingTab({
14034
14056
  sx: { width: 100, "& .MuiOutlinedInput-root": { borderRadius: "4px" } }
14035
14057
  }
14036
14058
  ) }),
14059
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_material12.TableCell, { sx: __spreadProps(__spreadValues({}, bodyCellSx), { textAlign: "center" }), children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
14060
+ import_material12.Switch,
14061
+ {
14062
+ size: "small",
14063
+ checked: !!q.isAutoDialQueue,
14064
+ onChange: (e) => handleAutoDialToggle(q.queueId, e.target.checked),
14065
+ sx: {
14066
+ "& .MuiSwitch-switchBase.Mui-checked": { color: "#1A5F6C" },
14067
+ "& .MuiSwitch-switchBase.Mui-checked + .MuiSwitch-track": { backgroundColor: "#1A5F6C" }
14068
+ }
14069
+ }
14070
+ ) }),
14037
14071
  /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_material12.TableCell, { sx: __spreadProps(__spreadValues({}, bodyCellSx), { textAlign: "right" }), children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(SDKButton, { variant: "danger", size: "small", onClick: () => handleRemoveQueue(q.queueId), children: "Remove" }) })
14038
14072
  ] }, q.queueId);
14039
14073
  }) })
@@ -21385,19 +21419,23 @@ var managementDashboard_exports = {};
21385
21419
  __export(managementDashboard_exports, {
21386
21420
  default: () => managementDashboard_default
21387
21421
  });
21388
- function DirectionCard({ title, data }) {
21422
+ function DirectionCard({ title, data, icon }) {
21389
21423
  return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(import_material24.Paper, { sx: cardPaper, children: [
21390
21424
  /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_material24.Box, { sx: cardHeader, children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_material24.Typography, { sx: labelSx2, children: title }) }),
21391
21425
  /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(import_material24.Box, { sx: { p: 1.5 }, children: [
21392
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_material24.Typography, { sx: { fontFamily: "'Barlow Condensed', sans-serif", fontSize: 32, fontWeight: 800, color: C4.navy, lineHeight: 1, mb: 1.2 }, children: data.total.toLocaleString() }),
21393
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_material24.Box, { sx: { display: "grid", gridTemplateColumns: "1fr 1fr", gap: 1, borderTop: `2px solid ${C4.s3}`, pt: 1 }, children: [
21394
- { label: "ANSWERED", value: data.answered, pct: data.answered_pct, color: C4.blue },
21395
- { label: "UNANSWERED", value: data.unanswered, pct: data.unanswered_pct, color: C4.t3 }
21396
- ].map(({ label, value, pct, color }) => /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(import_material24.Box, { children: [
21426
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(import_material24.Box, { sx: { display: "flex", alignItems: "center", justifyContent: "center", gap: 1, mb: 1.2 }, children: [
21427
+ icon,
21428
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_material24.Typography, { sx: { fontFamily: "'Barlow Condensed', sans-serif", fontSize: 32, fontWeight: 800, color: C4.navy, lineHeight: 1 }, children: data.total.toLocaleString() })
21429
+ ] }),
21430
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_material24.Box, { sx: { display: "grid", gridTemplateColumns: "1fr 1fr", borderTop: `2px solid ${C4.s3}`, pt: 1 }, children: [
21431
+ { label: "ANSWERED", value: data.answered, pct: data.answered_pct },
21432
+ { label: "UNANSWERED", value: data.unanswered, pct: data.unanswered_pct }
21433
+ ].map(({ label, value, pct }, idx) => /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(import_material24.Box, { sx: __spreadValues({ textAlign: "center" }, idx === 0 && { borderRight: `1px solid ${C4.b1}` }), children: [
21397
21434
  /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_material24.Typography, { sx: { fontSize: 10, fontWeight: 700, letterSpacing: 0.5, color: C4.t3, mb: 0.3 }, children: label }),
21398
- /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(import_material24.Box, { sx: { display: "flex", alignItems: "baseline", gap: 0.5 }, children: [
21399
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_material24.Typography, { sx: { fontSize: 18, fontWeight: 700, color }, children: value.toLocaleString() }),
21400
- /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(import_material24.Typography, { sx: { fontSize: 11, color: C4.t3 }, children: [
21435
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(import_material24.Box, { sx: { display: "flex", alignItems: "baseline", justifyContent: "center", gap: 0.5 }, children: [
21436
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_material24.Typography, { sx: { fontSize: 15, fontWeight: 700, color: C4.blue }, children: value.toLocaleString() }),
21437
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_material24.Typography, { sx: { fontSize: 11, color: C4.t3 }, children: "|" }),
21438
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(import_material24.Typography, { sx: { fontSize: 12, fontWeight: 600, color: C4.blue }, children: [
21401
21439
  pct.toFixed(1),
21402
21440
  "%"
21403
21441
  ] })
@@ -21407,70 +21445,77 @@ function DirectionCard({ title, data }) {
21407
21445
  ] });
21408
21446
  }
21409
21447
  function QueueCallsCard({ data }) {
21448
+ const maxCount = data.reduce((m, q) => Math.max(m, q.call_count), 0) || 1;
21410
21449
  return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(import_material24.Paper, { sx: cardPaper, children: [
21411
21450
  /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_material24.Box, { sx: cardHeader, children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_material24.Typography, { sx: labelSx2, children: "Queue Wise Calls" }) }),
21412
21451
  /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(import_material24.Box, { sx: { p: 1.5 }, children: [
21413
21452
  data.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_material24.Typography, { sx: { fontSize: 12, color: C4.t3, textAlign: "center", py: 2 }, children: "No data" }),
21414
- data.map((q, i) => /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(import_material24.Box, { sx: { display: "flex", justifyContent: "space-between", alignItems: "center", py: 0.6, borderBottom: `1px solid #f0f0f0`, "&:last-child": { borderBottom: "none" } }, children: [
21415
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_material24.Typography, { sx: { fontSize: 12, fontWeight: 600, color: C4.t2 }, children: q.queue_name }),
21416
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_material24.Box, { sx: { background: i === 0 ? "#3182ce" : "#90cdf4", color: i === 0 ? "#fff" : "#1a365d", borderRadius: "4px", px: 1.2, py: 0.3, minWidth: 44, textAlign: "center", fontSize: 14, fontWeight: 700 }, children: q.call_count })
21417
- ] }, q.queue_name))
21453
+ data.map((q, i) => {
21454
+ const pct = Math.max(6, q.call_count / maxCount * 100);
21455
+ return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(import_material24.Box, { sx: { mb: 0.7, "&:last-child": { mb: 0 } }, children: [
21456
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(import_material24.Box, { sx: { display: "flex", justifyContent: "space-between", alignItems: "center", mb: 0.3 }, children: [
21457
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_material24.Typography, { sx: { fontSize: 12, fontWeight: 600, color: C4.t2 }, children: q.queue_name }),
21458
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_material24.Typography, { sx: { fontSize: 13, fontWeight: 700, color: C4.blue }, children: q.call_count })
21459
+ ] }),
21460
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_material24.Box, { sx: { height: 6, background: C4.s3, borderRadius: 3, overflow: "hidden" }, children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_material24.Box, { sx: { height: "100%", width: `${pct}%`, background: i === 0 ? C4.blue : "#7fb3bd", borderRadius: 3 } }) })
21461
+ ] }, q.queue_name);
21462
+ })
21418
21463
  ] })
21419
21464
  ] });
21420
21465
  }
21421
- function AbandonedCard({ data }) {
21422
- return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(import_material24.Paper, { sx: cardPaper, children: [
21423
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_material24.Box, { sx: cardHeader, children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_material24.Typography, { sx: labelSx2, children: "Abandoned Patients" }) }),
21424
- /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(import_material24.Box, { sx: { p: 1.5 }, children: [
21425
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_material24.Typography, { sx: { fontFamily: "'Barlow Condensed', sans-serif", fontSize: 30, fontWeight: 800, color: C4.navy, lineHeight: 1, mb: 1 }, children: data.total.toLocaleString() }),
21426
- [
21427
- { label: "Called Back Patients", value: data.called_back, pct: data.called_back_pct },
21428
- { label: "To be Called Patients", value: data.to_call, pct: data.to_call_pct }
21429
- ].map(({ label, value, pct }) => /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(import_material24.Box, { sx: { mb: 0.4 }, children: [
21430
- /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(import_material24.Typography, { sx: { fontSize: 11, color: C4.t3, display: "inline" }, children: [
21431
- label,
21432
- " "
21433
- ] }),
21434
- /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(import_material24.Typography, { sx: { fontSize: 13, fontWeight: 700, color: C4.blue, display: "inline" }, children: [
21435
- value,
21436
- " "
21437
- ] }),
21438
- /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(import_material24.Typography, { sx: { fontSize: 11, fontWeight: 700, color: "#48bb78", display: "inline" }, children: [
21439
- pct.toFixed(1),
21466
+ function AbandonedCallbackCard({ data }) {
21467
+ const numCellSx = { p: 1, textAlign: "center" };
21468
+ const subCellSx = { p: 1, textAlign: "center", borderTop: `1px solid ${C4.b1}` };
21469
+ const subLabelSx = { fontSize: 10, fontWeight: 600, color: C4.t3, mb: 0.3, lineHeight: 1.2 };
21470
+ const subRowSx = { display: "flex", alignItems: "baseline", justifyContent: "center", gap: 0.5 };
21471
+ return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_material24.Paper, { sx: cardPaper, children: /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(import_material24.Box, { sx: { display: "grid", gridTemplateColumns: "1fr 1fr" }, children: [
21472
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_material24.Box, { sx: __spreadProps(__spreadValues({}, cardHeader), { borderRight: `1px solid ${C4.b1}` }), children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_material24.Typography, { sx: labelSx2, children: "Abandoned Patients" }) }),
21473
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_material24.Box, { sx: cardHeader, children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_material24.Typography, { sx: labelSx2, children: "Avg Callback Duration" }) }),
21474
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_material24.Box, { sx: __spreadProps(__spreadValues({}, numCellSx), { borderRight: `1px solid ${C4.b1}` }), children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_material24.Typography, { sx: { fontFamily: "'Barlow Condensed', sans-serif", fontSize: 30, fontWeight: 800, color: C4.navy, lineHeight: 1 }, children: data.total.toLocaleString() }) }),
21475
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_material24.Box, { sx: numCellSx, children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_material24.Typography, { sx: { fontFamily: "'JetBrains Mono', monospace", fontSize: 24, fontWeight: 700, color: C4.navy, letterSpacing: 1 }, children: data.avg_callback_duration }) }),
21476
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(import_material24.Box, { sx: __spreadProps(__spreadValues({}, subCellSx), { borderRight: `1px solid ${C4.b1}` }), children: [
21477
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_material24.Typography, { sx: subLabelSx, children: "Called Back Patients" }),
21478
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(import_material24.Box, { sx: subRowSx, children: [
21479
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_material24.Typography, { sx: { fontSize: 13, fontWeight: 700, color: C4.blue }, children: data.called_back }),
21480
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_material24.Typography, { sx: { fontSize: 11, color: C4.t3 }, children: "|" }),
21481
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(import_material24.Typography, { sx: { fontSize: 12, fontWeight: 600, color: C4.blue }, children: [
21482
+ data.called_back_pct.toFixed(1),
21440
21483
  "%"
21441
21484
  ] })
21442
- ] }, label))
21485
+ ] })
21486
+ ] }),
21487
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(import_material24.Box, { sx: subCellSx, children: [
21488
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_material24.Typography, { sx: subLabelSx, children: "To be Called Patients" }),
21489
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(import_material24.Box, { sx: subRowSx, children: [
21490
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_material24.Typography, { sx: { fontSize: 13, fontWeight: 700, color: C4.blue }, children: data.to_call }),
21491
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_material24.Typography, { sx: { fontSize: 11, color: C4.t3 }, children: "|" }),
21492
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(import_material24.Typography, { sx: { fontSize: 12, fontWeight: 600, color: C4.blue }, children: [
21493
+ data.to_call_pct.toFixed(1),
21494
+ "%"
21495
+ ] })
21496
+ ] })
21443
21497
  ] })
21444
- ] });
21445
- }
21446
- function AvgCallbackCard({ duration }) {
21447
- return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(import_material24.Paper, { sx: cardPaper, children: [
21448
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_material24.Box, { sx: cardHeader, children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_material24.Typography, { sx: labelSx2, children: "Avg Callback Duration" }) }),
21449
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_material24.Box, { sx: { p: 1.5 }, children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_material24.Typography, { sx: { fontFamily: "'JetBrains Mono', monospace", fontSize: 26, fontWeight: 700, color: C4.navy, mt: 1, letterSpacing: 1 }, children: duration }) })
21450
- ] });
21498
+ ] }) });
21451
21499
  }
21452
21500
  function IvrCard({ data }) {
21453
21501
  return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(import_material24.Paper, { sx: cardPaper, children: [
21454
21502
  /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_material24.Box, { sx: cardHeader, children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_material24.Typography, { sx: labelSx2, children: "IVR Patients" }) }),
21455
21503
  /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(import_material24.Box, { sx: { p: 1.5 }, children: [
21456
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_material24.Typography, { sx: { fontFamily: "'Barlow Condensed', sans-serif", fontSize: 30, fontWeight: 800, color: C4.navy, lineHeight: 1, mb: 1 }, children: data.total.toLocaleString() }),
21457
- [
21504
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_material24.Typography, { sx: { fontFamily: "'Barlow Condensed', sans-serif", fontSize: 30, fontWeight: 800, color: C4.navy, lineHeight: 1, mb: 1, textAlign: "center" }, children: data.total.toLocaleString() }),
21505
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_material24.Box, { sx: { display: "grid", gridTemplateColumns: "1fr 1fr", borderTop: `2px solid ${C4.s3}`, pt: 1 }, children: [
21458
21506
  { label: "Called Back", value: data.called_back, pct: data.called_back_pct },
21459
21507
  { label: "To Be Called", value: data.to_call, pct: data.to_call_pct }
21460
- ].map(({ label, value, pct }) => /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(import_material24.Box, { sx: { mb: 0.4 }, children: [
21461
- /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(import_material24.Typography, { sx: { fontSize: 11, color: C4.t3, display: "inline" }, children: [
21462
- label,
21463
- " "
21464
- ] }),
21465
- /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(import_material24.Typography, { sx: { fontSize: 13, fontWeight: 700, color: C4.blue, display: "inline" }, children: [
21466
- value,
21467
- " "
21468
- ] }),
21469
- /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(import_material24.Typography, { sx: { fontSize: 11, fontWeight: 700, color: "#48bb78", display: "inline" }, children: [
21470
- pct.toFixed(1),
21471
- "%"
21508
+ ].map(({ label, value, pct }, idx) => /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(import_material24.Box, { sx: __spreadValues({ textAlign: "center", px: 0.5 }, idx === 0 && { borderRight: `1px solid ${C4.b1}` }), children: [
21509
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_material24.Typography, { sx: { fontSize: 10, fontWeight: 600, color: C4.t3, mb: 0.3, lineHeight: 1.2 }, children: label }),
21510
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(import_material24.Box, { sx: { display: "flex", alignItems: "baseline", justifyContent: "center", gap: 0.5 }, children: [
21511
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_material24.Typography, { sx: { fontSize: 13, fontWeight: 700, color: C4.blue }, children: value }),
21512
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_material24.Typography, { sx: { fontSize: 11, color: C4.t3 }, children: "|" }),
21513
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(import_material24.Typography, { sx: { fontSize: 12, fontWeight: 600, color: C4.blue }, children: [
21514
+ pct.toFixed(1),
21515
+ "%"
21516
+ ] })
21472
21517
  ] })
21473
- ] }, label))
21518
+ ] }, label)) })
21474
21519
  ] })
21475
21520
  ] });
21476
21521
  }
@@ -21489,7 +21534,6 @@ function ManagementDashboardContent() {
21489
21534
  const [loading, setLoading] = (0, import_react34.useState)(false);
21490
21535
  const [error, setError] = (0, import_react34.useState)("");
21491
21536
  const [repeatedSearch, setRepeatedSearch] = (0, import_react34.useState)("");
21492
- const [chartDir, setChartDir] = (0, import_react34.useState)("inbound");
21493
21537
  const chartRef = (0, import_react34.useRef)(null);
21494
21538
  const fetchDashboard = (0, import_react34.useCallback)(async () => {
21495
21539
  var _a2, _b;
@@ -21547,7 +21591,7 @@ function ManagementDashboardContent() {
21547
21591
  ctx.fillRect(0, 0, canvas.width, canvas.height);
21548
21592
  ctx.drawImage(img, 0, 0);
21549
21593
  const a = document.createElement("a");
21550
- a.download = `hourly_chart_${chartDir}.png`;
21594
+ a.download = `hourly_chart.png`;
21551
21595
  a.href = canvas.toDataURL("image/png");
21552
21596
  a.click();
21553
21597
  };
@@ -21605,15 +21649,14 @@ function ManagementDashboardContent() {
21605
21649
  !loading && /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(import_material24.Box, { sx: { px: { xs: 1, md: 2 }, py: 1.5 }, children: [
21606
21650
  /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(import_material24.Box, { sx: {
21607
21651
  display: "grid",
21608
- gridTemplateColumns: { xs: "1fr", sm: "repeat(2, 1fr)", md: "repeat(3, 1fr)", lg: "1.3fr 1.2fr 1.1fr 0.75fr 1.3fr 1.1fr" },
21652
+ gridTemplateColumns: { xs: "1fr", sm: "repeat(2, 1fr)", md: "repeat(3, 1fr)", lg: "1.3fr 1.2fr 1.9fr 1.3fr 1.1fr" },
21609
21653
  gap: 1.2,
21610
21654
  mb: 1.2
21611
21655
  }, children: [
21612
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(DirectionCard, { title: "Inbound Calls", data: data.inbound }),
21656
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(DirectionCard, { title: "Inbound Calls", data: data.inbound, icon: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_PhoneCallback.default, { sx: numIconSx }) }),
21613
21657
  /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(QueueCallsCard, { data: data.queue_calls }),
21614
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(AbandonedCard, { data: data.abandoned }),
21615
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(AvgCallbackCard, { duration: data.abandoned.avg_callback_duration }),
21616
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(DirectionCard, { title: "Outbound Calls", data: data.outbound }),
21658
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(AbandonedCallbackCard, { data: data.abandoned }),
21659
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(DirectionCard, { title: "Outbound Calls", data: data.outbound, icon: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_PhoneForwarded.default, { sx: numIconSx }) }),
21617
21660
  /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(IvrCard, { data: data.ivr })
21618
21661
  ] }),
21619
21662
  /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(import_material24.Box, { sx: {
@@ -21662,11 +21705,11 @@ function ManagementDashboardContent() {
21662
21705
  ] }),
21663
21706
  /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(import_material24.Paper, { sx: cardPaper, children: [
21664
21707
  /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_material24.Box, { sx: cardHeader, children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_material24.Typography, { sx: labelSx2, children: "Inbound Average Waiting" }) }),
21665
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_material24.Box, { sx: { p: 1.5, display: "grid", gridTemplateColumns: "1fr 1fr 1fr", gap: 1, mt: 0.5 }, children: [
21708
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_material24.Box, { sx: { p: 1.5, display: "grid", gridTemplateColumns: "1fr 1fr 1fr", mt: 0.5 }, children: [
21666
21709
  { label: "Waiting Time", value: data.waiting.avg_wait_time },
21667
21710
  { label: "Language Selection", value: data.waiting.avg_lang_selection },
21668
21711
  { label: "Queue Waiting", value: data.waiting.avg_queue_wait }
21669
- ].map(({ label, value }) => /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(import_material24.Box, { sx: { textAlign: "center" }, children: [
21712
+ ].map(({ label, value }, idx) => /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(import_material24.Box, { sx: __spreadValues({ textAlign: "center", px: 0.5 }, idx < 2 && { borderRight: `1px solid ${C4.b1}` }), children: [
21670
21713
  /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_material24.Typography, { sx: { fontSize: 10, fontWeight: 600, color: C4.t3, mb: 0.5 }, children: label }),
21671
21714
  /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_material24.Typography, { sx: __spreadProps(__spreadValues({}, monoSx2), { fontSize: 18, color: C4.blue }), children: value })
21672
21715
  ] }, label)) })
@@ -21694,41 +21737,26 @@ function ManagementDashboardContent() {
21694
21737
  ] }),
21695
21738
  /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(import_material24.Box, { sx: { display: "grid", gridTemplateColumns: { xs: "1fr", lg: "1fr 1fr" }, gap: 1.2 }, children: [
21696
21739
  /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(import_material24.Paper, { sx: cardPaper, children: [
21697
- /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(import_material24.Box, { sx: __spreadProps(__spreadValues({}, cardHeader), { flexWrap: "wrap", gap: 1 }), children: [
21740
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(import_material24.Box, { sx: __spreadProps(__spreadValues({}, cardHeader), { flexWrap: "wrap", gap: 1, justifyContent: "space-between" }), children: [
21698
21741
  /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(import_material24.Box, { children: [
21699
21742
  /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_material24.Typography, { sx: labelSx2, children: "Avg Hour Wise Inbound Calls vs Agents" }),
21700
21743
  /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_material24.Stack, { direction: "row", spacing: 1.5, sx: { mt: 0.5 }, children: [
21701
- { color: "#f6a623", label: "Answered" },
21702
- { color: "#90a4c0", label: "Abandoned" },
21703
- { color: "#4a5568", label: "Agents" }
21744
+ { color: "#F2B51D", label: "Answered" },
21745
+ { color: "#9fc4cb", label: "Abandoned" },
21746
+ { color: "#14505b", label: "Agents" }
21704
21747
  ].map(({ color, label }) => /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(import_material24.Box, { sx: { display: "flex", alignItems: "center", gap: 0.5 }, children: [
21705
21748
  /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_material24.Box, { sx: { width: 12, height: 12, borderRadius: "2px", background: color } }),
21706
21749
  /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_material24.Typography, { sx: { fontSize: 11, color: C4.t3 }, children: label })
21707
21750
  ] }, label)) })
21708
21751
  ] }),
21709
- /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(import_material24.Box, { sx: { display: "flex", flexDirection: "column", alignItems: "flex-end", gap: 0.5 }, children: [
21710
- /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
21711
- import_material24.RadioGroup,
21712
- {
21713
- row: true,
21714
- value: chartDir,
21715
- onChange: (e) => setChartDir(e.target.value),
21716
- sx: { "& .MuiFormControlLabel-root": { mr: 0.5 }, "& .MuiFormControlLabel-label": { fontSize: 12 } },
21717
- children: [
21718
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_material24.FormControlLabel, { value: "inbound", control: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_material24.Radio, { size: "small" }), label: "Inbound" }),
21719
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_material24.FormControlLabel, { value: "outbound", control: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_material24.Radio, { size: "small" }), label: "Outbound" })
21720
- ]
21721
- }
21722
- ),
21723
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
21724
- import_material24.Typography,
21725
- {
21726
- onClick: downloadChart,
21727
- sx: { fontSize: 11, color: "#3182ce", cursor: "pointer", border: "1px solid #bee3f8", borderRadius: "4px", px: 1, py: 0.3 },
21728
- children: "\u2B07 DOWNLOAD"
21729
- }
21730
- )
21731
- ] })
21752
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_material24.Box, { sx: { display: "flex", flexDirection: "column", alignItems: "flex-end", gap: 0.5 }, children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
21753
+ import_material24.Typography,
21754
+ {
21755
+ onClick: downloadChart,
21756
+ sx: { fontSize: 11, color: C4.blue, cursor: "pointer", border: `1px solid ${C4.b2}`, borderRadius: "4px", px: 1, py: 0.3 },
21757
+ children: "\u2B07 DOWNLOAD"
21758
+ }
21759
+ ) })
21732
21760
  ] }),
21733
21761
  /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_material24.Box, { ref: chartRef, sx: { p: 1.5, height: 260 }, children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_recharts2.ResponsiveContainer, { width: "100%", height: "100%", children: /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(import_recharts2.ComposedChart, { data: hourlyData, margin: { top: 4, right: 30, left: -20, bottom: 0 }, barGap: 1, children: [
21734
21762
  /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_recharts2.CartesianGrid, { strokeDasharray: "3 3", stroke: C4.b2, vertical: false }),
@@ -21739,16 +21767,19 @@ function ManagementDashboardContent() {
21739
21767
  import_recharts2.Tooltip,
21740
21768
  {
21741
21769
  contentStyle: { fontSize: 11, borderRadius: 6, border: `1px solid ${C4.b2}` },
21742
- formatter: (v, n) => [v, n.charAt(0).toUpperCase() + n.slice(1)]
21770
+ formatter: (v, n) => {
21771
+ const s2 = String(n != null ? n : "");
21772
+ return [v, s2.charAt(0).toUpperCase() + s2.slice(1)];
21773
+ }
21743
21774
  }
21744
21775
  ),
21745
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_recharts2.Bar, { yAxisId: "left", dataKey: "answered", fill: "#f6a623", radius: [2, 2, 0, 0], maxBarSize: 14 }),
21746
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_recharts2.Bar, { yAxisId: "left", dataKey: "abandoned", fill: "#90a4c0", radius: [2, 2, 0, 0], maxBarSize: 14 }),
21747
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_recharts2.Line, { yAxisId: "right", type: "monotone", dataKey: "agents", stroke: "#4a5568", strokeWidth: 1.5, dot: { r: 2, fill: "#4a5568" } })
21776
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_recharts2.Bar, { yAxisId: "left", dataKey: "answered", fill: "#F2B51D", radius: [2, 2, 0, 0], maxBarSize: 14 }),
21777
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_recharts2.Bar, { yAxisId: "left", dataKey: "abandoned", fill: "#9fc4cb", radius: [2, 2, 0, 0], maxBarSize: 14 }),
21778
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_recharts2.Line, { yAxisId: "right", type: "monotone", dataKey: "agents", stroke: "#14505b", strokeWidth: 1.5, dot: { r: 2, fill: "#14505b" } })
21748
21779
  ] }) }) })
21749
21780
  ] }),
21750
21781
  /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(import_material24.Paper, { sx: cardPaper, children: [
21751
- /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(import_material24.Box, { sx: cardHeader, children: [
21782
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(import_material24.Box, { sx: __spreadProps(__spreadValues({}, cardHeader), { justifyContent: "space-between" }), children: [
21752
21783
  /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_material24.Typography, { sx: labelSx2, children: "Repeated Calls" }),
21753
21784
  /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_material24.Chip, { label: data.repeated_calls.length, size: "small", sx: { background: C4.rlt, color: C4.red, fontWeight: 700, fontSize: 11 } })
21754
21785
  ] }),
@@ -21790,7 +21821,7 @@ function ManagementDashboardContent() {
21790
21821
  ] })
21791
21822
  ] }) });
21792
21823
  }
21793
- var import_react34, import_material24, import_dayjs7, import_LocalizationProvider6, import_AdapterDayjs6, import_recharts2, import_Search5, import_FileDownload4, import_Refresh7, import_jsx_runtime26, C4, headSx, cellSx, monoSx2, labelSx2, cardPaper, cardHeader, EMPTY, ManagementDashboard, managementDashboard_default;
21824
+ var import_react34, import_material24, import_dayjs7, import_LocalizationProvider6, import_AdapterDayjs6, import_recharts2, import_Search5, import_FileDownload4, import_Refresh7, import_PhoneCallback, import_PhoneForwarded, import_jsx_runtime26, C4, headSx, cellSx, monoSx2, labelSx2, cardPaper, cardHeader, numIconSx, EMPTY, ManagementDashboard, managementDashboard_default;
21794
21825
  var init_managementDashboard = __esm({
21795
21826
  "call-control-sdk/lib/pages/managementDashboard/index.tsx"() {
21796
21827
  "use strict";
@@ -21803,6 +21834,8 @@ var init_managementDashboard = __esm({
21803
21834
  import_Search5 = __toESM(require("@mui/icons-material/Search"));
21804
21835
  import_FileDownload4 = __toESM(require("@mui/icons-material/FileDownload"));
21805
21836
  import_Refresh7 = __toESM(require("@mui/icons-material/Refresh"));
21837
+ import_PhoneCallback = __toESM(require("@mui/icons-material/PhoneCallback"));
21838
+ import_PhoneForwarded = __toESM(require("@mui/icons-material/PhoneForwarded"));
21806
21839
  init_PageHeader();
21807
21840
  init_ReportFilterBar();
21808
21841
  init_AppButton();
@@ -21811,32 +21844,33 @@ var init_managementDashboard = __esm({
21811
21844
  init_useManagementDashboard();
21812
21845
  import_jsx_runtime26 = require("react/jsx-runtime");
21813
21846
  C4 = {
21814
- navy: "#1a3a6b",
21815
- blue: "#2b6cb0",
21816
- green: "#276749",
21817
- amber: "#c47c00",
21818
- red: "#c53030",
21819
- teal: "#0b7a8f",
21847
+ navy: "#14505b",
21848
+ blue: "#1A5F6C",
21849
+ green: "#00A550",
21850
+ amber: "#C47C00",
21851
+ red: "#F05A22",
21852
+ teal: "#1A5F6C",
21820
21853
  surface: "#fff",
21821
- s2: "#f7f9fc",
21822
- s3: "#eef2f7",
21823
- b1: "rgba(20,50,100,.07)",
21824
- b2: "rgba(20,50,100,.13)",
21825
- t1: "#2d3748",
21826
- t2: "#4a5568",
21827
- t3: "#718096",
21828
- blt: "#e8f0fc",
21854
+ s2: "#f5f9fa",
21855
+ s3: "#e7f1f2",
21856
+ b1: "rgba(26,95,108,.08)",
21857
+ b2: "rgba(26,95,108,.16)",
21858
+ t1: "#1a2e33",
21859
+ t2: "#3d5a60",
21860
+ t3: "#6b8a90",
21861
+ blt: "#e3f1f3",
21829
21862
  glt: "#e4f6ef",
21830
21863
  alt: "#fdf3e0",
21831
- rlt: "#fde8e8",
21832
- tlt: "#e3f4f7"
21864
+ rlt: "#fdeae3",
21865
+ tlt: "#e3f1f3"
21833
21866
  };
21834
21867
  headSx = __spreadProps(__spreadValues({}, headCellSx2), { py: 1, px: 1.5 });
21835
21868
  cellSx = { fontSize: 12, py: 0.8, px: 1.5, borderBottom: `1px solid ${C4.b1}` };
21836
21869
  monoSx2 = { fontFamily: "'JetBrains Mono', monospace", fontSize: 12, fontWeight: 700 };
21837
21870
  labelSx2 = { fontSize: 11, fontWeight: 700, letterSpacing: 0.7, textTransform: "uppercase", color: C4.t2 };
21838
21871
  cardPaper = { background: C4.surface, border: `1px solid #dce3ef`, borderRadius: "6px", overflow: "hidden", boxShadow: "0 1px 4px rgba(0,0,0,.09)" };
21839
- cardHeader = { px: 1.5, py: 1, background: C4.s2, borderBottom: `1px solid ${C4.b1}`, display: "flex", alignItems: "center", justifyContent: "space-between" };
21872
+ cardHeader = { px: 1.5, py: 1, background: C4.s2, borderBottom: `1px solid ${C4.b1}`, display: "flex", alignItems: "center", justifyContent: "center" };
21873
+ numIconSx = { fontSize: 28, color: C4.blue };
21840
21874
  EMPTY = {
21841
21875
  inbound: { total: 0, answered: 0, unanswered: 0, answered_pct: 0, unanswered_pct: 0 },
21842
21876
  outbound: { total: 0, answered: 0, unanswered: 0, answered_pct: 0, unanswered_pct: 0 },
@@ -22025,6 +22059,7 @@ var init_caroQualityAuditDashboard = __esm({
22025
22059
  // call-control-sdk/index.ts
22026
22060
  var index_exports = {};
22027
22061
  __export(index_exports, {
22062
+ AgentDetailReport: () => agentDetailReport_default,
22028
22063
  CallControlPanel: () => CallControlPanel,
22029
22064
  SDKAccessDenied: () => SDKAccessDenied,
22030
22065
  SDKPages: () => SDKPages,
@@ -26450,30 +26485,32 @@ var import_react35 = __toESM(require("react"));
26450
26485
  init_SDKPermissionGuard();
26451
26486
  init_permissions();
26452
26487
  var import_jsx_runtime30 = require("react/jsx-runtime");
26453
- function withGuard(menuCodes, loader) {
26488
+ function withGuard(menuCodes, loader, permissions) {
26489
+ const permissionList = permissions ? Array.isArray(permissions) ? permissions : [permissions] : void 0;
26454
26490
  return import_react35.default.lazy(async () => {
26455
26491
  const mod = await loader();
26456
26492
  const Page = mod.default;
26457
- const Guarded = (props) => /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(SDKPermissionGuard, { menuFeature: menuCodes, children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Page, __spreadValues({}, props)) });
26493
+ const Guarded = (props) => /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(SDKPermissionGuard, { menuFeature: menuCodes, permissions: permissionList, children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Page, __spreadValues({}, props)) });
26458
26494
  return { default: Guarded };
26459
26495
  });
26460
26496
  }
26461
26497
  var SDKPages = {
26462
- CallHistory: withGuard(SDK_MENU_CODES.CALL_HISTORY, () => Promise.resolve().then(() => (init_callHistory(), callHistory_exports))),
26463
- Campaigns: withGuard(SDK_MENU_CODES.CAMPAIGNS, () => Promise.resolve().then(() => (init_campaigns(), campaigns_exports))),
26464
- LoginReport: withGuard(SDK_MENU_CODES.LOGIN_REPORT, () => Promise.resolve().then(() => (init_loginReport(), loginReport_exports))),
26465
- CdrReports: withGuard(SDK_MENU_CODES.CDR_REPORT, () => Promise.resolve().then(() => (init_cdrReport(), cdrReport_exports))),
26466
- AuditReportPage: withGuard(SDK_MENU_CODES.CDR_REPORT, () => Promise.resolve().then(() => (init_auditReport(), auditReport_exports))),
26467
- AgentPerformanceReport: withGuard(SDK_MENU_CODES.AGENT_PERFORMANCE_REPORT, () => Promise.resolve().then(() => (init_agentPerformanceReport(), agentPerformanceReport_exports))),
26468
- AgentDetailReport: withGuard(SDK_MENU_CODES.AGENT_DETAIL_REPORT, () => Promise.resolve().then(() => (init_agentDetailReport(), agentDetailReport_exports))),
26469
- LiveStatus: withGuard(SDK_MENU_CODES.LIVE_STATUS, () => Promise.resolve().then(() => (init_liveStatus(), liveStatus_exports))),
26470
- ManagementDashboard: withGuard(SDK_MENU_CODES.MANAGEMENT_DASHBOARD, () => Promise.resolve().then(() => (init_managementDashboard(), managementDashboard_exports))),
26471
- CaroVoiceAI: withGuard(SDK_MENU_CODES.CARO_VOICE_AI, () => Promise.resolve().then(() => (init_caroVoiceAI(), caroVoiceAI_exports))),
26472
- QualityAuditDashboard: withGuard(SDK_MENU_CODES.MANAGEMENT_DASHBOARD, () => Promise.resolve().then(() => (init_qualityAuditDashboard(), qualityAuditDashboard_exports))),
26473
- CaroQualityAuditDashboard: withGuard(SDK_MENU_CODES.MANAGEMENT_DASHBOARD, () => Promise.resolve().then(() => (init_caroQualityAuditDashboard(), caroQualityAuditDashboard_exports)))
26498
+ CallHistory: withGuard(SDK_MENU_CODES.CALL_HISTORY, () => Promise.resolve().then(() => (init_callHistory(), callHistory_exports)), SDK_PERMISSIONS.REPORTS_CALL_HISTORY_READ),
26499
+ Campaigns: withGuard(SDK_MENU_CODES.CAMPAIGNS, () => Promise.resolve().then(() => (init_campaigns(), campaigns_exports)), [SDK_PERMISSIONS.CAMPAIGNS_READ, SDK_PERMISSIONS.CAMPAIGNS_MANAGE]),
26500
+ LoginReport: withGuard(SDK_MENU_CODES.LOGIN_REPORT, () => Promise.resolve().then(() => (init_loginReport(), loginReport_exports)), [SDK_PERMISSIONS.REPORTS_AGENT_LOGIN_READ, SDK_PERMISSIONS.REPORTS_AGENT_LOGIN_MANAGE]),
26501
+ CdrReports: withGuard(SDK_MENU_CODES.CDR_REPORT, () => Promise.resolve().then(() => (init_cdrReport(), cdrReport_exports)), [SDK_PERMISSIONS.REPORTS_CDR_READ, SDK_PERMISSIONS.REPORTS_CDR_MANAGE]),
26502
+ AuditReportPage: withGuard(SDK_MENU_CODES.CDR_REPORT, () => Promise.resolve().then(() => (init_auditReport(), auditReport_exports)), [SDK_PERMISSIONS.REPORTS_CDR_READ, SDK_PERMISSIONS.REPORTS_CDR_MANAGE]),
26503
+ AgentPerformanceReport: withGuard(SDK_MENU_CODES.AGENT_PERFORMANCE_REPORT, () => Promise.resolve().then(() => (init_agentPerformanceReport(), agentPerformanceReport_exports)), [SDK_PERMISSIONS.REPORTS_AGENT_PERFORMANCE_READ, SDK_PERMISSIONS.REPORTS_AGENT_PERFORMANCE_MANAGE]),
26504
+ AgentDetailReport: withGuard(SDK_MENU_CODES.AGENT_DETAIL_REPORT, () => Promise.resolve().then(() => (init_agentDetailReport(), agentDetailReport_exports)), [SDK_PERMISSIONS.REPORTS_AGENT_PERFORMANCE_READ, SDK_PERMISSIONS.REPORTS_AGENT_PERFORMANCE_MANAGE]),
26505
+ LiveStatus: withGuard(SDK_MENU_CODES.LIVE_STATUS, () => Promise.resolve().then(() => (init_liveStatus(), liveStatus_exports)), [SDK_PERMISSIONS.DASHBOARD_LIVE_STATUS_READ, SDK_PERMISSIONS.DASHBOARD_LIVE_STATUS_MANAGE]),
26506
+ ManagementDashboard: withGuard(SDK_MENU_CODES.MANAGEMENT_DASHBOARD, () => Promise.resolve().then(() => (init_managementDashboard(), managementDashboard_exports)), SDK_PERMISSIONS.MANAGEMENT_DASHBOARD_READ),
26507
+ CaroVoiceAI: withGuard(SDK_MENU_CODES.CARO_VOICE_AI, () => Promise.resolve().then(() => (init_caroVoiceAI(), caroVoiceAI_exports)), SDK_PERMISSIONS.CARO_VOICE_AI_READ),
26508
+ QualityAuditDashboard: withGuard(SDK_MENU_CODES.QUALITY_AUDIT_DASHBOARD, () => Promise.resolve().then(() => (init_qualityAuditDashboard(), qualityAuditDashboard_exports)), SDK_PERMISSIONS.QUALITY_AUDIT_DASHBOARD_READ),
26509
+ CaroQualityAuditDashboard: withGuard(SDK_MENU_CODES.CARO_QUALITY_AUDIT_DASHBOARD, () => Promise.resolve().then(() => (init_caroQualityAuditDashboard(), caroQualityAuditDashboard_exports)), SDK_PERMISSIONS.CARO_VOICE_AI_DASHBOARD_READ)
26474
26510
  };
26475
26511
 
26476
26512
  // call-control-sdk/index.ts
26513
+ init_agentDetailReport();
26477
26514
  init_AuditReport();
26478
26515
  init_SDKPermissionGuard();
26479
26516
  init_SDKAccessDenied();