@vgroup/dialbox 0.5.3 → 0.5.4

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.
@@ -3843,72 +3843,72 @@ class DialboxComponent {
3843
3843
  if (changes['userId'].currentValue && this.userId) {
3844
3844
  this.extensionService.userId = this.userId;
3845
3845
  }
3846
+ if (changes['contactInfo'] && this.contactInfo) {
3847
+ let contact = this.contactInfo;
3848
+ console.log('contactInfo', contact);
3849
+ if (contact.number) {
3850
+ this.isSmartDialCall = false;
3851
+ this.dialedNumber = contact.number;
3852
+ if (contact.isDialFromHistory) {
3853
+ //handle dialing from history page
3854
+ if (contact.callerId == 'smartDialing') {
3855
+ this.selectedCallerId = { number: contact.from };
3856
+ this.isSmartDialCall = true;
3857
+ setTimeout(() => {
3858
+ this.isDialpadHidden = false;
3859
+ }, 2000);
3860
+ this.callData.phone = contact.number;
3861
+ this.callData.name = contact.name;
3862
+ this.callData.img = contact.img;
3863
+ this.callData.from = contact.from;
3864
+ this.sanitizedNum = contact.number;
3865
+ console.log('274', contact);
3866
+ this.getUserInformation(contact);
3867
+ console.log('454', contact);
3868
+ // this.incomingCallsList.push(contact)
3869
+ this.initiateCall();
3870
+ }
3871
+ else {
3872
+ this.getUserCallSetting();
3873
+ setTimeout(() => {
3874
+ this.isDialpadHidden = false;
3875
+ }, 1000);
3876
+ console.log('282', contact);
3877
+ this.getUserInformation(contact);
3878
+ console.log('464', contact);
3879
+ // this.incomingCallsList.push(contact)
3880
+ this.dialedNumber = contact.number;
3881
+ this.sanitizedNum = contact.number;
3882
+ }
3883
+ }
3884
+ else {
3885
+ if (contact.callerId == 'alwaysAsk' || contact.callerId == 'smartDialing') {
3886
+ this.getUserCallSetting();
3887
+ setTimeout(() => {
3888
+ this.isDialpadHidden = false;
3889
+ }, 1000);
3890
+ this.dialedNumber = contact.number;
3891
+ this.sanitizedNum = contact.number;
3892
+ }
3893
+ else {
3894
+ setTimeout(() => {
3895
+ this.isDialpadHidden = false;
3896
+ }, 2000);
3897
+ this.callData.phone = contact.number;
3898
+ this.callData.name = contact.name;
3899
+ this.callData.img = contact.img;
3900
+ this.sanitizedNum = contact.number;
3901
+ this.initiateCall();
3902
+ }
3903
+ }
3904
+ }
3905
+ }
3846
3906
  if (changes['isDialpadHidden'] && !this.isDialpadHidden) {
3847
3907
  this.getContactList();
3848
3908
  this.getUserCallSetting();
3849
3909
  setTimeout(() => {
3850
3910
  this.dialInputElement.nativeElement.focus();
3851
3911
  }, 0);
3852
- if (changes['contactInfo'] && this.contactInfo) {
3853
- let contact = this.contactInfo;
3854
- console.log('contactInfo', contact);
3855
- if (contact.number) {
3856
- this.isSmartDialCall = false;
3857
- this.dialedNumber = contact.number;
3858
- if (contact.isDialFromHistory) {
3859
- //handle dialing from history page
3860
- if (contact.callerId == 'smartDialing') {
3861
- this.selectedCallerId = { number: contact.from };
3862
- this.isSmartDialCall = true;
3863
- setTimeout(() => {
3864
- this.isDialpadHidden = false;
3865
- }, 2000);
3866
- this.callData.phone = contact.number;
3867
- this.callData.name = contact.name;
3868
- this.callData.img = contact.img;
3869
- this.callData.from = contact.from;
3870
- this.sanitizedNum = contact.number;
3871
- console.log('274', contact);
3872
- this.getUserInformation(contact);
3873
- console.log('454', contact);
3874
- // this.incomingCallsList.push(contact)
3875
- this.initiateCall();
3876
- }
3877
- else {
3878
- this.getUserCallSetting();
3879
- setTimeout(() => {
3880
- this.isDialpadHidden = false;
3881
- }, 1000);
3882
- console.log('282', contact);
3883
- this.getUserInformation(contact);
3884
- console.log('464', contact);
3885
- // this.incomingCallsList.push(contact)
3886
- this.dialedNumber = contact.number;
3887
- this.sanitizedNum = contact.number;
3888
- }
3889
- }
3890
- else {
3891
- if (contact.callerId == 'alwaysAsk' || contact.callerId == 'smartDialing') {
3892
- this.getUserCallSetting();
3893
- setTimeout(() => {
3894
- this.isDialpadHidden = false;
3895
- }, 1000);
3896
- this.dialedNumber = contact.number;
3897
- this.sanitizedNum = contact.number;
3898
- }
3899
- else {
3900
- setTimeout(() => {
3901
- this.isDialpadHidden = false;
3902
- }, 2000);
3903
- this.callData.phone = contact.number;
3904
- this.callData.name = contact.name;
3905
- this.callData.img = contact.img;
3906
- this.sanitizedNum = contact.number;
3907
- this.initiateCall();
3908
- }
3909
- }
3910
- }
3911
- }
3912
3912
  if (this.incomingCallData) {
3913
3913
  if (this.isCallInProgress) {
3914
3914
  this.newIncomingCalls.push(this.incomingCallData);