summaryrefslogtreecommitdiff
path: root/src/components/_sila/Global/TableRowAction.vue
diff options
context:
space:
mode:
authorVitalii Lysak <v.lysak@dunice.net>2022-09-05 15:56:39 +0300
committerVitalii Lysak <v.lysak@dunice.net>2022-09-05 15:56:39 +0300
commit86de3af082ba6c541d9a6cb10c4db0d14f6267e8 (patch)
treed68f6f7560b98cbd9451e035198778f7fbf1b340 /src/components/_sila/Global/TableRowAction.vue
parentfec1602b12c66e7675f4020d544886871cf5f5c9 (diff)
downloadwebui-vue-86de3af082ba6c541d9a6cb10c4db0d14f6267e8.tar.xz
add method for isNotAdmin
Diffstat (limited to 'src/components/_sila/Global/TableRowAction.vue')
-rw-r--r--src/components/_sila/Global/TableRowAction.vue7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/components/_sila/Global/TableRowAction.vue b/src/components/_sila/Global/TableRowAction.vue
index c18b4f20..9384538e 100644
--- a/src/components/_sila/Global/TableRowAction.vue
+++ b/src/components/_sila/Global/TableRowAction.vue
@@ -42,9 +42,7 @@
v-else-if="showButton"
variant="link"
:class="{ 'btn-icon-only': btnIconOnly }"
- :disabled="
- !enabled || $store.getters['authentication/role'] === 'ReadOnly'
- "
+ :disabled="!enabled || isNotAdmin"
:title="btnIconOnly ? title : !title"
@click="$emit('click-table-action', value)"
>
@@ -100,6 +98,9 @@ export default {
},
},
computed: {
+ isNotAdmin() {
+ return this.$store.getters['authentication/role'] === 'ReadOnly';
+ },
dataForExport() {
return JSON.stringify(omit(this.rowData, 'actions'));
},