call-control-sdk 6.5.1-uat.7 → 6.5.2-uat.3
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/index.js +312 -102
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +319 -105
- package/dist/index.mjs.map +1 -1
- package/package.json +7 -2
package/dist/index.js
CHANGED
|
@@ -60,6 +60,9 @@ __export(index_exports, {
|
|
|
60
60
|
});
|
|
61
61
|
module.exports = __toCommonJS(index_exports);
|
|
62
62
|
|
|
63
|
+
// call-control-sdk/lib/hooks/sdk-state.ts
|
|
64
|
+
var import_vault = require("@react-solutions/vault");
|
|
65
|
+
|
|
63
66
|
// call-control-sdk/lib/services/endPoint.ts
|
|
64
67
|
var IP = "uat-cti.aighospitals.com";
|
|
65
68
|
var BASE_URL = `https://${IP}:8095`;
|
|
@@ -89,7 +92,9 @@ var END_POINT = {
|
|
|
89
92
|
SEND_NOTIFICATIONS: `${BASE_URL}${VERSION.v1}/cti/notifications/send`,
|
|
90
93
|
CALL_HISTORY: `${BASE_URL}${VERSION.v1}/dashboard/call-history`,
|
|
91
94
|
SENTIMENTAL_ANALYSIS: `${BASE_URL}${VERSION.v1}/users/get_sentiment_analysis`,
|
|
92
|
-
DISPOSITIONS: `${BASE_URL}${VERSION.v1}/cti/calls/dispositions
|
|
95
|
+
DISPOSITIONS: `${BASE_URL}${VERSION.v1}/cti/calls/dispositions`,
|
|
96
|
+
HOSPITALS_SERVICES: `${BASE_URL}${VERSION.v1}/cti/hospital/services`,
|
|
97
|
+
BLIEND_TRANSFER: `${BASE_URL}${VERSION.v1}/cti/calls/blind_transfer?provider=convox`
|
|
93
98
|
};
|
|
94
99
|
var WS_END_POINT = {
|
|
95
100
|
WS: `${WS_BASE_URL}${VERSION.v1}/cti/ws`
|
|
@@ -201,9 +206,9 @@ var SDKStateManager = class {
|
|
|
201
206
|
loadFromStorage() {
|
|
202
207
|
var _a2, _b;
|
|
203
208
|
try {
|
|
204
|
-
const stored =
|
|
209
|
+
const stored = (0, import_vault.getItem)(this.STORAGE_KEY);
|
|
205
210
|
if (stored) {
|
|
206
|
-
const parsedState =
|
|
211
|
+
const parsedState = stored;
|
|
207
212
|
this.state = __spreadProps(__spreadValues({}, this.state), {
|
|
208
213
|
agentId: parsedState.agentId || "",
|
|
209
214
|
authorization: parsedState.authorization || void 0,
|
|
@@ -265,7 +270,7 @@ var SDKStateManager = class {
|
|
|
265
270
|
callData: this.state.callData,
|
|
266
271
|
conferenceLine: this.state.conferenceLine
|
|
267
272
|
};
|
|
268
|
-
|
|
273
|
+
(0, import_vault.setItem)(this.STORAGE_KEY, persistentState);
|
|
269
274
|
} catch (error) {
|
|
270
275
|
console.warn("Failed to save SDK state:", error);
|
|
271
276
|
}
|
|
@@ -462,7 +467,7 @@ var SDKStateManager = class {
|
|
|
462
467
|
}
|
|
463
468
|
clearStorageAndReset() {
|
|
464
469
|
try {
|
|
465
|
-
|
|
470
|
+
(0, import_vault.removeItem)(this.STORAGE_KEY);
|
|
466
471
|
this.state = this.getInitialState();
|
|
467
472
|
this.notifyListeners();
|
|
468
473
|
} catch (error) {
|
|
@@ -627,6 +632,7 @@ var axiosInstance = createAxiosInstance();
|
|
|
627
632
|
var axios_default = axiosInstance;
|
|
628
633
|
|
|
629
634
|
// call-control-sdk/lib/hooks/useLogout.ts
|
|
635
|
+
var import_vault2 = require("@react-solutions/vault");
|
|
630
636
|
var useLogout = () => {
|
|
631
637
|
const [loading, setLoading] = (0, import_react.useState)(false);
|
|
632
638
|
const [success, setSuccess] = (0, import_react.useState)(false);
|
|
@@ -634,8 +640,7 @@ var useLogout = () => {
|
|
|
634
640
|
const [error, setError] = (0, import_react.useState)(null);
|
|
635
641
|
const [data, setData] = (0, import_react.useState)(null);
|
|
636
642
|
const handleLogout = (0, import_react.useCallback)(async () => {
|
|
637
|
-
|
|
638
|
-
const state = JSON.parse((_a2 = localStorage.getItem(STORAGE_KEY)) != null ? _a2 : "");
|
|
643
|
+
const state = (0, import_vault2.getItem)(STORAGE_KEY);
|
|
639
644
|
setLoading(true);
|
|
640
645
|
const payload = {
|
|
641
646
|
action: "LOGOUTUSER",
|
|
@@ -643,16 +648,15 @@ var useLogout = () => {
|
|
|
643
648
|
};
|
|
644
649
|
return axios_default.post(END_POINT.LOGOUT, payload).then((res) => {
|
|
645
650
|
sdkStateManager.clearStorageAndReset();
|
|
646
|
-
|
|
647
|
-
sessionStorage.clear();
|
|
651
|
+
(0, import_vault2.removeItem)(STORAGE_KEY);
|
|
648
652
|
setData(res == null ? void 0 : res.data);
|
|
649
653
|
setSuccess(true);
|
|
650
654
|
return res == null ? void 0 : res.data;
|
|
651
655
|
}).catch((err) => {
|
|
652
|
-
var
|
|
656
|
+
var _a2;
|
|
653
657
|
setIsError(true);
|
|
654
658
|
setError(err);
|
|
655
|
-
return (
|
|
659
|
+
return (_a2 = err == null ? void 0 : err.response) == null ? void 0 : _a2.data;
|
|
656
660
|
}).finally(() => {
|
|
657
661
|
setLoading(false);
|
|
658
662
|
});
|
|
@@ -669,6 +673,7 @@ var useLogout = () => {
|
|
|
669
673
|
|
|
670
674
|
// call-control-sdk/lib/hooks/useEndCall.ts
|
|
671
675
|
var import_react2 = require("react");
|
|
676
|
+
var import_vault3 = require("@react-solutions/vault");
|
|
672
677
|
var useEndCall = () => {
|
|
673
678
|
const [loading, setLoading] = (0, import_react2.useState)(false);
|
|
674
679
|
const [success, setSuccess] = (0, import_react2.useState)(false);
|
|
@@ -678,21 +683,22 @@ var useEndCall = () => {
|
|
|
678
683
|
const handleEndCall = (0, import_react2.useCallback)(
|
|
679
684
|
async (data2) => {
|
|
680
685
|
var _a2, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p;
|
|
681
|
-
const state =
|
|
686
|
+
const state = (0, import_vault3.getItem)(STORAGE_KEY);
|
|
682
687
|
setLoading(true);
|
|
683
688
|
const payload = {
|
|
684
689
|
action: "ENDCALL",
|
|
685
690
|
userId: state == null ? void 0 : state.agentId,
|
|
686
|
-
processid: (
|
|
687
|
-
process_name: (
|
|
688
|
-
callreferenceid: (
|
|
689
|
-
mobile_number: (
|
|
690
|
-
disposition: (
|
|
691
|
-
set_followUp: (
|
|
692
|
-
callback_date: (
|
|
693
|
-
callback_hrs: (
|
|
694
|
-
callback_mins: (
|
|
695
|
-
endcall_type: "CLOSE"
|
|
691
|
+
processid: (_c = (_b = (_a2 = state == null ? void 0 : state.process) == null ? void 0 : _a2.process_id) == null ? void 0 : _b.toString()) != null ? _c : "",
|
|
692
|
+
process_name: (_e = (_d = state == null ? void 0 : state.process) == null ? void 0 : _d.process_name) != null ? _e : "",
|
|
693
|
+
callreferenceid: (_g = (_f = state == null ? void 0 : state.callData) == null ? void 0 : _f.convox_id) != null ? _g : "",
|
|
694
|
+
mobile_number: (_i = (_h = state == null ? void 0 : state.callData) == null ? void 0 : _h.phone_number) != null ? _i : "",
|
|
695
|
+
disposition: (_j = data2 == null ? void 0 : data2.disposition) != null ? _j : "RES",
|
|
696
|
+
set_followUp: (_k = data2 == null ? void 0 : data2.followUp) != null ? _k : "N",
|
|
697
|
+
callback_date: (_l = data2 == null ? void 0 : data2.callbackDate) != null ? _l : "",
|
|
698
|
+
callback_hrs: (_m = data2 == null ? void 0 : data2.callbackHrs) != null ? _m : "",
|
|
699
|
+
callback_mins: (_n = data2 == null ? void 0 : data2.callbackMins) != null ? _n : "",
|
|
700
|
+
endcall_type: "CLOSE",
|
|
701
|
+
patient_enquiry: (_o = data2 == null ? void 0 : data2.patientLog) != null ? _o : {}
|
|
696
702
|
};
|
|
697
703
|
return axios_default.post(END_POINT.END_CALL, payload, {
|
|
698
704
|
params: {
|
|
@@ -727,6 +733,7 @@ var useEndCall = () => {
|
|
|
727
733
|
|
|
728
734
|
// call-control-sdk/lib/hooks/useClickToCall.ts
|
|
729
735
|
var import_react3 = require("react");
|
|
736
|
+
var import_vault4 = require("@react-solutions/vault");
|
|
730
737
|
var useClickToCall = () => {
|
|
731
738
|
const [loading, setLoading] = (0, import_react3.useState)(false);
|
|
732
739
|
const [success, setSuccess] = (0, import_react3.useState)(false);
|
|
@@ -734,10 +741,10 @@ var useClickToCall = () => {
|
|
|
734
741
|
const [error, setError] = (0, import_react3.useState)(null);
|
|
735
742
|
const [data, setData] = (0, import_react3.useState)(null);
|
|
736
743
|
const handleStartCall = (0, import_react3.useCallback)(async (data2) => {
|
|
737
|
-
var _a2, _b, _c, _d, _e, _f, _g, _h
|
|
738
|
-
const state =
|
|
744
|
+
var _a2, _b, _c, _d, _e, _f, _g, _h;
|
|
745
|
+
const state = (0, import_vault4.getItem)(STORAGE_KEY);
|
|
739
746
|
setLoading(true);
|
|
740
|
-
if (((
|
|
747
|
+
if (((_a2 = state == null ? void 0 : state.callData) == null ? void 0 : _a2.status) === "IDLE") {
|
|
741
748
|
const payload = {
|
|
742
749
|
action: "CALL",
|
|
743
750
|
userId: state == null ? void 0 : state.agentId,
|
|
@@ -756,15 +763,15 @@ var useClickToCall = () => {
|
|
|
756
763
|
}).finally(() => {
|
|
757
764
|
setLoading(false);
|
|
758
765
|
});
|
|
759
|
-
} else if (((
|
|
760
|
-
const line_used = (
|
|
766
|
+
} else if (((_b = state == null ? void 0 : state.callData) == null ? void 0 : _b.status) === "ONCALL") {
|
|
767
|
+
const line_used = (_d = (_c = state == null ? void 0 : state.conferenceLine) == null ? void 0 : _c.filter((each) => each.line !== 1)) == null ? void 0 : _d.find((each) => each.status === "IDLE" && !(each == null ? void 0 : each.isCallStart));
|
|
761
768
|
const payload = {
|
|
762
769
|
action: "EXTERNAL_CONFERENCE",
|
|
763
770
|
operation: `CALL${line_used.line}`,
|
|
764
771
|
line_used: String(line_used.line),
|
|
765
772
|
thirdparty_no: data2 == null ? void 0 : data2.mobileNumber,
|
|
766
|
-
userid: (
|
|
767
|
-
process: (
|
|
773
|
+
userid: (_f = (_e = state.callData) == null ? void 0 : _e.agent_id) != null ? _f : "",
|
|
774
|
+
process: (_h = (_g = state.callData) == null ? void 0 : _g.process_name) != null ? _h : ""
|
|
768
775
|
};
|
|
769
776
|
return axios_default.post(END_POINT.CONFERENCE_CALL, payload).then((res) => {
|
|
770
777
|
setData(res == null ? void 0 : res.data);
|
|
@@ -1729,17 +1736,26 @@ function ConferenceDialog() {
|
|
|
1729
1736
|
) });
|
|
1730
1737
|
}
|
|
1731
1738
|
function CallTransferDialog({ open }) {
|
|
1732
|
-
var _a2, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l;
|
|
1739
|
+
var _a2, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u;
|
|
1733
1740
|
const state = useSDKState();
|
|
1741
|
+
const [mobileNumber, setMobileNumber] = (0, import_react9.useState)("");
|
|
1734
1742
|
const [transferCall] = usePostRequest({
|
|
1735
1743
|
onSuccess: () => {
|
|
1736
1744
|
sdkStateManager.setOpenCallTransferDialog(false);
|
|
1737
1745
|
}
|
|
1738
1746
|
});
|
|
1747
|
+
const [blindTransferCall] = usePostRequest({
|
|
1748
|
+
onSuccess: () => {
|
|
1749
|
+
sdkStateManager.setOpenCallTransferDialog(false);
|
|
1750
|
+
}
|
|
1751
|
+
});
|
|
1739
1752
|
const [currentselecteTab, setCurrentselecteTab] = (0, import_react9.useState)("process");
|
|
1740
1753
|
const [getIdelAgentsList, { data: idleAgentsList, isLoading: isIdleAgentsListLoading }] = usePostRequest({
|
|
1741
1754
|
disabledSuccessToast: true
|
|
1742
1755
|
});
|
|
1756
|
+
const [getHospitalsServicesList, { data: hospitalsServicesList, isLoading: isHospitalsServicesListLoading }] = useGetRequest({
|
|
1757
|
+
disabledSuccessToast: true
|
|
1758
|
+
});
|
|
1743
1759
|
const [
|
|
1744
1760
|
getProcessAndQueuesList,
|
|
1745
1761
|
{ data: processAndQueuesList, isLoading: isProcessAndQueuesListLoading }
|
|
@@ -1750,7 +1766,7 @@ function CallTransferDialog({ open }) {
|
|
|
1750
1766
|
sdkStateManager.setOpenCallTransferDialog(false);
|
|
1751
1767
|
};
|
|
1752
1768
|
const handleTransferCall = (data, type) => {
|
|
1753
|
-
var _a3, _b2, _c2, _d2, _e2, _f2, _g2, _h2, _i2, _j2, _k2, _l2,
|
|
1769
|
+
var _a3, _b2, _c2, _d2, _e2, _f2, _g2, _h2, _i2, _j2, _k2, _l2, _m2, _n2, _o2, _p2, _q2, _r2, _s2, _t2, _u2, _v, _w, _x, _y, _z, _A, _B, _C, _D, _E, _F, _G, _H, _I, _J, _K, _L;
|
|
1754
1770
|
if (type === "PROCESS") {
|
|
1755
1771
|
const payload = {
|
|
1756
1772
|
mobile_number: (_b2 = (_a3 = state.callData) == null ? void 0 : _a3.phone_number) != null ? _b2 : "",
|
|
@@ -1764,13 +1780,13 @@ function CallTransferDialog({ open }) {
|
|
|
1764
1780
|
transferCall(END_POINT.TRANSFER_CALL, payload);
|
|
1765
1781
|
} else if (type === "QUEUE") {
|
|
1766
1782
|
const payload = {
|
|
1767
|
-
mobile_number: (
|
|
1768
|
-
userid: (
|
|
1783
|
+
mobile_number: (_m2 = (_l2 = state.callData) == null ? void 0 : _l2.phone_number) != null ? _m2 : "",
|
|
1784
|
+
userid: (_o2 = (_n2 = state.callData) == null ? void 0 : _n2.agent_id) != null ? _o2 : "",
|
|
1769
1785
|
type: "QUEUE",
|
|
1770
|
-
transfer_to: (
|
|
1771
|
-
callreferenceid: (
|
|
1772
|
-
processid: String((
|
|
1773
|
-
process_name: (_v = (
|
|
1786
|
+
transfer_to: (_p2 = data == null ? void 0 : data.queue_name) != null ? _p2 : "",
|
|
1787
|
+
callreferenceid: (_r2 = (_q2 = state.callData) == null ? void 0 : _q2.convox_id) != null ? _r2 : "",
|
|
1788
|
+
processid: String((_t2 = (_s2 = state.callData) == null ? void 0 : _s2.process_id) != null ? _t2 : ""),
|
|
1789
|
+
process_name: (_v = (_u2 = state.callData) == null ? void 0 : _u2.process_name) != null ? _v : ""
|
|
1774
1790
|
};
|
|
1775
1791
|
transferCall(END_POINT.TRANSFER_CALL, payload);
|
|
1776
1792
|
} else if (type === "AGENT") {
|
|
@@ -1784,6 +1800,15 @@ function CallTransferDialog({ open }) {
|
|
|
1784
1800
|
process_name: (_G = (_F = state.callData) == null ? void 0 : _F.process_name) != null ? _G : ""
|
|
1785
1801
|
};
|
|
1786
1802
|
transferCall(END_POINT.TRANSFER_CALL, payload);
|
|
1803
|
+
} else if (type === "OTHER") {
|
|
1804
|
+
const payload = {
|
|
1805
|
+
action: "BLIND_TRANSFER",
|
|
1806
|
+
userid: (_I = (_H = state.callData) == null ? void 0 : _H.agent_id) != null ? _I : "",
|
|
1807
|
+
callreferenceid: (_K = (_J = state.callData) == null ? void 0 : _J.convox_id) != null ? _K : "",
|
|
1808
|
+
blind_transfer_no: (_L = data == null ? void 0 : data.mobile_number) != null ? _L : ""
|
|
1809
|
+
};
|
|
1810
|
+
console.log("payload", payload);
|
|
1811
|
+
blindTransferCall(END_POINT.BLIEND_TRANSFER, payload);
|
|
1787
1812
|
}
|
|
1788
1813
|
};
|
|
1789
1814
|
(0, import_react9.useEffect)(() => {
|
|
@@ -1795,6 +1820,7 @@ function CallTransferDialog({ open }) {
|
|
|
1795
1820
|
status: "ACTIVE",
|
|
1796
1821
|
active: true
|
|
1797
1822
|
});
|
|
1823
|
+
getHospitalsServicesList(END_POINT.HOSPITALS_SERVICES);
|
|
1798
1824
|
}, []);
|
|
1799
1825
|
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_jsx_runtime2.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
1800
1826
|
import_material3.Dialog,
|
|
@@ -1803,7 +1829,7 @@ function CallTransferDialog({ open }) {
|
|
|
1803
1829
|
"aria-labelledby": "alert-dialog-title",
|
|
1804
1830
|
"aria-describedby": "alert-dialog-description",
|
|
1805
1831
|
fullWidth: true,
|
|
1806
|
-
maxWidth: "
|
|
1832
|
+
maxWidth: "sm",
|
|
1807
1833
|
children: /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_material3.Paper, { sx: { borderRadius: 2 }, children: [
|
|
1808
1834
|
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
|
|
1809
1835
|
import_material3.Box,
|
|
@@ -1825,23 +1851,17 @@ function CallTransferDialog({ open }) {
|
|
|
1825
1851
|
import_material3.Box,
|
|
1826
1852
|
{
|
|
1827
1853
|
sx: {
|
|
1828
|
-
boxShadow: "1px 1px 4px #d3d3d3ff",
|
|
1829
|
-
padding: "6px 10px",
|
|
1830
1854
|
margin: "10px",
|
|
1831
1855
|
borderRadius: "10px"
|
|
1832
1856
|
},
|
|
1833
1857
|
children: [
|
|
1834
|
-
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_material3.Box, { sx: { display: "flex", gap: 1 }, children: [
|
|
1858
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_material3.Box, { sx: { display: "flex", gap: 1, margin: "10px" }, children: [
|
|
1835
1859
|
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
1836
1860
|
import_material3.Button,
|
|
1837
1861
|
{
|
|
1838
1862
|
variant: currentselecteTab === "process" ? "contained" : "outlined",
|
|
1839
1863
|
onClick: () => {
|
|
1840
1864
|
setCurrentselecteTab("process");
|
|
1841
|
-
getProcessAndQueuesList(END_POINT.TRANSFER_TO_DETAILS, {
|
|
1842
|
-
status: "ACTIVE",
|
|
1843
|
-
active: true
|
|
1844
|
-
});
|
|
1845
1865
|
},
|
|
1846
1866
|
children: "Process"
|
|
1847
1867
|
}
|
|
@@ -1852,10 +1872,6 @@ function CallTransferDialog({ open }) {
|
|
|
1852
1872
|
variant: currentselecteTab === "queues" ? "contained" : "outlined",
|
|
1853
1873
|
onClick: () => {
|
|
1854
1874
|
setCurrentselecteTab("queues");
|
|
1855
|
-
getProcessAndQueuesList(END_POINT.TRANSFER_TO_DETAILS, {
|
|
1856
|
-
status: "ACTIVE",
|
|
1857
|
-
active: true
|
|
1858
|
-
});
|
|
1859
1875
|
},
|
|
1860
1876
|
children: "Queues"
|
|
1861
1877
|
}
|
|
@@ -1873,9 +1889,19 @@ function CallTransferDialog({ open }) {
|
|
|
1873
1889
|
},
|
|
1874
1890
|
children: "Agents"
|
|
1875
1891
|
}
|
|
1892
|
+
),
|
|
1893
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
1894
|
+
import_material3.Button,
|
|
1895
|
+
{
|
|
1896
|
+
variant: currentselecteTab === "others" ? "contained" : "outlined",
|
|
1897
|
+
onClick: () => {
|
|
1898
|
+
setCurrentselecteTab("others");
|
|
1899
|
+
},
|
|
1900
|
+
children: "Others"
|
|
1901
|
+
}
|
|
1876
1902
|
)
|
|
1877
1903
|
] }),
|
|
1878
|
-
(isProcessAndQueuesListLoading || isIdleAgentsListLoading) && /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
|
|
1904
|
+
(isProcessAndQueuesListLoading || isIdleAgentsListLoading || isHospitalsServicesListLoading) && /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
|
|
1879
1905
|
import_material3.Box,
|
|
1880
1906
|
{
|
|
1881
1907
|
sx: {
|
|
@@ -1890,7 +1916,7 @@ function CallTransferDialog({ open }) {
|
|
|
1890
1916
|
]
|
|
1891
1917
|
}
|
|
1892
1918
|
),
|
|
1893
|
-
!isProcessAndQueuesListLoading && !isIdleAgentsListLoading && currentselecteTab === "process" && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_material3.Box, { sx: { display: "
|
|
1919
|
+
!isProcessAndQueuesListLoading && !isIdleAgentsListLoading && !isHospitalsServicesListLoading && currentselecteTab === "process" && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_material3.Box, { sx: { display: "grid", gridTemplateColumns: ((_a2 = processAndQueuesList == null ? void 0 : processAndQueuesList.data) == null ? void 0 : _a2.process) && ((_c = (_b = processAndQueuesList == null ? void 0 : processAndQueuesList.data) == null ? void 0 : _b.process) == null ? void 0 : _c.length) > 0 ? "repeat(2, 1fr)" : "repeat(1, 1fr)", gap: 1, padding: "10px", flexWrap: "wrap", boxShadow: "1px 1px 4px #d3d3d3ff", borderRadius: "10px" }, children: ((_d = processAndQueuesList == null ? void 0 : processAndQueuesList.data) == null ? void 0 : _d.process) && ((_f = (_e = processAndQueuesList == null ? void 0 : processAndQueuesList.data) == null ? void 0 : _e.process) == null ? void 0 : _f.length) > 0 ? (_h = (_g = processAndQueuesList == null ? void 0 : processAndQueuesList.data) == null ? void 0 : _g.process) == null ? void 0 : _h.map((process, index) => /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
|
|
1894
1920
|
import_material3.Box,
|
|
1895
1921
|
{
|
|
1896
1922
|
sx: {
|
|
@@ -1915,7 +1941,7 @@ function CallTransferDialog({ open }) {
|
|
|
1915
1941
|
alignItems: "center"
|
|
1916
1942
|
},
|
|
1917
1943
|
children: [
|
|
1918
|
-
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_icons_material.
|
|
1944
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_icons_material.MemoryOutlined, { sx: { marginRight: "4px" } }),
|
|
1919
1945
|
process.process_name
|
|
1920
1946
|
]
|
|
1921
1947
|
}
|
|
@@ -1937,26 +1963,41 @@ function CallTransferDialog({ open }) {
|
|
|
1937
1963
|
]
|
|
1938
1964
|
},
|
|
1939
1965
|
index
|
|
1940
|
-
)) : /* @__PURE__ */ (0, import_jsx_runtime2.
|
|
1941
|
-
import_material3.
|
|
1966
|
+
)) : /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
|
|
1967
|
+
import_material3.Box,
|
|
1942
1968
|
{
|
|
1943
|
-
variant: "body1",
|
|
1944
1969
|
sx: {
|
|
1945
|
-
fontSize: "16px",
|
|
1946
|
-
letterSpacing: "0.02em",
|
|
1947
|
-
textTransform: "capitalize",
|
|
1948
1970
|
display: "flex",
|
|
1949
1971
|
alignItems: "center",
|
|
1950
1972
|
justifyContent: "center",
|
|
1951
|
-
|
|
1952
|
-
margin: "10px 0px",
|
|
1953
|
-
color: "gray",
|
|
1954
|
-
height: "60px"
|
|
1973
|
+
flexDirection: "column"
|
|
1955
1974
|
},
|
|
1956
|
-
|
|
1975
|
+
p: 2,
|
|
1976
|
+
children: [
|
|
1977
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_icons_material.Upcoming, { color: "primary" }),
|
|
1978
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
1979
|
+
import_material3.Typography,
|
|
1980
|
+
{
|
|
1981
|
+
variant: "body1",
|
|
1982
|
+
sx: {
|
|
1983
|
+
fontSize: "16px",
|
|
1984
|
+
letterSpacing: "0.02em",
|
|
1985
|
+
textTransform: "capitalize",
|
|
1986
|
+
display: "flex",
|
|
1987
|
+
alignItems: "center",
|
|
1988
|
+
justifyContent: "center",
|
|
1989
|
+
width: "100%",
|
|
1990
|
+
margin: "10px 0px",
|
|
1991
|
+
color: "primary.main",
|
|
1992
|
+
height: "20px"
|
|
1993
|
+
},
|
|
1994
|
+
children: "No Process Found"
|
|
1995
|
+
}
|
|
1996
|
+
)
|
|
1997
|
+
]
|
|
1957
1998
|
}
|
|
1958
1999
|
) }),
|
|
1959
|
-
!isProcessAndQueuesListLoading && !isIdleAgentsListLoading && currentselecteTab === "queues" && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_material3.Box, { sx: { display: "
|
|
2000
|
+
!isProcessAndQueuesListLoading && !isIdleAgentsListLoading && !isHospitalsServicesListLoading && currentselecteTab === "queues" && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_material3.Box, { sx: { display: "grid", gridTemplateColumns: ((_i = processAndQueuesList == null ? void 0 : processAndQueuesList.data) == null ? void 0 : _i.queue) && ((_k = (_j = processAndQueuesList == null ? void 0 : processAndQueuesList.data) == null ? void 0 : _j.queue) == null ? void 0 : _k.length) > 0 ? "repeat(2, 1fr)" : "repeat(1, 1fr)", gap: 1, padding: "10px", flexWrap: "wrap", boxShadow: "1px 1px 4px #d3d3d3ff", borderRadius: "10px" }, children: ((_l = processAndQueuesList == null ? void 0 : processAndQueuesList.data) == null ? void 0 : _l.queue) && ((_n = (_m = processAndQueuesList == null ? void 0 : processAndQueuesList.data) == null ? void 0 : _m.queue) == null ? void 0 : _n.length) > 0 ? (_p = (_o = processAndQueuesList == null ? void 0 : processAndQueuesList.data) == null ? void 0 : _o.queue) == null ? void 0 : _p.map((queue, index) => {
|
|
1960
2001
|
var _a3, _b2, _c2, _d2, _e2, _f2;
|
|
1961
2002
|
return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
|
|
1962
2003
|
import_material3.Box,
|
|
@@ -1983,7 +2024,7 @@ function CallTransferDialog({ open }) {
|
|
|
1983
2024
|
alignItems: "center"
|
|
1984
2025
|
},
|
|
1985
2026
|
children: [
|
|
1986
|
-
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_icons_material.
|
|
2027
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_icons_material.Airlines, { sx: { marginRight: "4px" } }),
|
|
1987
2028
|
queue.queue_name,
|
|
1988
2029
|
((_c2 = (_b2 = (_a3 = processAndQueuesList == null ? void 0 : processAndQueuesList.data) == null ? void 0 : _a3.process) == null ? void 0 : _b2.find(
|
|
1989
2030
|
(process) => process.process_id === queue.process_id
|
|
@@ -2024,26 +2065,41 @@ function CallTransferDialog({ open }) {
|
|
|
2024
2065
|
},
|
|
2025
2066
|
index
|
|
2026
2067
|
);
|
|
2027
|
-
}) : /* @__PURE__ */ (0, import_jsx_runtime2.
|
|
2028
|
-
import_material3.
|
|
2068
|
+
}) : /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
|
|
2069
|
+
import_material3.Box,
|
|
2029
2070
|
{
|
|
2030
|
-
variant: "body1",
|
|
2031
2071
|
sx: {
|
|
2032
|
-
fontSize: "16px",
|
|
2033
|
-
letterSpacing: "0.02em",
|
|
2034
|
-
textTransform: "capitalize",
|
|
2035
2072
|
display: "flex",
|
|
2036
2073
|
alignItems: "center",
|
|
2037
2074
|
justifyContent: "center",
|
|
2038
|
-
|
|
2039
|
-
margin: "10px 0px",
|
|
2040
|
-
color: "gray",
|
|
2041
|
-
height: "60px"
|
|
2075
|
+
flexDirection: "column"
|
|
2042
2076
|
},
|
|
2043
|
-
|
|
2077
|
+
p: 2,
|
|
2078
|
+
children: [
|
|
2079
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_icons_material.Upcoming, { color: "primary" }),
|
|
2080
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
2081
|
+
import_material3.Typography,
|
|
2082
|
+
{
|
|
2083
|
+
variant: "body1",
|
|
2084
|
+
sx: {
|
|
2085
|
+
fontSize: "16px",
|
|
2086
|
+
letterSpacing: "0.02em",
|
|
2087
|
+
textTransform: "capitalize",
|
|
2088
|
+
display: "flex",
|
|
2089
|
+
alignItems: "center",
|
|
2090
|
+
justifyContent: "center",
|
|
2091
|
+
width: "100%",
|
|
2092
|
+
margin: "10px 0px",
|
|
2093
|
+
color: "primary.main",
|
|
2094
|
+
height: "20px"
|
|
2095
|
+
},
|
|
2096
|
+
children: "No Queues Found"
|
|
2097
|
+
}
|
|
2098
|
+
)
|
|
2099
|
+
]
|
|
2044
2100
|
}
|
|
2045
2101
|
) }),
|
|
2046
|
-
!isProcessAndQueuesListLoading && !isIdleAgentsListLoading && currentselecteTab === "agents" && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_material3.Box, { sx: { display: "
|
|
2102
|
+
!isProcessAndQueuesListLoading && !isIdleAgentsListLoading && !isHospitalsServicesListLoading && currentselecteTab === "agents" && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_material3.Box, { sx: { display: "grid", gridTemplateColumns: (idleAgentsList == null ? void 0 : idleAgentsList.data) && ((_q = idleAgentsList == null ? void 0 : idleAgentsList.data) == null ? void 0 : _q.length) > 0 ? "repeat(2, 1fr)" : "repeat(1, 1fr)", gap: 1, padding: "10px", flexWrap: "wrap", boxShadow: "1px 1px 4px #d3d3d3ff", borderRadius: "10px" }, children: (idleAgentsList == null ? void 0 : idleAgentsList.data) && ((_r = idleAgentsList == null ? void 0 : idleAgentsList.data) == null ? void 0 : _r.length) > 0 ? (_s = idleAgentsList == null ? void 0 : idleAgentsList.data) == null ? void 0 : _s.map((agent, index) => /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
|
|
2047
2103
|
import_material3.Box,
|
|
2048
2104
|
{
|
|
2049
2105
|
sx: {
|
|
@@ -2090,25 +2146,178 @@ function CallTransferDialog({ open }) {
|
|
|
2090
2146
|
]
|
|
2091
2147
|
},
|
|
2092
2148
|
index
|
|
2093
|
-
)) : /* @__PURE__ */ (0, import_jsx_runtime2.
|
|
2094
|
-
import_material3.
|
|
2149
|
+
)) : /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
|
|
2150
|
+
import_material3.Box,
|
|
2095
2151
|
{
|
|
2096
|
-
variant: "body1",
|
|
2097
2152
|
sx: {
|
|
2098
|
-
fontSize: "16px",
|
|
2099
|
-
letterSpacing: "0.02em",
|
|
2100
|
-
textTransform: "capitalize",
|
|
2101
2153
|
display: "flex",
|
|
2102
2154
|
alignItems: "center",
|
|
2103
2155
|
justifyContent: "center",
|
|
2104
|
-
|
|
2105
|
-
margin: "10px 0px",
|
|
2106
|
-
color: "gray",
|
|
2107
|
-
height: "60px"
|
|
2156
|
+
flexDirection: "column"
|
|
2108
2157
|
},
|
|
2109
|
-
|
|
2158
|
+
p: 2,
|
|
2159
|
+
children: [
|
|
2160
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_icons_material.Upcoming, { color: "primary" }),
|
|
2161
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
2162
|
+
import_material3.Typography,
|
|
2163
|
+
{
|
|
2164
|
+
variant: "body1",
|
|
2165
|
+
sx: {
|
|
2166
|
+
fontSize: "16px",
|
|
2167
|
+
letterSpacing: "0.02em",
|
|
2168
|
+
textTransform: "capitalize",
|
|
2169
|
+
display: "flex",
|
|
2170
|
+
alignItems: "center",
|
|
2171
|
+
justifyContent: "center",
|
|
2172
|
+
width: "100%",
|
|
2173
|
+
margin: "10px 0px",
|
|
2174
|
+
color: "primary.main",
|
|
2175
|
+
height: "20px"
|
|
2176
|
+
},
|
|
2177
|
+
children: "No Agents Found"
|
|
2178
|
+
}
|
|
2179
|
+
)
|
|
2180
|
+
]
|
|
2110
2181
|
}
|
|
2111
|
-
) })
|
|
2182
|
+
) }),
|
|
2183
|
+
!isProcessAndQueuesListLoading && !isIdleAgentsListLoading && !isHospitalsServicesListLoading && currentselecteTab === "others" && /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_material3.Box, { sx: { display: "grid", gridTemplateColumns: "repeat(2, 1fr)", gap: 1, padding: "10px", flexWrap: "wrap", boxShadow: "1px 1px 4px #d3d3d3ff", borderRadius: "10px" }, children: [
|
|
2184
|
+
(hospitalsServicesList == null ? void 0 : hospitalsServicesList.data) && ((_t = hospitalsServicesList == null ? void 0 : hospitalsServicesList.data) == null ? void 0 : _t.length) > 0 && ((_u = hospitalsServicesList == null ? void 0 : hospitalsServicesList.data) == null ? void 0 : _u.map((service, index) => {
|
|
2185
|
+
var _a3, _b2, _c2;
|
|
2186
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
|
|
2187
|
+
import_material3.Box,
|
|
2188
|
+
{
|
|
2189
|
+
sx: {
|
|
2190
|
+
p: 1,
|
|
2191
|
+
display: "flex",
|
|
2192
|
+
alignItems: "center",
|
|
2193
|
+
boxShadow: "1px 1px 4px #d3d3d3ff",
|
|
2194
|
+
padding: "6px",
|
|
2195
|
+
borderRadius: "10px",
|
|
2196
|
+
"&:hover": { bgcolor: "action.selected" }
|
|
2197
|
+
},
|
|
2198
|
+
children: [
|
|
2199
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
|
|
2200
|
+
import_material3.Typography,
|
|
2201
|
+
{
|
|
2202
|
+
variant: "body1",
|
|
2203
|
+
sx: {
|
|
2204
|
+
mx: 1,
|
|
2205
|
+
width: "200px",
|
|
2206
|
+
maxWidth: "250px",
|
|
2207
|
+
display: "flex",
|
|
2208
|
+
alignItems: "center"
|
|
2209
|
+
},
|
|
2210
|
+
children: [
|
|
2211
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_icons_material.Roofing, { sx: { marginRight: "4px" } }),
|
|
2212
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_material3.Tooltip, { title: `${(_a3 = service == null ? void 0 : service.description) != null ? _a3 : ""}`, children: /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_material3.Box, { sx: { color: "text.secondary" }, children: [
|
|
2213
|
+
service.name,
|
|
2214
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_material3.Box, { sx: {
|
|
2215
|
+
fontSize: "9px",
|
|
2216
|
+
fontWeight: "600",
|
|
2217
|
+
letterSpacing: "0.02em",
|
|
2218
|
+
textTransform: "capitalize",
|
|
2219
|
+
color: "gray",
|
|
2220
|
+
textOverflow: "ellipsis",
|
|
2221
|
+
whiteSpace: "nowrap",
|
|
2222
|
+
overflow: "hidden",
|
|
2223
|
+
maxWidth: "160px"
|
|
2224
|
+
}, children: (_b2 = service == null ? void 0 : service.description) != null ? _b2 : "" })
|
|
2225
|
+
] }) })
|
|
2226
|
+
]
|
|
2227
|
+
}
|
|
2228
|
+
),
|
|
2229
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_material3.Tooltip, { title: (_c2 = service == null ? void 0 : service.phone_number) != null ? _c2 : "", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
2230
|
+
import_material3.IconButton,
|
|
2231
|
+
{
|
|
2232
|
+
color: "success",
|
|
2233
|
+
sx: {
|
|
2234
|
+
bgcolor: "action.hover",
|
|
2235
|
+
"&:hover": { bgcolor: "action.selected" }
|
|
2236
|
+
},
|
|
2237
|
+
onClick: () => {
|
|
2238
|
+
var _a4;
|
|
2239
|
+
handleTransferCall({
|
|
2240
|
+
mobile_number: (_a4 = service == null ? void 0 : service.phone_number) != null ? _a4 : ""
|
|
2241
|
+
}, "OTHER");
|
|
2242
|
+
},
|
|
2243
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_icons_material.Call, {})
|
|
2244
|
+
}
|
|
2245
|
+
) })
|
|
2246
|
+
]
|
|
2247
|
+
},
|
|
2248
|
+
index
|
|
2249
|
+
);
|
|
2250
|
+
})),
|
|
2251
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
|
|
2252
|
+
import_material3.Box,
|
|
2253
|
+
{
|
|
2254
|
+
sx: {
|
|
2255
|
+
p: 1,
|
|
2256
|
+
display: "flex",
|
|
2257
|
+
alignItems: "center",
|
|
2258
|
+
boxShadow: "1px 1px 4px #d3d3d3ff",
|
|
2259
|
+
padding: "6px",
|
|
2260
|
+
borderRadius: "10px"
|
|
2261
|
+
},
|
|
2262
|
+
children: [
|
|
2263
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
2264
|
+
import_material3.Typography,
|
|
2265
|
+
{
|
|
2266
|
+
variant: "body1",
|
|
2267
|
+
sx: {
|
|
2268
|
+
mx: 1,
|
|
2269
|
+
width: "200px",
|
|
2270
|
+
maxWidth: "250px",
|
|
2271
|
+
display: "flex",
|
|
2272
|
+
alignItems: "center"
|
|
2273
|
+
},
|
|
2274
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
2275
|
+
import_material3.TextField,
|
|
2276
|
+
{
|
|
2277
|
+
size: "small",
|
|
2278
|
+
name: "others",
|
|
2279
|
+
label: "Mobile number",
|
|
2280
|
+
variant: "outlined",
|
|
2281
|
+
type: "tel",
|
|
2282
|
+
value: mobileNumber,
|
|
2283
|
+
onChange: (e) => {
|
|
2284
|
+
const v = e.target.value;
|
|
2285
|
+
if (/^\d*$/.test(v)) {
|
|
2286
|
+
setMobileNumber(v);
|
|
2287
|
+
}
|
|
2288
|
+
},
|
|
2289
|
+
slotProps: {
|
|
2290
|
+
htmlInput: {
|
|
2291
|
+
inputMode: "numeric",
|
|
2292
|
+
maxLength: 11
|
|
2293
|
+
}
|
|
2294
|
+
},
|
|
2295
|
+
placeholder: "Enter mobile number",
|
|
2296
|
+
autoComplete: "off"
|
|
2297
|
+
}
|
|
2298
|
+
)
|
|
2299
|
+
}
|
|
2300
|
+
),
|
|
2301
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_material3.Tooltip, { title: mobileNumber ? `Call To - ${mobileNumber}` : "Enter mobile number", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
2302
|
+
import_material3.IconButton,
|
|
2303
|
+
{
|
|
2304
|
+
color: "success",
|
|
2305
|
+
sx: {
|
|
2306
|
+
bgcolor: "action.hover",
|
|
2307
|
+
"&:hover": { bgcolor: "action.selected" }
|
|
2308
|
+
},
|
|
2309
|
+
onClick: () => {
|
|
2310
|
+
handleTransferCall({
|
|
2311
|
+
mobile_number: mobileNumber != null ? mobileNumber : ""
|
|
2312
|
+
}, "OTHER");
|
|
2313
|
+
},
|
|
2314
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_icons_material.Call, {})
|
|
2315
|
+
}
|
|
2316
|
+
) })
|
|
2317
|
+
]
|
|
2318
|
+
}
|
|
2319
|
+
)
|
|
2320
|
+
] })
|
|
2112
2321
|
]
|
|
2113
2322
|
}
|
|
2114
2323
|
)
|
|
@@ -2723,6 +2932,7 @@ function cleanupAudioResources() {
|
|
|
2723
2932
|
}
|
|
2724
2933
|
|
|
2725
2934
|
// call-control-sdk/lib/components/callControls.tsx
|
|
2935
|
+
var import_vault5 = require("@react-solutions/vault");
|
|
2726
2936
|
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
2727
2937
|
var getCombineConfrenceData = (localState, apiData) => {
|
|
2728
2938
|
const localConfrenceData = localState == null ? void 0 : localState.conferenceLine;
|
|
@@ -2930,31 +3140,31 @@ function CallControls({ onDataChange }) {
|
|
|
2930
3140
|
console.error("Failed to start mic:", err);
|
|
2931
3141
|
});
|
|
2932
3142
|
const handleKeyDown = (event) => {
|
|
2933
|
-
var _a3, _b2, _c2, _d2, _e2, _f2, _g2, _h2
|
|
2934
|
-
const fullState =
|
|
2935
|
-
const key = (
|
|
2936
|
-
if (!event.altKey || ((
|
|
3143
|
+
var _a3, _b2, _c2, _d2, _e2, _f2, _g2, _h2;
|
|
3144
|
+
const fullState = (0, import_vault5.getItem)(STORAGE_KEY);
|
|
3145
|
+
const key = (_a3 = event.key) == null ? void 0 : _a3.toLowerCase();
|
|
3146
|
+
if (!event.altKey || ((_b2 = fullState == null ? void 0 : fullState.callData) == null ? void 0 : _b2.status) !== "ONCALL" /* ONCALL */) {
|
|
2937
3147
|
return;
|
|
2938
3148
|
}
|
|
2939
|
-
if (key === "m" && String((
|
|
3149
|
+
if (key === "m" && String((_c2 = fullState == null ? void 0 : fullState.callData) == null ? void 0 : _c2.mute) === "0") {
|
|
2940
3150
|
event.preventDefault();
|
|
2941
|
-
(
|
|
3151
|
+
(_d2 = micRef.current) == null ? void 0 : _d2.mute();
|
|
2942
3152
|
const payload = {
|
|
2943
3153
|
action: "MUTE" /* MUTE */,
|
|
2944
3154
|
userId: fullState.agentId
|
|
2945
3155
|
};
|
|
2946
3156
|
muteOrUnMute(END_POINT.MUTE_CALL, payload);
|
|
2947
3157
|
}
|
|
2948
|
-
if (key === "u" && String((
|
|
3158
|
+
if (key === "u" && String((_e2 = fullState == null ? void 0 : fullState.callData) == null ? void 0 : _e2.mute) === "1") {
|
|
2949
3159
|
event.preventDefault();
|
|
2950
3160
|
const payload = {
|
|
2951
3161
|
action: "UNMUTE" /* UNMUTE */,
|
|
2952
3162
|
userId: fullState.agentId
|
|
2953
3163
|
};
|
|
2954
3164
|
muteOrUnMute(END_POINT.MUTE_CALL, payload);
|
|
2955
|
-
(
|
|
3165
|
+
(_f2 = micRef.current) == null ? void 0 : _f2.unmute();
|
|
2956
3166
|
}
|
|
2957
|
-
if (key === "h" && String((
|
|
3167
|
+
if (key === "h" && String((_g2 = fullState == null ? void 0 : fullState.callData) == null ? void 0 : _g2.hold) === "0") {
|
|
2958
3168
|
event.preventDefault();
|
|
2959
3169
|
const payload = {
|
|
2960
3170
|
action: "HOLD" /* HOLD */,
|
|
@@ -2962,7 +3172,7 @@ function CallControls({ onDataChange }) {
|
|
|
2962
3172
|
};
|
|
2963
3173
|
holdOrUnHold(END_POINT.HOLD_CALL, payload);
|
|
2964
3174
|
}
|
|
2965
|
-
if (key === "r" && String((
|
|
3175
|
+
if (key === "r" && String((_h2 = fullState == null ? void 0 : fullState.callData) == null ? void 0 : _h2.hold) === "1") {
|
|
2966
3176
|
event.preventDefault();
|
|
2967
3177
|
const payload = {
|
|
2968
3178
|
action: "UNHOLD" /* UNHOLD */,
|
|
@@ -3088,13 +3298,13 @@ function CallControls({ onDataChange }) {
|
|
|
3088
3298
|
}, 3e4);
|
|
3089
3299
|
};
|
|
3090
3300
|
webSocketRef.current.onmessage = (event) => {
|
|
3091
|
-
var _a3, _b2
|
|
3301
|
+
var _a3, _b2;
|
|
3092
3302
|
try {
|
|
3093
3303
|
const data = JSON.parse(event.data);
|
|
3094
3304
|
if (data.type === "pong") {
|
|
3095
3305
|
return;
|
|
3096
3306
|
}
|
|
3097
|
-
const sdkState =
|
|
3307
|
+
const sdkState = (0, import_vault5.getItem)(STORAGE_KEY);
|
|
3098
3308
|
const confrence = getCombineConfrenceData(sdkState, data);
|
|
3099
3309
|
const callData = {
|
|
3100
3310
|
"agent_id": data == null ? void 0 : data.agent_id,
|
|
@@ -3114,7 +3324,7 @@ function CallControls({ onDataChange }) {
|
|
|
3114
3324
|
sdkStateManager.updateConferenceData([...confrence]);
|
|
3115
3325
|
if (["RINGING" /* RINGING */, "DIALING" /* DIALING */].includes(data.status)) {
|
|
3116
3326
|
setShowIframe(true);
|
|
3117
|
-
setCallWrapuptime((
|
|
3327
|
+
setCallWrapuptime((_b2 = (_a3 = sdkState == null ? void 0 : sdkState.sdkConfig) == null ? void 0 : _a3.auto_wrapup_time) != null ? _b2 : null);
|
|
3118
3328
|
sdkStateManager.updateConferenceData(
|
|
3119
3329
|
[
|
|
3120
3330
|
{
|