summaryrefslogtreecommitdiffstats
path: root/webapp/src/components/PermissionModuleGrantRevoke.vue
diff options
context:
space:
mode:
Diffstat (limited to 'webapp/src/components/PermissionModuleGrantRevoke.vue')
-rw-r--r--webapp/src/components/PermissionModuleGrantRevoke.vue30
1 files changed, 18 insertions, 12 deletions
diff --git a/webapp/src/components/PermissionModuleGrantRevoke.vue b/webapp/src/components/PermissionModuleGrantRevoke.vue
index 029a3f6..d68f241 100644
--- a/webapp/src/components/PermissionModuleGrantRevoke.vue
+++ b/webapp/src/components/PermissionModuleGrantRevoke.vue
@@ -44,7 +44,6 @@
<v-stepper-items>
<v-stepper-content step="1">
<v-data-table
- class="group-table"
:headers="roleHeaders"
:items="roles"
item-key="id"
@@ -71,12 +70,11 @@
</v-data-table>
</v-stepper-content>
<v-stepper-content step="2">
- <!-- List of selected Users and selected Roles here -->
<v-layout row wrap>
- <v-flex xs12 class="list-content">
- <v-list two-line subheader>
+ <v-flex>
+ <v-list subheader>
<v-subheader inset>{{ $t('roles') }}</v-subheader>
- <v-divider></v-divider>
+ <v-divider class="list-header-margin"></v-divider>
<v-list-tile
v-for="role in rolesSelected"
:key="role.id"
@@ -88,10 +86,10 @@
</v-list-tile>
</v-list>
</v-flex>
- <v-flex xs12 class="list-content">
- <v-list>
+ <v-flex>
+ <v-list subheader>
<v-subheader inset>{{ $t('users') }}</v-subheader>
- <v-divider></v-divider>
+ <v-divider class="list-header-margin"></v-divider>
<v-list-tile
v-for="user in selectedUsers"
:key="user.username"
@@ -180,18 +178,26 @@ export default {
}
},
computed: {
- ...mapState('permissions', ['roles', 'selectedUsers'])
- },
- beforeMount () {
+ ...mapState('permissions', ['roles', 'selectedUsers']),
+ grantRevoke: function () {
+ return this.$store.state.permissions.grantRevoke
+ }
},
watch: {
+ grantRevoke: function (value) {
+ if (value) {
+ this.rolesSelected = []
+ this.step = 1
+ this.stepCompleted = 0
+ }
+ }
}
}
</script>
<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>
-.list-content {
+.list-header-margin {
margin-bottom: 10px;
}
</style>