@tuki-io/tuki-widgets 0.0.182 → 0.0.184

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.
@@ -42,7 +42,8 @@ const API$1 = {
42
42
  GET_USERS_UPGRADE_SUMMARY: '/api/webex-upgrade/customers/:customerId/users/upgrade/fetch',
43
43
  GET_SITES_UPGRADE_SUMMARY: '/api/webex-upgrade/customers/:customerId/sites/upgrade/fetch',
44
44
  GET_USERS_UPGRADE_READINESS: '/api/webex-upgrade/customers/:customerId/users/readiness/fetch',
45
- GET_SITES_UPGRADE_READINESS: '/api/webex-upgrade/customers/:customerId/sites/readiness/fetch'
45
+ GET_SITES_UPGRADE_READINESS: '/api/webex-upgrade/customers/:customerId/sites/readiness/fetch',
46
+ GET_PENDING_ACTIVATION_COUNT: '/api/webex-upgrade/customers/:customerId/users/pending-activation/count'
46
47
  },
47
48
  USER_UPGRADE: {
48
49
  GET_USERS_UPGRADE_DATA: '/api/webex-upgrade/customers/:customerId/user-upgrade',
@@ -1712,6 +1713,14 @@ class UpgradeOverviewService {
1712
1713
  };
1713
1714
  }));
1714
1715
  }
1716
+ getPendingActivationCount() {
1717
+ return this.apiService.fetch(API$1.OVERVIEW.GET_PENDING_ACTIVATION_COUNT.replace(':customerId', this.customerId)).pipe(map((resp) => {
1718
+ if (typeof resp === "number") {
1719
+ return resp;
1720
+ }
1721
+ return resp?.count ?? resp?.pendingActivation ?? resp?.total ?? 0;
1722
+ }));
1723
+ }
1715
1724
  getSitesUpgradeSummary() {
1716
1725
  return this.apiService.fetch(API$1.OVERVIEW.GET_SITES_UPGRADE_SUMMARY.replace(':customerId', this.customerId)).pipe(map((resp) => {
1717
1726
  return {
@@ -2204,13 +2213,14 @@ class PendingActivationUsersCardComponent {
2204
2213
  this.apiService.apiUrl = this.host;
2205
2214
  this.upgradeOverviewService.customerId = this.customerId;
2206
2215
  this.loading = true;
2207
- this.upgradeOverviewService.getUsersUpgradeSummary()
2208
- .pipe(takeUntil(this.destroy$))
2209
- .subscribe((stats) => {
2216
+ forkJoin({
2217
+ summary: this.upgradeOverviewService.getUsersUpgradeSummary(),
2218
+ pendingActivation: this.upgradeOverviewService.getPendingActivationCount()
2219
+ }).pipe(takeUntil(this.destroy$))
2220
+ .subscribe(({ summary, pendingActivation }) => {
2210
2221
  this.readinessStats = {
2211
- ...stats,
2212
- pendingActivation: 1,
2213
- totalUpgradedUsers: 1,
2222
+ ...summary,
2223
+ pendingActivation
2214
2224
  };
2215
2225
  this.loading = false;
2216
2226
  });