@vgroup/dialbox 0.4.162 → 0.4.164

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.
@@ -1976,7 +1976,7 @@ class CallProgressComponent {
1976
1976
  getStatus(res) {
1977
1977
  // const statusList = ["answered", "participant-hold", "participant-mute", "participant-join", "queued", "in-progress", "initiated", 'ringing', '"connected"'];
1978
1978
  if (res.direction == "incoming-call") {
1979
- return this.isCurrentIncomingCallList.includes(res.id);
1979
+ return this.incomeingCallSocketService.isCurrentIncomingCallList.includes(res.id);
1980
1980
  }
1981
1981
  else {
1982
1982
  if (res.status == 'answered' && res.direction == "incoming-call") {
@@ -3558,6 +3558,23 @@ class DialboxComponent {
3558
3558
  if (!!(incomingCallData === null || incomingCallData === void 0 ? void 0 : incomingCallData.length)) {
3559
3559
  // this.incomingCallsList = incomingCallData.participants.filter((item: any) => !item.isLeft) || [];
3560
3560
  this.incomingCallsList = incomingCallData || [];
3561
+ let parentCall = [];
3562
+ this.notificationCallList.forEach((call) => {
3563
+ incomingCallData.forEach((item) => {
3564
+ let info = item.participants.find((resInfo) => resInfo.id === call.participantId);
3565
+ // return info?.id
3566
+ if (info) {
3567
+ parentCall.push(info.id);
3568
+ }
3569
+ });
3570
+ });
3571
+ if (parentCall.length > 0) {
3572
+ this.notificationCallList = this.notificationCallList.filter((item) => !parentCall.includes(item));
3573
+ this.incomingCallsList = [...this.incomingCallsList, this.notificationCallList];
3574
+ }
3575
+ else {
3576
+ this.incomingCallsList = [...this.incomingCallsList, this.notificationCallList];
3577
+ }
3561
3578
  this.isCallInProgress = true;
3562
3579
  this.isDialpadHidden = false;
3563
3580
  this.isIncomingCallnotification = false;
@@ -3747,7 +3764,7 @@ class DialboxComponent {
3747
3764
  this.registerDragElement();
3748
3765
  }
3749
3766
  ngOnChanges(changes) {
3750
- var _a, _b, _c, _d, _e;
3767
+ var _a, _b, _c, _d, _e, _f;
3751
3768
  if (changes['incomingCallnotification']) {
3752
3769
  console.log('incomingCallnotification', changes['incomingCallnotification'].currentValue);
3753
3770
  this.isIncomingCallnotification = true;
@@ -3762,12 +3779,15 @@ class DialboxComponent {
3762
3779
  let incomingCall = {
3763
3780
  conferenceId: 'no',
3764
3781
  isActive: true,
3782
+ isIncomingCall: true,
3783
+ participantId: (_a = this.incomingCallnotification.data.data) === null || _a === void 0 ? void 0 : _a.participantId,
3765
3784
  participants: [
3766
- { direction: "incoming-call", img: 'assets/images/user.jpg', isIncomingCall: true, isHold: false, isConference: false, isAcceptCall: false, dial: true, phone: (_a = this.incomingCallnotification.data.data) === null || _a === void 0 ? void 0 : _a.fromNumber, participantId: (_b = this.incomingCallnotification.data.data) === null || _b === void 0 ? void 0 : _b.participantId, name: (_c = this.incomingCallnotification.data.data) === null || _c === void 0 ? void 0 : _c.fromName, time: '', id: (_d = this.incomingCallnotification.data.data) === null || _d === void 0 ? void 0 : _d.participantId }
3785
+ { direction: "incoming-call", img: 'assets/images/user.jpg', isIncomingCall: true, isHold: false, isConference: false, isAcceptCall: false, dial: true, phone: (_b = this.incomingCallnotification.data.data) === null || _b === void 0 ? void 0 : _b.fromNumber, participantId: (_c = this.incomingCallnotification.data.data) === null || _c === void 0 ? void 0 : _c.participantId, name: (_d = this.incomingCallnotification.data.data) === null || _d === void 0 ? void 0 : _d.fromName, time: '', id: (_e = this.incomingCallnotification.data.data) === null || _e === void 0 ? void 0 : _e.participantId }
3767
3786
  ]
3768
3787
  };
3769
3788
  this.incomingCallsList.push(incomingCall);
3770
- if ((_e = this.incomingCallnotification.data.data) === null || _e === void 0 ? void 0 : _e.participantId) {
3789
+ this.notificationCallList.push(incomingCall);
3790
+ if ((_f = this.incomingCallnotification.data.data) === null || _f === void 0 ? void 0 : _f.participantId) {
3771
3791
  this.isCallInProgress = true;
3772
3792
  }
3773
3793
  // this.extensionService.setIncomingCallStatus(payload).subscribe((res: any) => {