@vgroup/dialbox 0.4.163 → 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.
|
@@ -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: (
|
|
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
|
-
|
|
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) => {
|