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