|
|
|
@ -1,6 +1,6 @@
|
|
|
|
|
<script setup lang="ts"> |
|
|
|
|
import type { ColumnReqType, ColumnType } from 'nocodb-sdk' |
|
|
|
|
import { ColumnInj, IsFormInj, IsKanbanInj, inject, provide, ref, toRef, useUIPermission } from '#imports' |
|
|
|
|
import { ActiveViewInj, ColumnInj, IsFormInj, IsKanbanInj, inject, provide, ref, toRef, useUIPermission } from '#imports' |
|
|
|
|
|
|
|
|
|
interface Props { |
|
|
|
|
column: ColumnType |
|
|
|
@ -18,6 +18,10 @@ const isDropDownOpen = ref(false)
|
|
|
|
|
|
|
|
|
|
const isKanban = inject(IsKanbanInj, ref(false)) |
|
|
|
|
|
|
|
|
|
const activeInj = inject(ActiveViewInj, ref()) |
|
|
|
|
|
|
|
|
|
const isLockedView = computed(() => activeInj.value?.lock_type === 'locked') |
|
|
|
|
|
|
|
|
|
const column = toRef(props, 'column') |
|
|
|
|
|
|
|
|
|
const { isUIAllowed } = useUIPermission() |
|
|
|
@ -39,6 +43,7 @@ const closeAddColumnDropdown = () => {
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
const openHeaderMenu = () => { |
|
|
|
|
if (isLockedView.value) return |
|
|
|
|
if (!isForm.value && isUIAllowed('edit-column')) { |
|
|
|
|
editColumnDropdown.value = true |
|
|
|
|
} |
|
|
|
|