@webitel/ui-sdk 24.12.72 → 24.12.74
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/package.json
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import deepCopy from 'deep-copy';
|
|
2
1
|
import FilterEvent from '../../../../modules/Filters/enums/FilterEvent.enum.js';
|
|
3
2
|
import {
|
|
4
3
|
queryToSortAdapter,
|
|
@@ -153,7 +152,6 @@ const actions = {
|
|
|
153
152
|
context.commit('SET', { path: 'error', value: err });
|
|
154
153
|
throw err;
|
|
155
154
|
} finally {
|
|
156
|
-
|
|
157
155
|
setTimeout(() => {
|
|
158
156
|
context.commit('SET', { path: 'isLoading', value: false });
|
|
159
157
|
}, 100); // why 1s? https://ux.stackexchange.com/a/104782
|
|
@@ -228,10 +226,21 @@ const actions = {
|
|
|
228
226
|
}
|
|
229
227
|
},
|
|
230
228
|
|
|
231
|
-
DELETE_BULK: async (context, deleted) =>
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
229
|
+
DELETE_BULK: async (context, deleted) => {
|
|
230
|
+
try {
|
|
231
|
+
const results = await Promise.allSettled(
|
|
232
|
+
deleted.map((item) => context.dispatch('DELETE_SINGLE', item)),
|
|
233
|
+
);
|
|
234
|
+
|
|
235
|
+
// list of rejected requests
|
|
236
|
+
const rejected = results.filter((result) => result.status === 'rejected');
|
|
237
|
+
if (rejected.length) {
|
|
238
|
+
throw rejected;
|
|
239
|
+
}
|
|
240
|
+
} catch (err) {
|
|
241
|
+
throw err;
|
|
242
|
+
}
|
|
243
|
+
},
|
|
235
244
|
|
|
236
245
|
SET_SELECTED: (context, selected) => {
|
|
237
246
|
context.commit('SET', { path: 'selected', value: selected });
|