mirror of https://github.com/nocodb/nocodb
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
53 lines
1.4 KiB
53 lines
1.4 KiB
2 years ago
|
<script setup lang="ts">
|
||
2 years ago
|
import { IsLockedInj, useKanbanViewStoreOrThrow } from '#imports'
|
||
2 years ago
|
|
||
|
const { isUIAllowed } = useUIPermission()
|
||
|
|
||
2 years ago
|
const { groupingFieldColumn } = useKanbanViewStoreOrThrow()
|
||
2 years ago
|
|
||
|
const isLocked = inject(IsLockedInj, ref(false))
|
||
|
|
||
|
const addOrEditStackDropdown = ref(false)
|
||
|
|
||
2 years ago
|
const handleSubmit = async () => {
|
||
|
addOrEditStackDropdown.value = false
|
||
|
}
|
||
|
|
||
2 years ago
|
provide(IsKanbanInj, ref(true))
|
||
|
</script>
|
||
|
|
||
|
<template>
|
||
2 years ago
|
<a-dropdown
|
||
|
v-if="isUIAllowed('edit-column')"
|
||
|
v-model:visible="addOrEditStackDropdown"
|
||
|
:trigger="['click']"
|
||
|
overlay-class-name="nc-dropdown-kanban-add-edit-stack-menu"
|
||
|
>
|
||
2 years ago
|
<div class="nc-kanban-btn">
|
||
2 years ago
|
<a-button
|
||
2 years ago
|
v-e="['c:kanban:edit-or-add-stack']"
|
||
2 years ago
|
class="nc-kanban-add-edit-stack-menu-btn nc-toolbar-btn"
|
||
|
:disabled="isLocked"
|
||
|
>
|
||
2 years ago
|
<div class="flex items-center gap-1">
|
||
2 years ago
|
<MdiPlusCircleOutline />
|
||
2 years ago
|
<span class="text-capitalize !text-sm font-weight-normal">
|
||
2 years ago
|
{{ $t('activity.kanban.addOrEditStack') }}
|
||
2 years ago
|
</span>
|
||
|
<MdiMenuDown class="text-grey" />
|
||
|
</div>
|
||
|
</a-button>
|
||
|
</div>
|
||
2 years ago
|
<template #overlay>
|
||
2 years ago
|
<LazySmartsheetColumnEditOrAddProvider
|
||
2 years ago
|
v-if="addOrEditStackDropdown"
|
||
|
:column="groupingFieldColumn"
|
||
2 years ago
|
@submit="handleSubmit"
|
||
2 years ago
|
@cancel="addOrEditStackDropdown = false"
|
||
|
@click.stop
|
||
|
@keydown.stop
|
||
|
/>
|
||
|
</template>
|
||
|
</a-dropdown>
|
||
|
</template>
|