Commit 54e0e39e authored by Muhammadali's avatar Muhammadali

update

parent cbf3fa28
{
"name": "boxdialer",
"version": "4.8.73",
"version": "4.8.74",
"description": "",
"main": "src/boxDialer.js",
"scripts": {
......
......@@ -25,9 +25,7 @@ const Root = ({wsphonedata, onSetDnd, setWsphonedata, callMethod}) => {
// const [secondLine, setSecondLine] = useState(false);
const [innerTimer, setInnerTimer] = useState(null);
const [innerCallerModal, setInnerCallerModal] = useState({
bool: false,
type: null,
from: '',
bool: false, type: null, from: '',
});
useEffect(() => {
......@@ -38,7 +36,7 @@ const Root = ({wsphonedata, onSetDnd, setWsphonedata, callMethod}) => {
}
}, [secondLine]);
useEffect(()=> {
useEffect(() => {
boxDialer.setGlobalHistoryData(useColorConfigStore.state)
}, [useColorConfigStore.state])
......@@ -50,18 +48,12 @@ const Root = ({wsphonedata, onSetDnd, setWsphonedata, callMethod}) => {
boxDialer.setSipStateChangeCallback(setPhoneModal, 'phoneModal');
boxDialer.setSipStateChangeCallback(setInnerTimer, 'innerTimer');
boxDialer.setSipStateChangeCallback(configHoldMute.setState, 'setCallEvents');
boxDialer.setSipStateChangeCallback(
setInnerCallerModal,
'innerCallerModal',
);
boxDialer.setSipStateChangeCallback(setInnerCallerModal, 'innerCallerModal',);
if (boxDialer.isUaRunning()) console.log('UA is running! in other tab');
else boxDialer.sipRegister(wsphonedata);
if (boxDialer.isUaRunning()) console.log('UA is running! in other tab'); else boxDialer.sipRegister(wsphonedata);
setTimeout(function waitUaRegisterLost() {
if (boxDialer.isUaRunning() || boxDialer.isRestarting)
setTimeout(waitUaRegisterLost, 10);
else boxDialer.sipRegister(wsphonedata);
if (boxDialer.isUaRunning() || boxDialer.isRestarting) setTimeout(waitUaRegisterLost, 10); else boxDialer.sipRegister(wsphonedata);
}, 10);
}
}, []);
......@@ -100,8 +92,7 @@ const Root = ({wsphonedata, onSetDnd, setWsphonedata, callMethod}) => {
const selectWidjetType = (type) => {
switch (type) {
case 'bxmini':
return (
<BxMiniWidjetUi
return (<BxMiniWidjetUi
widjetState={dynamicValue}
phoneNumber={wsphonedata?.number}
reason={wsphonedata?.reason}
......@@ -111,11 +102,9 @@ const Root = ({wsphonedata, onSetDnd, setWsphonedata, callMethod}) => {
onClick={() => {
phoneModal ? setPhoneModal(false) : setPhoneModal(true);
}}
/>
);
/>);
default:
return (
<DefaultWidjetUi
return (<DefaultWidjetUi
widjetState={dynamicValue}
phoneNumber={wsphonedata?.number}
reason={wsphonedata?.reason}
......@@ -125,17 +114,13 @@ const Root = ({wsphonedata, onSetDnd, setWsphonedata, callMethod}) => {
onClick={() => {
phoneModal ? setPhoneModal(false) : setPhoneModal(true);
}}
/>
);
/>);
}
};
console.log(
'wsphonedata_all_data: ',
wsphonedata?.position,
wsphonedata?.number,
wsphonedata,
);
console.log('wsphonedata_all_data: ', wsphonedata?.position, wsphonedata?.number, wsphonedata,);
console.log('modalState_callType: ', modalState.callType)
window.onbeforeunload = () => {
if (typeof BX !== 'undefined') {
......@@ -144,17 +129,13 @@ const Root = ({wsphonedata, onSetDnd, setWsphonedata, callMethod}) => {
localStorage.removeItem('mycall');
localStorage.removeItem(BX.bitrix_sessid() + '_mycall');
console.log(
'--==== Checking removed Items: ',
localStorage.getItem('mycall'),
localStorage.getItem(BX.bitrix_sessid() + '_mycall'),
);
console.log('--==== Checking removed Items: ', localStorage.getItem('mycall'), localStorage.getItem(BX.bitrix_sessid() + '_mycall'),);
}
};
if (!wsphonedata?.number && !wsphonedata?.position) return;
return (
<>
return (<>
{selectWidjetType(wsphonedata.variant)}
<SettingComponent
settingHidden={settingHidden && phoneModal ? true : false}
......@@ -184,11 +165,7 @@ const Root = ({wsphonedata, onSetDnd, setWsphonedata, callMethod}) => {
// hidden={true}
// callType={'incoming'}
hangupButton={hangupButton}
phoneNumber={
modalState.callType === 'outcoming'
? 'inputValue'
: modalState.callFromName
}
phoneNumber={modalState.callType === 'outcoming' ? 'inputValue' : modalState.callFromName}
/>
<InnerCaller
......@@ -199,8 +176,7 @@ const Root = ({wsphonedata, onSetDnd, setWsphonedata, callMethod}) => {
/>
<SecondNotifSip secondLine={secondLine}/>
</>
);
</>);
};
export default Root;
......
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