summaryrefslogtreecommitdiffstats
path: root/webapp/src/components/GroupModuleGroupList.vue
diff options
context:
space:
mode:
Diffstat (limited to 'webapp/src/components/GroupModuleGroupList.vue')
-rw-r--r--webapp/src/components/GroupModuleGroupList.vue75
1 files changed, 41 insertions, 34 deletions
diff --git a/webapp/src/components/GroupModuleGroupList.vue b/webapp/src/components/GroupModuleGroupList.vue
index a9976f9..0abd2fa 100644
--- a/webapp/src/components/GroupModuleGroupList.vue
+++ b/webapp/src/components/GroupModuleGroupList.vue
@@ -9,36 +9,44 @@
<template>
<div>
- <v-data-table
- class="group-table"
- :headers="headers"
- :items="groups"
- item-key="id"
- hide-actions
- select-all
- v-model="selected"
- >
- <template slot="items" slot-scope="props">
- <tr @click="loadGroup(props.item)">
- <td>
- <v-checkbox
- color="primary"
- v-model="props.selected"
- hide-details
- @click.native.stop
- ></v-checkbox>
- </td>
- <td>{{ props.item.id }}</td>
- <td>{{ props.item.name }}</td>
- <td>
- <v-layout>
- <v-btn icon @click.stop><v-icon color="primary">edit</v-icon></v-btn>
+ <v-card>
+ <v-data-table
+ class="group-table"
+ :headers="headers"
+ :items="groups"
+ item-key="id"
+ hide-actions
+ select-all
+ v-model="selected"
+ >
+ <template slot="items" slot-scope="props">
+ <tr @click="loadGroup(props.item.id)">
+ <td>
+ <v-checkbox
+ color="primary"
+ v-model="props.selected"
+ hide-details
+ @click.native.stop
+ ></v-checkbox>
+ </td>
+ <td>{{ props.item.id }}</td>
+ <td>{{ props.item.name }}</td>
+ <td>{{ props.item.description }}</td>
+ <td>
<v-btn class="next-arrow" icon><v-icon>keyboard_arrow_right</v-icon></v-btn>
- </v-layout>
- </td>
- </tr>
- </template>
- </v-data-table>
+ </td>
+ </tr>
+ </template>
+ </v-data-table>
+ </v-card>
+ <div v-if="tabIndex > 0" class="text-xs-right">
+ <v-btn flat color="error"><v-icon left>remove_circle_outline</v-icon>Remove selected subgroups</v-btn>
+ <v-btn flat color="success"><v-icon left>add_circle_outline</v-icon>Add subgroups</v-btn>
+ </div>
+ <div v-else class="text-xs-right">
+ <v-btn flat color="error"><v-icon left>delete</v-icon>Delete selected groups</v-btn>
+ <v-btn flat color="success"><v-icon left>create</v-icon>Create group</v-btn>
+ </div>
</div>
</template>
@@ -55,7 +63,8 @@ export default {
return {
headers: [
{ text: 'ID', value: 'id' },
- { text: 'Name', value: 'name', width: '10000px' },
+ { text: 'Name', value: 'name' },
+ { text: 'Description', value: 'description', width: '10000px' },
{ sortable: false }
],
selected: []
@@ -67,10 +76,8 @@ export default {
}
},
methods: {
- loadGroup (group) {
- this.$store.dispatch('groups/loadGroupInChain', {
- tabIndex: this.tabIndex + 1, id: group.id, name: group.name, switchTab: true
- })
+ loadGroup (id) {
+ this.$store.dispatch('groups/loadGroupIntoTab', { id, tabIndex: this.tabIndex + 1 })
}
}
}