diff --git a/packages/nc-gui/components/smartsheet/Kanban.vue b/packages/nc-gui/components/smartsheet/Kanban.vue index a1117c728c..e9b23af0ba 100644 --- a/packages/nc-gui/components/smartsheet/Kanban.vue +++ b/packages/nc-gui/components/smartsheet/Kanban.vue @@ -23,14 +23,23 @@ interface Attachment { } const meta = inject(MetaInj) + const view = inject(ActiveViewInj) + const reloadViewDataHook = inject(ReloadViewDataHookInj) + const openNewRecordFormHook = inject(OpenNewRecordFormHookInj, createEventHook()) const expandedFormDlg = ref(false) + const expandedFormRow = ref() + const expandedFormRowState = ref>() +const deleteStackVModel = ref(false) + +const stackToBeDeleted = ref('') + const { loadKanbanData, loadMoreKanbanData, @@ -44,6 +53,7 @@ const { groupingField, groupingFieldColumn, countByStack, + deleteStack, } = useKanbanViewData(meta, view as any) const { isUIAllowed } = useUIPermission() @@ -169,19 +179,23 @@ const kanbanListRef = (kanbanListElement: HTMLElement) => { } } -const collapseStack = () => { - // TODO: +const handleDeleteStackClick = (stackTitle: string) => { + deleteStackVModel.value = true + stackToBeDeleted.value = stackTitle } -const renameStack = () => { - // TODO: +const handleDeleteStackConfirmClick = async () => { + await deleteStack(stackToBeDeleted.value) + deleteStackVModel.value = false } -const deleteStack = () => { +const collapseStack = () => { // TODO: } -const deleteStackVModel = ref(false) +const renameStack = () => { + // TODO: +} openNewRecordFormHook?.on(async () => { const newRow = await addEmptyRow() @@ -190,6 +204,7 @@ openNewRecordFormHook?.on(async () => {
- Deleting this stack will also remove the select option from the `{{ groupingField }}`. The records will move to the - uncategorized stack. + Deleting this stack will also remove the select option `{{ stackToBeDeleted }}` from the `{{ groupingField }}`. The records + will move to the uncategorized stack.