Commit cdadc284 authored by Muhammadali's avatar Muhammadali

update

parent b03872f4
{
"name": "boxdialer",
"version": "2.0.9",
"version": "2.1.0",
"description": "",
"main": "src/boxDialer.js",
"scripts": {
......
......@@ -8,7 +8,7 @@ import Modal from '../components/Modal';
import BxMiniWidjetUi from '../components/BxMiniWidjetUi';
import SecondNotifSip from '../components/SecondNotifSip';
const Root = ({ data, onSetDnd }) => {
const Root = ({ data, onSetDnd, setData }) => {
// const [dataSecond, setDataSecond] = useState([]);
// if (!data) {
// data = {
......@@ -26,7 +26,7 @@ const Root = ({ data, onSetDnd }) => {
// }
if (window?.alovoice_wsphone) {
// data = window.alovoice_wsphone;
data = window.alovoice_wsphone;
onSetDnd = window.alovoice_onsetdnd;
}
......@@ -53,20 +53,18 @@ const Root = ({ data, onSetDnd }) => {
boxDialer.setSipStateChangeCallback(setSecondLine, 'secondLine');
boxDialer.sipRegister(data);
}
onSetDnd(data);
setData(data);
}, []);
const hangupButton = () => {
boxDialer.hangupButtonClick();
};
window.setWSData = (result) => {
onSetDnd(result);
setData(result);
};
const reasonSelect = async (e) => {
console.log('reasonSelect', e);
let result = await onSetDnd(e);
console.log('result', result);
onSetDnd(result);
setData(result);
// data = result;
};
const selectWidjetType = (type) => {
......@@ -103,7 +101,7 @@ const Root = ({ data, onSetDnd }) => {
};
if (!data || !data?.number || !data?.position) return;
console.log(data, 'data');
console.log(modalState, 'modalState');
return (
<>
{selectWidjetType(data.variant)}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment