@vgroup/dialbox 0.1.122 → 0.1.123

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.
@@ -2408,8 +2408,20 @@ class CallProgressComponent {
2408
2408
  this.callData.phone = incomingCall.parameters['From'];
2409
2409
  this.callData.name = ((_a = incomingCall.customParameters) === null || _a === void 0 ? void 0 : _a.get('name')) || '-';
2410
2410
  this.callData.img = ((_b = incomingCall.customParameters) === null || _b === void 0 ? void 0 : _b.get('image')) || 'assets/images/user.jpg';
2411
- this.isConcurrentIncoming = false;
2412
- this.incomingCallDiv = false;
2411
+ // Remove accepted call from the list
2412
+ this.newIncomingCallsList = (this.newIncomingCallsList || []).filter((c) => { var _a, _b; return ((_a = c === null || c === void 0 ? void 0 : c.parameters) === null || _a === void 0 ? void 0 : _a.CallSid) !== ((_b = incomingCall === null || incomingCall === void 0 ? void 0 : incomingCall.parameters) === null || _b === void 0 ? void 0 : _b.CallSid); });
2413
+ this.incomingCallsNewInfo.emit(this.newIncomingCallsList);
2414
+ // Check if more calls are waiting
2415
+ if (this.newIncomingCallsList && this.newIncomingCallsList.length > 0) {
2416
+ // Keep showing concurrent banner for remaining calls
2417
+ this.isConcurrentIncoming = true;
2418
+ this.incomingCallDiv = true;
2419
+ }
2420
+ else {
2421
+ // No more calls waiting - hide banner
2422
+ this.isConcurrentIncoming = false;
2423
+ this.incomingCallDiv = false;
2424
+ }
2413
2425
  this.disbaleEndCallBtn = false;
2414
2426
  // Reset timer for new call
2415
2427
  this.stopTimer();
@@ -2507,15 +2519,22 @@ class CallProgressComponent {
2507
2519
  }
2508
2520
  }
2509
2521
  closeIncomingCall(data) {
2510
- // this.incomingCallDiv = false;
2511
2522
  if (data.show) {
2512
- //this.showCallProgressEvent.emit()
2513
- // handle incoming call accepted
2523
+ // Handle incoming call accepted
2514
2524
  this.startTimer();
2515
2525
  this.disbaleEndCallBtn = false;
2516
2526
  this.call = data.call;
2517
- this.isConcurrentIncoming = false;
2518
- this.incomingCallDiv = false;
2527
+ // Check if there are more incoming calls waiting
2528
+ if (this.newIncomingCallsList && this.newIncomingCallsList.length > 0) {
2529
+ // There are more calls waiting - show concurrent incoming banner
2530
+ this.isConcurrentIncoming = true;
2531
+ this.incomingCallDiv = true;
2532
+ }
2533
+ else {
2534
+ // No more calls waiting - hide incoming UI
2535
+ this.isConcurrentIncoming = false;
2536
+ this.incomingCallDiv = false;
2537
+ }
2519
2538
  const incomingDetail = this.extensionService.getCallSid();
2520
2539
  this.incomingRecordCall = incomingDetail.recordCall;
2521
2540
  if (this.incomingRecordCall) {
@@ -2527,13 +2546,30 @@ class CallProgressComponent {
2527
2546
  this.cdr.detectChanges();
2528
2547
  }
2529
2548
  else {
2530
- // incoming call rejected or auto-cancelled
2531
- this.isConcurrentIncoming = false;
2532
- this.incomingCallDiv = false;
2533
- // If there is NO active call, then propagate end. Otherwise keep ongoing UI.
2534
- if (!this.call || this.call.status() !== 'open') {
2535
- console.log('test7');
2536
- this.endCallEvent.emit();
2549
+ // Incoming call rejected or auto-cancelled
2550
+ // Check if there are more incoming calls waiting
2551
+ if (this.newIncomingCallsList && this.newIncomingCallsList.length > 0) {
2552
+ // There are more calls waiting - keep showing incoming UI
2553
+ if (this.call && this.call.status() === 'open') {
2554
+ // Active call exists - show concurrent banner
2555
+ this.isConcurrentIncoming = true;
2556
+ this.incomingCallDiv = true;
2557
+ }
2558
+ else {
2559
+ // No active call - show full incoming UI
2560
+ this.isConcurrentIncoming = false;
2561
+ this.incomingCallDiv = true;
2562
+ }
2563
+ }
2564
+ else {
2565
+ // No more calls waiting - hide incoming UI
2566
+ this.isConcurrentIncoming = false;
2567
+ this.incomingCallDiv = false;
2568
+ // If there is NO active call, then propagate end. Otherwise keep ongoing UI.
2569
+ if (!this.call || this.call.status() !== 'open') {
2570
+ console.log('test7');
2571
+ this.endCallEvent.emit();
2572
+ }
2537
2573
  }
2538
2574
  }
2539
2575
  }
@@ -2679,6 +2715,26 @@ class CallProgressComponent {
2679
2715
  incomingCallsNewList(data) {
2680
2716
  this.newIncomingCallsList = data;
2681
2717
  this.incomingCallsNewInfo.emit(this.newIncomingCallsList);
2718
+ // Update UI visibility based on the updated list
2719
+ if (this.newIncomingCallsList && this.newIncomingCallsList.length > 0) {
2720
+ // There are calls in the queue
2721
+ if (this.call && this.call.status() === 'open') {
2722
+ // Active call exists - show concurrent banner
2723
+ this.isConcurrentIncoming = true;
2724
+ this.incomingCallDiv = true;
2725
+ }
2726
+ else {
2727
+ // No active call - show full incoming UI
2728
+ this.isConcurrentIncoming = false;
2729
+ this.incomingCallDiv = true;
2730
+ }
2731
+ }
2732
+ else {
2733
+ // No calls in queue - hide incoming UI
2734
+ this.isConcurrentIncoming = false;
2735
+ this.incomingCallDiv = false;
2736
+ }
2737
+ this.cdr.detectChanges();
2682
2738
  }
2683
2739
  selectedIncomingCallInfo(data) {
2684
2740
  this.selectedIncomingCall = data;