Browse Source

feat(nc-gui): add nc-kanban-btn & refactor handleSubmit

pull/3818/head
Wing-Kam Wong 2 years ago
parent
commit
16b95bc717
  1. 17
      packages/nc-gui/components/smartsheet-toolbar/KanbanStackEditOrAdd.vue

17
packages/nc-gui/components/smartsheet-toolbar/KanbanStackEditOrAdd.vue

@ -24,11 +24,18 @@ const isLocked = inject(IsLockedInj, ref(false))
const addOrEditStackDropdown = ref(false)
const handleSubmit = async () => {
addOrEditStackDropdown.value = false
await loadKanbanMeta()
await loadKanbanData()
}
provide(IsKanbanInj, ref(true))
</script>
<template>
<a-dropdown v-if="isUIAllowed('edit-column')" v-model:visible="addOrEditStackDropdown" :trigger="['click']">
<div class="nc-kanban-btn">
<a-button v-t="['c:kanban-stack-edit-or-add']" class="nc-fields-menu-btn nc-toolbar-btn" :disabled="isLocked">
<div class="flex items-center gap-1">
<mdi-plus-circle-outline />
@ -39,18 +46,12 @@ provide(IsKanbanInj, ref(true))
<MdiMenuDown class="text-grey" />
</div>
</a-button>
</div>
<template #overlay>
<SmartsheetColumnEditOrAddProvider
v-if="addOrEditStackDropdown"
:column="groupingFieldColumn"
@submit="
;async () => {
addOrEditStackDropdown = false
await loadKanbanMeta()
await loadKanbanData()
}
"
@submit="handleSubmit"
@cancel="addOrEditStackDropdown = false"
@click.stop
@keydown.stop

Loading…
Cancel
Save