feat: combinetable & views, allow disabling views

Signed-off-by: Pranav C <pranavxc@gmail.com>
This commit is contained in:
Pranav C
2021-12-09 20:30:17 +05:30
parent 298ccd8a5b
commit 2f54fb14eb
9 changed files with 126 additions and 18 deletions

View File

@@ -49,10 +49,13 @@
<v-simple-table dense style="min-width: 400px">
<thead>
<tr>
<th>
<th class="caption">
Models
</th>
<th v-for="role in roles" :key="role">
<th class="caption">
Parent
</th>
<th v-for="role in roles" :key="role" class="caption">
{{ role }}
</th>
</tr>
@@ -68,11 +71,17 @@
<td>
<v-tooltip bottom>
<template #activator="{on}">
<span v-on="on">{{ table._tn }}</span>
<v-icon small :color="viewIcons[table.show_as || table.type].color" v-on="on">
{{ viewIcons[table.show_as || table.type].icon }}
</v-icon> <span class="caption ml-2" v-on="on">{{ table._tn }}</span>
</template>
<span class="caption">{{ table.tn }}</span>
</v-tooltip>
</td>
<td>
<span v-if="table.ptn" class="caption">{{ table.ptn }}</span>
<!-- {{ table.show_as || table.type }}-->
</td>
<td v-for="role in roles" :key="`${table.tn}-${role}`">
<v-tooltip bottom>
<template #activator="{on}">
@@ -81,7 +90,9 @@
>
<v-checkbox
v-model="table.disabled[role]"
class="pt-0 mt-0"
dense
hide-details
:true-value="false"
:false-value="true"
@change="$set(table,'edited',true)"
@@ -107,12 +118,14 @@
<script>
import { mapGetters } from 'vuex'
import viewIcons from '~/helpers/viewIcons'
export default {
name: 'ToggleTableUiAcl',
components: {},
props: ['nodes', 'db'],
data: () => ({
viewIcons,
models: null,
updating: false,
dbsTab: 0,