@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
|
@@ -1595,12 +1595,20 @@ class UsersListComponent {
|
|
|
1595
1595
|
const normalized = (status || '').toUpperCase();
|
|
1596
1596
|
return normalized === 'COMPLETED_WITH_ERRORS';
|
|
1597
1597
|
}
|
|
1598
|
+
refreshUsersAfterOperation(delayMs = 0) {
|
|
1599
|
+
if (delayMs > 0) {
|
|
1600
|
+
window.setTimeout(() => this.getMigratedUsers(), delayMs);
|
|
1601
|
+
return;
|
|
1602
|
+
}
|
|
1603
|
+
this.getMigratedUsers();
|
|
1604
|
+
}
|
|
1598
1605
|
handleCompletedWithErrorsByUserId(userId) {
|
|
1599
1606
|
const index = this.getUserIndexById(userId);
|
|
1600
1607
|
this.removeUserInMigrationProgress();
|
|
1601
1608
|
if (index > -1) {
|
|
1602
1609
|
this.setStatusToUser(index, 'Completed with errors');
|
|
1603
1610
|
window.setTimeout(() => this.setStatusToUser(index, 'Inactive'), 5000);
|
|
1611
|
+
this.refreshUsersAfterOperation(5000);
|
|
1604
1612
|
}
|
|
1605
1613
|
}
|
|
1606
1614
|
isMigrationStatusFailed(status) {
|
|
@@ -1707,6 +1715,7 @@ class UsersListComponent {
|
|
|
1707
1715
|
}, () => {
|
|
1708
1716
|
this.removeUserInMigrationProgress();
|
|
1709
1717
|
this.setStatusToUser(this.getUserIndexById(user.userid), 'Migration Error');
|
|
1718
|
+
this.refreshUsersAfterOperation();
|
|
1710
1719
|
});
|
|
1711
1720
|
this.subscriptions.push(subscription);
|
|
1712
1721
|
}
|
|
@@ -1732,6 +1741,7 @@ class UsersListComponent {
|
|
|
1732
1741
|
}, () => {
|
|
1733
1742
|
this.removeUserInMigrationProgress();
|
|
1734
1743
|
this.setStatusToUser(index, 'Migration Error');
|
|
1744
|
+
this.refreshUsersAfterOperation();
|
|
1735
1745
|
});
|
|
1736
1746
|
this.subscriptions.push(subscription);
|
|
1737
1747
|
}
|
|
@@ -1898,6 +1908,7 @@ class UsersListComponent {
|
|
|
1898
1908
|
}, () => {
|
|
1899
1909
|
this.removeUserInMigrationProgress();
|
|
1900
1910
|
this.setStatusToUser(this.moveUserIndex, 'Migration Error');
|
|
1911
|
+
this.refreshUsersAfterOperation();
|
|
1901
1912
|
});
|
|
1902
1913
|
this.subscriptions.push(subscription);
|
|
1903
1914
|
}
|
|
@@ -2178,11 +2189,13 @@ class UsersListComponent {
|
|
|
2178
2189
|
this.setUserPendingStatus(user, 'Active');
|
|
2179
2190
|
this.setOriginalUserStatus(user.email, 'Inactive');
|
|
2180
2191
|
// this.notifications.success(`${user.userid} successfully activated`);
|
|
2192
|
+
this.refreshUsersAfterOperation();
|
|
2181
2193
|
});
|
|
2182
2194
|
},
|
|
2183
2195
|
error: () => {
|
|
2184
2196
|
this.setUserPendingStatus(user, 'Inactive');
|
|
2185
2197
|
this.notifications.error('Activation failed. Please try again.');
|
|
2198
|
+
this.refreshUsersAfterOperation();
|
|
2186
2199
|
}
|
|
2187
2200
|
});
|
|
2188
2201
|
}
|
|
@@ -2198,10 +2211,11 @@ class UsersListComponent {
|
|
|
2198
2211
|
this.setUserPendingStatus(user, 'Inactive');
|
|
2199
2212
|
this.setOriginalUserStatus(user.email, 'Active');
|
|
2200
2213
|
// this.notifications.success(`${user.userid} successfully deactivated`);
|
|
2201
|
-
this.
|
|
2214
|
+
this.refreshUsersAfterOperation();
|
|
2202
2215
|
},
|
|
2203
2216
|
error: () => {
|
|
2204
2217
|
this.setUserPendingStatus(user, 'Active');
|
|
2218
|
+
this.refreshUsersAfterOperation();
|
|
2205
2219
|
}
|
|
2206
2220
|
});
|
|
2207
2221
|
}
|
|
@@ -2228,17 +2242,20 @@ class UsersListComponent {
|
|
|
2228
2242
|
if (this.isMigrationStatusFailed(status)) {
|
|
2229
2243
|
this.removeUserInMigrationProgress();
|
|
2230
2244
|
this.setStatusToUser(index, 'Migration Error');
|
|
2245
|
+
this.refreshUsersAfterOperation();
|
|
2231
2246
|
return;
|
|
2232
2247
|
}
|
|
2233
2248
|
if (this.isMigrationStatusCompleted(status)) {
|
|
2234
2249
|
this.removeUserInMigrationProgress();
|
|
2235
2250
|
this.setStatusToUser(index, 'Active');
|
|
2251
|
+
this.refreshUsersAfterOperation();
|
|
2236
2252
|
onCompleted();
|
|
2237
2253
|
}
|
|
2238
2254
|
},
|
|
2239
2255
|
error: () => {
|
|
2240
2256
|
this.removeUserInMigrationProgress();
|
|
2241
2257
|
this.setStatusToUser(index, 'Migration Error');
|
|
2258
|
+
this.refreshUsersAfterOperation();
|
|
2242
2259
|
},
|
|
2243
2260
|
});
|
|
2244
2261
|
this.subscriptions.push(subscription);
|
|
@@ -2264,6 +2281,7 @@ class UsersListComponent {
|
|
|
2264
2281
|
if (index > -1) {
|
|
2265
2282
|
this.setStatusToUser(index, 'Migration Error');
|
|
2266
2283
|
}
|
|
2284
|
+
this.refreshUsersAfterOperation();
|
|
2267
2285
|
return;
|
|
2268
2286
|
}
|
|
2269
2287
|
if (this.isMigrationStatusCompleted(status)) {
|
|
@@ -2271,6 +2289,7 @@ class UsersListComponent {
|
|
|
2271
2289
|
if (index > -1) {
|
|
2272
2290
|
this.setStatusToUser(index, 'Active');
|
|
2273
2291
|
}
|
|
2292
|
+
this.refreshUsersAfterOperation();
|
|
2274
2293
|
onCompleted();
|
|
2275
2294
|
}
|
|
2276
2295
|
},
|
|
@@ -2280,6 +2299,7 @@ class UsersListComponent {
|
|
|
2280
2299
|
if (index > -1) {
|
|
2281
2300
|
this.setStatusToUser(index, 'Migration Error');
|
|
2282
2301
|
}
|
|
2302
|
+
this.refreshUsersAfterOperation();
|
|
2283
2303
|
},
|
|
2284
2304
|
});
|
|
2285
2305
|
this.subscriptions.push(subscription);
|