@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.
@@ -3875,72 +3875,72 @@ class DialboxComponent {
3875
3875
  if (changes['userId'].currentValue && this.userId) {
3876
3876
  this.extensionService.userId = this.userId;
3877
3877
  }
3878
+ if (changes['contactInfo'] && this.contactInfo) {
3879
+ let contact = this.contactInfo;
3880
+ console.log('contactInfo', contact);
3881
+ if (contact.number) {
3882
+ this.isSmartDialCall = false;
3883
+ this.dialedNumber = contact.number;
3884
+ if (contact.isDialFromHistory) {
3885
+ //handle dialing from history page
3886
+ if (contact.callerId == 'smartDialing') {
3887
+ this.selectedCallerId = { number: contact.from };
3888
+ this.isSmartDialCall = true;
3889
+ setTimeout(() => {
3890
+ this.isDialpadHidden = false;
3891
+ }, 2000);
3892
+ this.callData.phone = contact.number;
3893
+ this.callData.name = contact.name;
3894
+ this.callData.img = contact.img;
3895
+ this.callData.from = contact.from;
3896
+ this.sanitizedNum = contact.number;
3897
+ console.log('274', contact);
3898
+ this.getUserInformation(contact);
3899
+ console.log('454', contact);
3900
+ // this.incomingCallsList.push(contact)
3901
+ this.initiateCall();
3902
+ }
3903
+ else {
3904
+ this.getUserCallSetting();
3905
+ setTimeout(() => {
3906
+ this.isDialpadHidden = false;
3907
+ }, 1000);
3908
+ console.log('282', contact);
3909
+ this.getUserInformation(contact);
3910
+ console.log('464', contact);
3911
+ // this.incomingCallsList.push(contact)
3912
+ this.dialedNumber = contact.number;
3913
+ this.sanitizedNum = contact.number;
3914
+ }
3915
+ }
3916
+ else {
3917
+ if (contact.callerId == 'alwaysAsk' || contact.callerId == 'smartDialing') {
3918
+ this.getUserCallSetting();
3919
+ setTimeout(() => {
3920
+ this.isDialpadHidden = false;
3921
+ }, 1000);
3922
+ this.dialedNumber = contact.number;
3923
+ this.sanitizedNum = contact.number;
3924
+ }
3925
+ else {
3926
+ setTimeout(() => {
3927
+ this.isDialpadHidden = false;
3928
+ }, 2000);
3929
+ this.callData.phone = contact.number;
3930
+ this.callData.name = contact.name;
3931
+ this.callData.img = contact.img;
3932
+ this.sanitizedNum = contact.number;
3933
+ this.initiateCall();
3934
+ }
3935
+ }
3936
+ }
3937
+ }
3878
3938
  if (changes['isDialpadHidden'] && !this.isDialpadHidden) {
3879
3939
  this.getContactList();
3880
3940
  this.getUserCallSetting();
3881
3941
  setTimeout(() => {
3882
3942
  this.dialInputElement.nativeElement.focus();
3883
3943
  }, 0);
3884
- if (changes['contactInfo'] && this.contactInfo) {
3885
- let contact = this.contactInfo;
3886
- console.log('contactInfo', contact);
3887
- if (contact.number) {
3888
- this.isSmartDialCall = false;
3889
- this.dialedNumber = contact.number;
3890
- if (contact.isDialFromHistory) {
3891
- //handle dialing from history page
3892
- if (contact.callerId == 'smartDialing') {
3893
- this.selectedCallerId = { number: contact.from };
3894
- this.isSmartDialCall = true;
3895
- setTimeout(() => {
3896
- this.isDialpadHidden = false;
3897
- }, 2000);
3898
- this.callData.phone = contact.number;
3899
- this.callData.name = contact.name;
3900
- this.callData.img = contact.img;
3901
- this.callData.from = contact.from;
3902
- this.sanitizedNum = contact.number;
3903
- console.log('274', contact);
3904
- this.getUserInformation(contact);
3905
- console.log('454', contact);
3906
- // this.incomingCallsList.push(contact)
3907
- this.initiateCall();
3908
- }
3909
- else {
3910
- this.getUserCallSetting();
3911
- setTimeout(() => {
3912
- this.isDialpadHidden = false;
3913
- }, 1000);
3914
- console.log('282', contact);
3915
- this.getUserInformation(contact);
3916
- console.log('464', contact);
3917
- // this.incomingCallsList.push(contact)
3918
- this.dialedNumber = contact.number;
3919
- this.sanitizedNum = contact.number;
3920
- }
3921
- }
3922
- else {
3923
- if (contact.callerId == 'alwaysAsk' || contact.callerId == 'smartDialing') {
3924
- this.getUserCallSetting();
3925
- setTimeout(() => {
3926
- this.isDialpadHidden = false;
3927
- }, 1000);
3928
- this.dialedNumber = contact.number;
3929
- this.sanitizedNum = contact.number;
3930
- }
3931
- else {
3932
- setTimeout(() => {
3933
- this.isDialpadHidden = false;
3934
- }, 2000);
3935
- this.callData.phone = contact.number;
3936
- this.callData.name = contact.name;
3937
- this.callData.img = contact.img;
3938
- this.sanitizedNum = contact.number;
3939
- this.initiateCall();
3940
- }
3941
- }
3942
- }
3943
- }
3944
3944
  if (this.incomingCallData) {
3945
3945
  if (this.isCallInProgress) {
3946
3946
  this.newIncomingCalls.push(this.incomingCallData);