|
|
|
@ -25,8 +25,6 @@ import {
|
|
|
|
|
import type { Row } from '#imports' |
|
|
|
|
|
|
|
|
|
const [useProvideExpandedFormStore, useExpandedFormStore] = useInjectionState((meta: Ref<TableType>, row: Ref<Row>) => { |
|
|
|
|
const { loadKanbanData, addOrEditStackRow } = useKanbanViewStoreOrThrow() |
|
|
|
|
|
|
|
|
|
const { $e, $state, $api } = useNuxtApp() |
|
|
|
|
|
|
|
|
|
const { api, isLoading: isCommentsLoading, error: commentsError } = useApi() |
|
|
|
@ -181,6 +179,7 @@ const [useProvideExpandedFormStore, useExpandedFormStore] = useInjectionState((m
|
|
|
|
|
fn: async (rowData: any) => { |
|
|
|
|
await $api.dbTableRow.create('noco', project.value.id as string, meta.value.id, { ...pkData, ...rowData }) |
|
|
|
|
if (activeView.value?.type === ViewTypes.KANBAN) { |
|
|
|
|
const { loadKanbanData } = useKanbanViewStoreOrThrow() |
|
|
|
|
await loadKanbanData() |
|
|
|
|
} |
|
|
|
|
reloadTrigger?.trigger() |
|
|
|
@ -200,6 +199,8 @@ const [useProvideExpandedFormStore, useExpandedFormStore] = useInjectionState((m
|
|
|
|
|
throw new Error(res.message) |
|
|
|
|
} |
|
|
|
|
if (activeView.value?.type === ViewTypes.KANBAN) { |
|
|
|
|
const { loadKanbanData } = useKanbanViewStoreOrThrow() |
|
|
|
|
|
|
|
|
|
await loadKanbanData() |
|
|
|
|
} |
|
|
|
|
reloadTrigger?.trigger() |
|
|
|
@ -234,6 +235,7 @@ const [useProvideExpandedFormStore, useExpandedFormStore] = useInjectionState((m
|
|
|
|
|
fn: async (id: string, data: Record<string, any>) => { |
|
|
|
|
await $api.dbTableRow.update(NOCO, project.value.id as string, meta.value.id, encodeURIComponent(id), data) |
|
|
|
|
if (activeView.value?.type === ViewTypes.KANBAN) { |
|
|
|
|
const { loadKanbanData } = useKanbanViewStoreOrThrow() |
|
|
|
|
await loadKanbanData() |
|
|
|
|
} |
|
|
|
|
reloadTrigger?.trigger() |
|
|
|
@ -244,6 +246,7 @@ const [useProvideExpandedFormStore, useExpandedFormStore] = useInjectionState((m
|
|
|
|
|
fn: async (id: string, data: Record<string, any>) => { |
|
|
|
|
await $api.dbTableRow.update(NOCO, project.value.id as string, meta.value.id, encodeURIComponent(id), data) |
|
|
|
|
if (activeView.value?.type === ViewTypes.KANBAN) { |
|
|
|
|
const { loadKanbanData } = useKanbanViewStoreOrThrow() |
|
|
|
|
await loadKanbanData() |
|
|
|
|
} |
|
|
|
|
reloadTrigger?.trigger() |
|
|
|
@ -265,6 +268,7 @@ const [useProvideExpandedFormStore, useExpandedFormStore] = useInjectionState((m
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (activeView.value?.type === ViewTypes.KANBAN) { |
|
|
|
|
const { addOrEditStackRow } = useKanbanViewStoreOrThrow() |
|
|
|
|
addOrEditStackRow(row.value, isNewRow) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|