summaryrefslogtreecommitdiffstats
path: root/webapp/src/store
diff options
context:
space:
mode:
authorJannik Schönartz2019-10-16 21:16:14 +0200
committerJannik Schönartz2019-10-16 21:16:14 +0200
commit4752614c0105b864d00e97179b4b77ccbad89e2d (patch)
tree88f89882295efda36ea71292241e80922694e85e /webapp/src/store
parent[documentation] Add more information about the automatic registration & chang... (diff)
downloadbas-4752614c0105b864d00e97179b4b77ccbad89e2d.tar.gz
bas-4752614c0105b864d00e97179b4b77ccbad89e2d.tar.xz
bas-4752614c0105b864d00e97179b4b77ccbad89e2d.zip
[webapp/clients] Add the choice to select backends when deleting clients
[group/clients] Checkbox list of the clients in the permanently delete dialog [server/backendhelper] Only deletes from the selected backends (array with backendids)
Diffstat (limited to 'webapp/src/store')
-rw-r--r--webapp/src/store/groups.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/webapp/src/store/groups.js b/webapp/src/store/groups.js
index 2785468..7948e31 100644
--- a/webapp/src/store/groups.js
+++ b/webapp/src/store/groups.js
@@ -193,9 +193,10 @@ export default {
if (callback) callback()
})
},
- deleteClients (context, { selected, callback }) {
+ deleteClients (context, { selected, callback, backends }) {
const ids = selected.map(x => x.id)
- axios.post('/api/clients/?delete', { ids }).then(() => {
+ const backendIds = backends.filter(x => x.selected).map(x => x.id)
+ axios.post('/api/clients/?delete', { ids, backendIds }).then(() => {
const index = context.state.tabChain.length - 1
const item = context.state.tabChain[index]
if (item.tabType === 'client' && ids.includes(item.id)) context.commit('deleteFromTabChain', { index, count: 1 })