@webitel/ui-sdk 3.2.74 → 3.2.76
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
|
@@ -5,16 +5,18 @@ export const useDeleteConfirmationPopup = () => {
|
|
|
5
5
|
const isVisible = ref(false);
|
|
6
6
|
const deleteCount = ref(null);
|
|
7
7
|
const deleteCallback = ref(null);
|
|
8
|
+
const deleted = ref(null);
|
|
8
9
|
|
|
9
10
|
function askDeleteConfirmation({ deleted, callback }) {
|
|
10
11
|
if (Array.isArray(deleted)) deleteCount.value = deleted.length;
|
|
11
12
|
else deleteCount.value = 1;
|
|
12
13
|
isVisible.value = true;
|
|
13
14
|
deleteCallback.value = callback;
|
|
15
|
+
deleted.value = deleted;
|
|
14
16
|
}
|
|
15
17
|
|
|
16
18
|
function confirmDelete() {
|
|
17
|
-
return deleteCallback.value();
|
|
19
|
+
return deleteCallback.value(deleted.value);
|
|
18
20
|
}
|
|
19
21
|
|
|
20
22
|
function closeDelete() {
|
|
@@ -148,9 +148,9 @@ export default class TableStoreModule extends BaseStoreModule {
|
|
|
148
148
|
await context.dispatch('LOAD_DATA_LIST');
|
|
149
149
|
}
|
|
150
150
|
},
|
|
151
|
-
DELETE_SINGLE: async (context, { id }) => {
|
|
151
|
+
DELETE_SINGLE: async (context, { id, etag }) => {
|
|
152
152
|
try {
|
|
153
|
-
await context.dispatch('api/DELETE_ITEM', { context, id });
|
|
153
|
+
await context.dispatch('api/DELETE_ITEM', { context, id, etag });
|
|
154
154
|
} catch (err) {
|
|
155
155
|
throw err;
|
|
156
156
|
}
|