|
|
@ -1,5 +1,5 @@ |
|
|
|
<script setup lang="ts"> |
|
|
|
<script setup lang="ts"> |
|
|
|
import { IsLockedInj, IsPublicInj, useKanbanViewStoreOrThrow } from '#imports' |
|
|
|
import { IsLockedInj, IsPublicInj, useKanbanViewStoreOrThrow, useMenuCloseOnEsc } from '#imports' |
|
|
|
|
|
|
|
|
|
|
|
const { isUIAllowed } = useUIPermission() |
|
|
|
const { isUIAllowed } = useUIPermission() |
|
|
|
|
|
|
|
|
|
|
@ -7,12 +7,14 @@ const { groupingFieldColumn } = useKanbanViewStoreOrThrow() |
|
|
|
|
|
|
|
|
|
|
|
const isLocked = inject(IsLockedInj, ref(false)) |
|
|
|
const isLocked = inject(IsLockedInj, ref(false)) |
|
|
|
|
|
|
|
|
|
|
|
const addOrEditStackDropdown = ref(false) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const IsPublic = inject(IsPublicInj, ref(false)) |
|
|
|
const IsPublic = inject(IsPublicInj, ref(false)) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const open = ref(false) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
useMenuCloseOnEsc(open) |
|
|
|
|
|
|
|
|
|
|
|
const handleSubmit = async () => { |
|
|
|
const handleSubmit = async () => { |
|
|
|
addOrEditStackDropdown.value = false |
|
|
|
open.value = false |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
provide(IsKanbanInj, ref(true)) |
|
|
|
provide(IsKanbanInj, ref(true)) |
|
|
@ -21,7 +23,7 @@ provide(IsKanbanInj, ref(true)) |
|
|
|
<template> |
|
|
|
<template> |
|
|
|
<a-dropdown |
|
|
|
<a-dropdown |
|
|
|
v-if="!IsPublic && isUIAllowed('edit-column')" |
|
|
|
v-if="!IsPublic && isUIAllowed('edit-column')" |
|
|
|
v-model:visible="addOrEditStackDropdown" |
|
|
|
v-model:visible="open" |
|
|
|
:trigger="['click']" |
|
|
|
:trigger="['click']" |
|
|
|
overlay-class-name="nc-dropdown-kanban-add-edit-stack-menu" |
|
|
|
overlay-class-name="nc-dropdown-kanban-add-edit-stack-menu" |
|
|
|
> |
|
|
|
> |
|
|
@ -42,10 +44,10 @@ provide(IsKanbanInj, ref(true)) |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<template #overlay> |
|
|
|
<template #overlay> |
|
|
|
<LazySmartsheetColumnEditOrAddProvider |
|
|
|
<LazySmartsheetColumnEditOrAddProvider |
|
|
|
v-if="addOrEditStackDropdown" |
|
|
|
v-if="open" |
|
|
|
:column="groupingFieldColumn" |
|
|
|
:column="groupingFieldColumn" |
|
|
|
@submit="handleSubmit" |
|
|
|
@submit="handleSubmit" |
|
|
|
@cancel="addOrEditStackDropdown = false" |
|
|
|
@cancel="open = false" |
|
|
|
@click.stop |
|
|
|
@click.stop |
|
|
|
@keydown.stop |
|
|
|
@keydown.stop |
|
|
|
/> |
|
|
|
/> |
|
|
|