From eea4ef0211b22284d0aa1032254f1148163beaca Mon Sep 17 00:00:00 2001
From: braks <78412429+bcakmakoglu@users.noreply.github.com>
Date: Sat, 22 Oct 2022 09:55:24 +0200
Subject: [PATCH] refactor(nc-gui): show expand icon depending on role and
readonly state
---
packages/nc-gui/components/smartsheet/Grid.vue | 9 ++++++++-
packages/nc-gui/composables/useRoles/index.ts | 8 ++++++--
2 files changed, 14 insertions(+), 3 deletions(-)
diff --git a/packages/nc-gui/components/smartsheet/Grid.vue b/packages/nc-gui/components/smartsheet/Grid.vue
index 357bb39204..c0c6aaf6ee 100644
--- a/packages/nc-gui/components/smartsheet/Grid.vue
+++ b/packages/nc-gui/components/smartsheet/Grid.vue
@@ -33,6 +33,7 @@ import {
useI18n,
useMetas,
useMultiSelect,
+ useRoles,
useRoute,
useSmartsheetStoreOrThrow,
useUIPermission,
@@ -57,6 +58,7 @@ const isLocked = inject(IsLockedInj, ref(false))
const reloadViewDataHook = inject(ReloadViewDataHookInj, createEventHook())
const openNewRecordFormHook = inject(OpenNewRecordFormHookInj, createEventHook())
+const { hasRole } = useRoles()
const { isUIAllowed } = useUIPermission()
const hasEditPermission = $computed(() => isUIAllowed('xcDatatableEditable'))
@@ -477,7 +479,12 @@ watch(