mirror of
https://github.com/YunoHost/yunohost-admin.git
synced 2024-09-03 20:06:15 +02:00
small fix ApiWaitOverlay & GroupList
This commit is contained in:
parent
28e3645fd0
commit
a4b463fc99
2 changed files with 10 additions and 6 deletions
|
@ -41,7 +41,7 @@
|
||||||
</b-list-group-item>
|
</b-list-group-item>
|
||||||
</b-list-group>
|
</b-list-group>
|
||||||
|
|
||||||
<b-card-footer v-if="error">
|
<b-card-footer v-if="error" class="justify-content-end">
|
||||||
<b-button variant="primary" v-t="'ok'" @click="$store.dispatch('SERVER_RESPONDED', true)" />
|
<b-button variant="primary" v-t="'ok'" @click="$store.dispatch('SERVER_RESPONDED', true)" />
|
||||||
</b-card-footer>
|
</b-card-footer>
|
||||||
</b-card>
|
</b-card>
|
||||||
|
|
|
@ -57,7 +57,7 @@
|
||||||
<template v-else>
|
<template v-else>
|
||||||
<zone-selectize
|
<zone-selectize
|
||||||
:choices="group.availableMembers" :selected="group.members"
|
:choices="group.availableMembers" :selected="group.members"
|
||||||
item-icon="user" item-route="user-info"
|
item-icon="user"
|
||||||
:label="$t('group_add_member')"
|
:label="$t('group_add_member')"
|
||||||
@change="onUserChanged({ ...$event, name })"
|
@change="onUserChanged({ ...$event, name })"
|
||||||
/>
|
/>
|
||||||
|
@ -110,7 +110,7 @@
|
||||||
|
|
||||||
<b-col>
|
<b-col>
|
||||||
<zone-selectize
|
<zone-selectize
|
||||||
item-icon="key-modern" item-variant="info"
|
item-icon="key-modern" item-variant="dark"
|
||||||
:choices="userGroups[name].availablePermissions"
|
:choices="userGroups[name].availablePermissions"
|
||||||
:selected="userGroups[name].permissions"
|
:selected="userGroups[name].permissions"
|
||||||
:label="$t('group_add_permission')"
|
:label="$t('group_add_permission')"
|
||||||
|
@ -146,11 +146,15 @@
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import Vue from 'vue'
|
import Vue from 'vue'
|
||||||
|
|
||||||
|
import api from '@/api'
|
||||||
|
|
||||||
import ZoneSelectize from '@/components/ZoneSelectize'
|
import ZoneSelectize from '@/components/ZoneSelectize'
|
||||||
import BaseSelectize from '@/components/BaseSelectize'
|
import BaseSelectize from '@/components/BaseSelectize'
|
||||||
|
|
||||||
|
|
||||||
// TODO add global search with type (search by: group, user, permission)
|
// TODO add global search with type (search by: group, user, permission)
|
||||||
// TODO add vuex store update on inputs
|
// TODO add vuex store update on inputs ?
|
||||||
export default {
|
export default {
|
||||||
name: 'GroupList',
|
name: 'GroupList',
|
||||||
|
|
||||||
|
@ -199,7 +203,7 @@ export default {
|
||||||
const data = { [action]: name }
|
const data = { [action]: name }
|
||||||
const from = action === 'add' ? 'availablePermissions' : 'permissions'
|
const from = action === 'add' ? 'availablePermissions' : 'permissions'
|
||||||
const to = action === 'add' ? 'permissions' : 'availablePermissions'
|
const to = action === 'add' ? 'permissions' : 'availablePermissions'
|
||||||
this.$store.dispatch('PUT', { uri, data }).then(() => {
|
api.put(uri, data).then(() => {
|
||||||
this[groupType + 'Groups'][name][from].splice(index, 1)
|
this[groupType + 'Groups'][name][from].splice(index, 1)
|
||||||
this[groupType + 'Groups'][name][to].push(item)
|
this[groupType + 'Groups'][name][to].push(item)
|
||||||
})
|
})
|
||||||
|
@ -210,7 +214,7 @@ export default {
|
||||||
const data = { [action]: item }
|
const data = { [action]: item }
|
||||||
const from = action === 'add' ? 'availableMembers' : 'members'
|
const from = action === 'add' ? 'availableMembers' : 'members'
|
||||||
const to = action === 'add' ? 'members' : 'availableMembers'
|
const to = action === 'add' ? 'members' : 'availableMembers'
|
||||||
this.$store.dispatch('PUT', { uri, data }).then(() => {
|
api.put(uri, data).then(() => {
|
||||||
this.normalGroups[name][from].splice(index, 1)
|
this.normalGroups[name][from].splice(index, 1)
|
||||||
this.normalGroups[name][to].push(item)
|
this.normalGroups[name][to].push(item)
|
||||||
})
|
})
|
||||||
|
|
Loading…
Add table
Reference in a new issue