From 86de3af082ba6c541d9a6cb10c4db0d14f6267e8 Mon Sep 17 00:00:00 2001
From: Vitalii Lysak <v.lysak@dunice.net>
Date: Mon, 5 Sep 2022 15:56:39 +0300
Subject: add method for isNotAdmin

---
 src/views/_sila/Overview/Inventory/InventoryTableChassis.vue | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

(limited to 'src/views/_sila/Overview/Inventory/InventoryTableChassis.vue')

diff --git a/src/views/_sila/Overview/Inventory/InventoryTableChassis.vue b/src/views/_sila/Overview/Inventory/InventoryTableChassis.vue
index d141924f..8897d87a 100644
--- a/src/views/_sila/Overview/Inventory/InventoryTableChassis.vue
+++ b/src/views/_sila/Overview/Inventory/InventoryTableChassis.vue
@@ -35,7 +35,7 @@
           v-model="row.item.identifyLed"
           name="switch"
           switch
-          :disabled="$store.getters['authentication/role'] === 'ReadOnly'"
+          :disabled="isNotAdmin"
           @change="toggleIdentifyLedValue(row.item)"
         >
           <span v-if="row.item.identifyLed">
@@ -163,6 +163,9 @@ export default {
     };
   },
   computed: {
+    isNotAdmin() {
+      return this.$store.getters['authentication/role'] === 'ReadOnly';
+    },
     chassis() {
       return this.$store.getters['chassis/chassis'];
     },
-- 
cgit v1.2.3

