@tuki-io/tuki-widgets 0.0.188 → 0.0.189

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.
@@ -1560,6 +1560,7 @@ const DISPLAYED_COLS = [
1560
1560
  ];
1561
1561
  const LOCAL_STORAGE = {
1562
1562
  USER_IN_MIGRATION: 'userIdInMigration',
1563
+ MIGRATION_FORM_ID: 'migrationFormId',
1563
1564
  };
1564
1565
  class UsersListComponent {
1565
1566
  getTodayShortDate() {
@@ -1629,6 +1630,7 @@ class UsersListComponent {
1629
1630
  this.moveUser = null;
1630
1631
  this.moveUserIndex = null;
1631
1632
  localStorage.removeItem(LOCAL_STORAGE.USER_IN_MIGRATION);
1633
+ localStorage.removeItem(LOCAL_STORAGE.MIGRATION_FORM_ID);
1632
1634
  this.showMoveUserWizard = false;
1633
1635
  this.switchToWizard.emit(false);
1634
1636
  if (afterUserMove) {
@@ -1660,6 +1662,7 @@ class UsersListComponent {
1660
1662
  this.moveUser = null;
1661
1663
  this.moveUserIndex = null;
1662
1664
  if (formId) {
1665
+ localStorage.setItem(LOCAL_STORAGE.MIGRATION_FORM_ID, String(formId));
1663
1666
  this.pollMigrationFormStatus(formId, index, () => this.getMigratedUsers());
1664
1667
  }
1665
1668
  else {
@@ -1698,6 +1701,7 @@ class UsersListComponent {
1698
1701
  }
1699
1702
  removeUserInMigrationProgress() {
1700
1703
  localStorage.removeItem(LOCAL_STORAGE.USER_IN_MIGRATION);
1704
+ localStorage.removeItem(LOCAL_STORAGE.MIGRATION_FORM_ID);
1701
1705
  this.moveInProgressUserId = '';
1702
1706
  this.moveUserPending = false;
1703
1707
  }
@@ -1767,10 +1771,14 @@ class UsersListComponent {
1767
1771
  }
1768
1772
  setUserMigrationProgress() {
1769
1773
  const userIdInMigration = localStorage.getItem(LOCAL_STORAGE.USER_IN_MIGRATION);
1774
+ const migrationFormId = localStorage.getItem(LOCAL_STORAGE.MIGRATION_FORM_ID);
1770
1775
  if (userIdInMigration) {
1771
1776
  const index = this.users.findIndex((user) => user.userid === userIdInMigration);
1772
1777
  this.moveInProgressUserId = index > -1 ? this.users[index].userid : '';
1773
1778
  this.moveUserPending = index > -1;
1779
+ if (migrationFormId) {
1780
+ this.pollMigrationFormStatus(Number(migrationFormId), index, () => this.getMigratedUsers());
1781
+ }
1774
1782
  }
1775
1783
  }
1776
1784
  getMigratedUsers() {
@@ -1789,6 +1797,7 @@ class UsersListComponent {
1789
1797
  if (userIdInMigration &&
1790
1798
  this.usersSearchService.migratedUsers.filter((migratedUser) => migratedUser.userid === userIdInMigration)) {
1791
1799
  localStorage.removeItem(LOCAL_STORAGE.USER_IN_MIGRATION);
1800
+ localStorage.removeItem(LOCAL_STORAGE.MIGRATION_FORM_ID);
1792
1801
  }
1793
1802
  this.runSearch();
1794
1803
  }, () => {
@@ -1837,6 +1846,7 @@ class UsersListComponent {
1837
1846
  .moveUserToMT(this.customerId, this.moveUser)
1838
1847
  .subscribe((formId) => {
1839
1848
  if (formId) {
1849
+ localStorage.setItem(LOCAL_STORAGE.MIGRATION_FORM_ID, String(formId));
1840
1850
  this.pollMigrationFormStatus(formId, this.moveUserIndex, () => {
1841
1851
  this.userService.userMoved$.next(true);
1842
1852
  });