|
|
@ -12,6 +12,7 @@ import { |
|
|
|
OpenNewRecordFormHookInj, |
|
|
|
OpenNewRecordFormHookInj, |
|
|
|
ReadonlyInj, |
|
|
|
ReadonlyInj, |
|
|
|
inject, |
|
|
|
inject, |
|
|
|
|
|
|
|
onMounted, |
|
|
|
provide, |
|
|
|
provide, |
|
|
|
useKanbanViewData, |
|
|
|
useKanbanViewData, |
|
|
|
} from '#imports' |
|
|
|
} from '#imports' |
|
|
@ -161,9 +162,9 @@ const handleCollapseStack = async (stackIdx: number) => { |
|
|
|
|
|
|
|
|
|
|
|
const handleExpandedFormCancel = () => { |
|
|
|
const handleExpandedFormCancel = () => { |
|
|
|
// remove the empty record |
|
|
|
// remove the empty record |
|
|
|
formattedData.value['Uncategorized'].pop() |
|
|
|
formattedData.value.Uncategorized.pop() |
|
|
|
// decrease total count by 1 |
|
|
|
// decrease total count by 1 |
|
|
|
countByStack.value['Uncategorized'] -= 1 |
|
|
|
countByStack.value.Uncategorized -= 1 |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
openNewRecordFormHook?.on(async (stackTitle) => { |
|
|
|
openNewRecordFormHook?.on(async (stackTitle) => { |
|
|
@ -173,10 +174,16 @@ openNewRecordFormHook?.on(async (stackTitle) => { |
|
|
|
[groupingField.value]: stackTitle, |
|
|
|
[groupingField.value]: stackTitle, |
|
|
|
} |
|
|
|
} |
|
|
|
// increase total count by 1 |
|
|
|
// increase total count by 1 |
|
|
|
countByStack.value['Uncategorized'] += 1 |
|
|
|
countByStack.value.Uncategorized += 1 |
|
|
|
// open the expanded form |
|
|
|
// open the expanded form |
|
|
|
expandForm(newRow) |
|
|
|
expandForm(newRow) |
|
|
|
}) |
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
onMounted(() => { |
|
|
|
|
|
|
|
// reset state to avoid from showing the previous stacks when switching kanban views |
|
|
|
|
|
|
|
groupingFieldColOptions.value = [] |
|
|
|
|
|
|
|
formattedData.value = {} |
|
|
|
|
|
|
|
}) |
|
|
|
</script> |
|
|
|
</script> |
|
|
|
|
|
|
|
|
|
|
|
<template> |
|
|
|
<template> |
|
|
|