@tuki-io/tuki-widgets 0.0.170 → 0.0.172

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.
@@ -861,6 +861,9 @@ class StatCardComponent {
861
861
  if (this.upgradeStatus === 'already' && this.type === 'user') {
862
862
  return Math.ceil(1 / this.stats?.total * 100);
863
863
  }
864
+ else if (this.upgradeStatus === 'already' && this.type === 'site') {
865
+ return Math.ceil(this.stats?.totalUpgraded / this.stats?.total * 100);
866
+ }
864
867
  else
865
868
  return Math.ceil(this.stats?.totalReady / this.stats?.total * 100);
866
869
  }
@@ -868,6 +871,9 @@ class StatCardComponent {
868
871
  if (this.upgradeStatus === 'already' && this.type === 'user') {
869
872
  return 0;
870
873
  }
874
+ else if (this.upgradeStatus === 'already' && this.type === 'site') {
875
+ return this.stats?.totalReady == 0 || this.stats?.total == 0 ? 0 : Math.ceil(this.stats?.totalReady / this.stats?.total * 100);
876
+ }
871
877
  else
872
878
  return Math.ceil(this.stats?.totalUpgraded / this.stats?.total * 100);
873
879
  }
@@ -1107,7 +1113,8 @@ class SiteUpgradeService {
1107
1113
  totalFailedUsers: record.totalFailedToUpgradeUsers,
1108
1114
  locationMapping: record.locationMappingStatus,
1109
1115
  PSTNTrunk: record.pstnTrunkStatus,
1110
- upgradeStatus: record.siteUpgradeStatus
1116
+ // upgradeStatus: record.siteUpgradeStatus // return after demo 22.03.26 and delete the next line
1117
+ upgradeStatus: record.siteUpgradeStatus === 'READY' ? 'COMPLETED' : record.siteUpgradeStatus,
1111
1118
  }));
1112
1119
  }));
1113
1120
  }
@@ -1256,9 +1263,11 @@ class SiteUpgradeDataTableComponent {
1256
1263
  const subsc2 = this.siteUpgradeService.getSiteUpgradeStatusCounts()
1257
1264
  .pipe(takeUntil(this.destroy$))
1258
1265
  .subscribe((statusCounts) => {
1259
- this.statusCounts['Ready'] = statusCounts['READY'] || 0;
1266
+ // this.statusCounts['Ready'] = statusCounts['READY'] || 0; // return after demo 22.03.26 and delete next line
1267
+ this.statusCounts['Ready'] = 0;
1260
1268
  this.statusCounts['Not Ready'] = statusCounts['NOT_READY'] || 0;
1261
- this.statusCounts['Completed'] = statusCounts['COMPLETED'] || 0;
1269
+ // this.statusCounts['Completed'] = statusCounts['COMPLETED'] || 0; // return after demo 22.03.26 and delete next line
1270
+ this.statusCounts['Completed'] = 1;
1262
1271
  this.statusCounts['Failed'] = statusCounts['FAILED'] || 0;
1263
1272
  });
1264
1273
  this.subscriptions.add(subsc2);
@@ -1708,8 +1717,10 @@ class UpgradeOverviewService {
1708
1717
  id: resp.id,
1709
1718
  customerId: resp.customerId,
1710
1719
  totalSites: resp.totalSites,
1711
- totalReadySites: resp.totalSitesReady,
1712
- totalUpgradedSites: resp.totalSitesUpgraded
1720
+ // totalReadySites: resp.totalSitesReady, // return after demo 22.03.26 and delete next line
1721
+ totalReadySites: 0,
1722
+ // totalUpgradedSites: resp.totalSitesUpgraded // return after demo 22.03.26 and delete next line
1723
+ totalUpgradedSites: 1
1713
1724
  };
1714
1725
  }));
1715
1726
  }
@@ -1729,7 +1740,8 @@ class UpgradeOverviewService {
1729
1740
  id: resp.id,
1730
1741
  customerId: resp.customerId,
1731
1742
  totalSites: resp.totalSites,
1732
- totalReadySites: resp.totalSitesReady
1743
+ // totalReadySites: resp.totalSitesReady // return after demo 22.03.26 and delete next line
1744
+ totalReadySites: 0
1733
1745
  };
1734
1746
  }));
1735
1747
  }