Browse Source

fix(gui-v2): add isUIAllowed('edit-column') to header cell

pull/3087/head
Wing-Kam Wong 2 years ago
parent
commit
54d62a1222
  1. 5
      packages/nc-gui-v2/components/smartsheet-header/Cell.vue

5
packages/nc-gui-v2/components/smartsheet-header/Cell.vue

@ -10,10 +10,13 @@ const props = defineProps<{ column: ColumnType & { meta: any }; required: boolea
const hideMenu = toRef(props, 'hideMenu') const hideMenu = toRef(props, 'hideMenu')
const meta = inject(MetaInj) const meta = inject(MetaInj)
const isForm = inject(IsFormInj, ref(false)) const isForm = inject(IsFormInj, ref(false))
const column = toRef(props, 'column') const column = toRef(props, 'column')
const { isUIAllowed } = useUIPermission()
provide(ColumnInj, column) provide(ColumnInj, column)
// instantiate column update store // instantiate column update store
@ -28,7 +31,7 @@ useProvideColumnCreateStore(meta as Ref<TableType>, column)
<template v-if="!hideMenu"> <template v-if="!hideMenu">
<div class="flex-1" /> <div class="flex-1" />
<SmartsheetHeaderMenu v-if="!isForm" /> <SmartsheetHeaderMenu v-if="!isForm && isUIAllowed('edit-column')" />
</template> </template>
</div> </div>
</template> </template>

Loading…
Cancel
Save