@tuki-io/tuki-widgets 0.0.211 → 0.0.212
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.
- package/esm2020/users-list/src/users-list.component.mjs +22 -2
- package/fesm2015/tuki-io-tuki-widgets-users-list.mjs +21 -1
- package/fesm2015/tuki-io-tuki-widgets-users-list.mjs.map +1 -1
- package/fesm2020/tuki-io-tuki-widgets-users-list.mjs +21 -1
- package/fesm2020/tuki-io-tuki-widgets-users-list.mjs.map +1 -1
- package/package.json +1 -1
- package/users-list/src/users-list.component.d.ts +1 -0
|
@@ -1610,12 +1610,20 @@ class UsersListComponent {
|
|
|
1610
1610
|
const normalized = (status || '').toUpperCase();
|
|
1611
1611
|
return normalized === 'COMPLETED_WITH_ERRORS';
|
|
1612
1612
|
}
|
|
1613
|
+
refreshUsersAfterOperation(delayMs = 0) {
|
|
1614
|
+
if (delayMs > 0) {
|
|
1615
|
+
window.setTimeout(() => this.getMigratedUsers(), delayMs);
|
|
1616
|
+
return;
|
|
1617
|
+
}
|
|
1618
|
+
this.getMigratedUsers();
|
|
1619
|
+
}
|
|
1613
1620
|
handleCompletedWithErrorsByUserId(userId) {
|
|
1614
1621
|
const index = this.getUserIndexById(userId);
|
|
1615
1622
|
this.removeUserInMigrationProgress();
|
|
1616
1623
|
if (index > -1) {
|
|
1617
1624
|
this.setStatusToUser(index, 'Completed with errors');
|
|
1618
1625
|
window.setTimeout(() => this.setStatusToUser(index, 'Inactive'), 5000);
|
|
1626
|
+
this.refreshUsersAfterOperation(5000);
|
|
1619
1627
|
}
|
|
1620
1628
|
}
|
|
1621
1629
|
isMigrationStatusFailed(status) {
|
|
@@ -1724,6 +1732,7 @@ class UsersListComponent {
|
|
|
1724
1732
|
}, () => {
|
|
1725
1733
|
this.removeUserInMigrationProgress();
|
|
1726
1734
|
this.setStatusToUser(this.getUserIndexById(user.userid), 'Migration Error');
|
|
1735
|
+
this.refreshUsersAfterOperation();
|
|
1727
1736
|
});
|
|
1728
1737
|
this.subscriptions.push(subscription);
|
|
1729
1738
|
}
|
|
@@ -1749,6 +1758,7 @@ class UsersListComponent {
|
|
|
1749
1758
|
}, () => {
|
|
1750
1759
|
this.removeUserInMigrationProgress();
|
|
1751
1760
|
this.setStatusToUser(index, 'Migration Error');
|
|
1761
|
+
this.refreshUsersAfterOperation();
|
|
1752
1762
|
});
|
|
1753
1763
|
this.subscriptions.push(subscription);
|
|
1754
1764
|
}
|
|
@@ -1917,6 +1927,7 @@ class UsersListComponent {
|
|
|
1917
1927
|
}, () => {
|
|
1918
1928
|
this.removeUserInMigrationProgress();
|
|
1919
1929
|
this.setStatusToUser(this.moveUserIndex, 'Migration Error');
|
|
1930
|
+
this.refreshUsersAfterOperation();
|
|
1920
1931
|
});
|
|
1921
1932
|
this.subscriptions.push(subscription);
|
|
1922
1933
|
}
|
|
@@ -2201,11 +2212,13 @@ class UsersListComponent {
|
|
|
2201
2212
|
this.setUserPendingStatus(user, 'Active');
|
|
2202
2213
|
this.setOriginalUserStatus(user.email, 'Inactive');
|
|
2203
2214
|
// this.notifications.success(`${user.userid} successfully activated`);
|
|
2215
|
+
this.refreshUsersAfterOperation();
|
|
2204
2216
|
});
|
|
2205
2217
|
},
|
|
2206
2218
|
error: () => {
|
|
2207
2219
|
this.setUserPendingStatus(user, 'Inactive');
|
|
2208
2220
|
this.notifications.error('Activation failed. Please try again.');
|
|
2221
|
+
this.refreshUsersAfterOperation();
|
|
2209
2222
|
}
|
|
2210
2223
|
});
|
|
2211
2224
|
}
|
|
@@ -2221,10 +2234,11 @@ class UsersListComponent {
|
|
|
2221
2234
|
this.setUserPendingStatus(user, 'Inactive');
|
|
2222
2235
|
this.setOriginalUserStatus(user.email, 'Active');
|
|
2223
2236
|
// this.notifications.success(`${user.userid} successfully deactivated`);
|
|
2224
|
-
this.
|
|
2237
|
+
this.refreshUsersAfterOperation();
|
|
2225
2238
|
},
|
|
2226
2239
|
error: () => {
|
|
2227
2240
|
this.setUserPendingStatus(user, 'Active');
|
|
2241
|
+
this.refreshUsersAfterOperation();
|
|
2228
2242
|
}
|
|
2229
2243
|
});
|
|
2230
2244
|
}
|
|
@@ -2252,17 +2266,20 @@ class UsersListComponent {
|
|
|
2252
2266
|
if (this.isMigrationStatusFailed(status)) {
|
|
2253
2267
|
this.removeUserInMigrationProgress();
|
|
2254
2268
|
this.setStatusToUser(index, 'Migration Error');
|
|
2269
|
+
this.refreshUsersAfterOperation();
|
|
2255
2270
|
return;
|
|
2256
2271
|
}
|
|
2257
2272
|
if (this.isMigrationStatusCompleted(status)) {
|
|
2258
2273
|
this.removeUserInMigrationProgress();
|
|
2259
2274
|
this.setStatusToUser(index, 'Active');
|
|
2275
|
+
this.refreshUsersAfterOperation();
|
|
2260
2276
|
onCompleted();
|
|
2261
2277
|
}
|
|
2262
2278
|
},
|
|
2263
2279
|
error: () => {
|
|
2264
2280
|
this.removeUserInMigrationProgress();
|
|
2265
2281
|
this.setStatusToUser(index, 'Migration Error');
|
|
2282
|
+
this.refreshUsersAfterOperation();
|
|
2266
2283
|
},
|
|
2267
2284
|
});
|
|
2268
2285
|
this.subscriptions.push(subscription);
|
|
@@ -2288,6 +2305,7 @@ class UsersListComponent {
|
|
|
2288
2305
|
if (index > -1) {
|
|
2289
2306
|
this.setStatusToUser(index, 'Migration Error');
|
|
2290
2307
|
}
|
|
2308
|
+
this.refreshUsersAfterOperation();
|
|
2291
2309
|
return;
|
|
2292
2310
|
}
|
|
2293
2311
|
if (this.isMigrationStatusCompleted(status)) {
|
|
@@ -2295,6 +2313,7 @@ class UsersListComponent {
|
|
|
2295
2313
|
if (index > -1) {
|
|
2296
2314
|
this.setStatusToUser(index, 'Active');
|
|
2297
2315
|
}
|
|
2316
|
+
this.refreshUsersAfterOperation();
|
|
2298
2317
|
onCompleted();
|
|
2299
2318
|
}
|
|
2300
2319
|
},
|
|
@@ -2304,6 +2323,7 @@ class UsersListComponent {
|
|
|
2304
2323
|
if (index > -1) {
|
|
2305
2324
|
this.setStatusToUser(index, 'Migration Error');
|
|
2306
2325
|
}
|
|
2326
|
+
this.refreshUsersAfterOperation();
|
|
2307
2327
|
},
|
|
2308
2328
|
});
|
|
2309
2329
|
this.subscriptions.push(subscription);
|