|
|
@ -1,9 +1,27 @@ |
|
|
|
import type { ComputedRef, Ref } from 'vue' |
|
|
|
import type { ComputedRef, Ref } from 'vue' |
|
|
|
import type { Api, ColumnType, KanbanType, SelectOptionType, SelectOptionsType, TableType, ViewType } from 'nocodb-sdk' |
|
|
|
import type { Api, ColumnType, KanbanType, SelectOptionType, SelectOptionsType, TableType, ViewType } from 'nocodb-sdk' |
|
|
|
import { useI18n } from 'vue-i18n' |
|
|
|
|
|
|
|
import { message } from 'ant-design-vue' |
|
|
|
|
|
|
|
import type { Row } from '~/lib' |
|
|
|
import type { Row } from '~/lib' |
|
|
|
import { SharedViewPasswordInj, deepCompare, enumColor, extractPkFromRow, useInjectionState, useNuxtApp } from '#imports' |
|
|
|
import { |
|
|
|
|
|
|
|
IsPublicInj, |
|
|
|
|
|
|
|
SharedViewPasswordInj, |
|
|
|
|
|
|
|
deepCompare, |
|
|
|
|
|
|
|
enumColor, |
|
|
|
|
|
|
|
extractPkFromRow, |
|
|
|
|
|
|
|
extractSdkResponseErrorMsg, |
|
|
|
|
|
|
|
getHTMLEncodedText, |
|
|
|
|
|
|
|
inject, |
|
|
|
|
|
|
|
message, |
|
|
|
|
|
|
|
provide, |
|
|
|
|
|
|
|
ref, |
|
|
|
|
|
|
|
useApi, |
|
|
|
|
|
|
|
useI18n, |
|
|
|
|
|
|
|
useInjectionState, |
|
|
|
|
|
|
|
useNuxtApp, |
|
|
|
|
|
|
|
useProject, |
|
|
|
|
|
|
|
useSharedView, |
|
|
|
|
|
|
|
useSmartsheetStoreOrThrow, |
|
|
|
|
|
|
|
useUIPermission, |
|
|
|
|
|
|
|
} from '#imports' |
|
|
|
|
|
|
|
|
|
|
|
type GroupingFieldColOptionsType = SelectOptionType & { collapsed: boolean } |
|
|
|
type GroupingFieldColOptionsType = SelectOptionType & { collapsed: boolean } |
|
|
|
|
|
|
|
|
|
|
@ -223,7 +241,7 @@ const [useProvideKanbanViewStore, useKanbanViewStore] = useInjectionState( |
|
|
|
groupingFieldColOptions.value = [ |
|
|
|
groupingFieldColOptions.value = [ |
|
|
|
...((groupingFieldColumn.value?.colOptions as SelectOptionsType & { collapsed: boolean })?.options ?? []), |
|
|
|
...((groupingFieldColumn.value?.colOptions as SelectOptionsType & { collapsed: boolean })?.options ?? []), |
|
|
|
// enrich uncategorized stack
|
|
|
|
// enrich uncategorized stack
|
|
|
|
{ id: 'uncategorized', title: null, order: 0, color: enumColor.light[2] }, |
|
|
|
{ id: 'uncategorized', title: null, order: 0, color: enumColor.light[2] } as any, |
|
|
|
] |
|
|
|
] |
|
|
|
// sort by initial order
|
|
|
|
// sort by initial order
|
|
|
|
.sort((a, b) => a.order! - b.order!) |
|
|
|
.sort((a, b) => a.order! - b.order!) |
|
|
@ -302,15 +320,13 @@ const [useProvideKanbanViewStore, useKanbanViewStore] = useInjectionState( |
|
|
|
// }
|
|
|
|
// }
|
|
|
|
) |
|
|
|
) |
|
|
|
// audit
|
|
|
|
// audit
|
|
|
|
$api.utils |
|
|
|
$api.utils.auditRowUpdate(id, { |
|
|
|
.auditRowUpdate(id, { |
|
|
|
fk_model_id: meta.value?.id as string, |
|
|
|
fk_model_id: meta.value?.id as string, |
|
|
|
column_name: property, |
|
|
|
column_name: property, |
|
|
|
row_id: id, |
|
|
|
row_id: id, |
|
|
|
value: getHTMLEncodedText(toUpdate.row[property]), |
|
|
|
value: getHTMLEncodedText(toUpdate.row[property]), |
|
|
|
prev_value: getHTMLEncodedText(toUpdate.oldRow[property]), |
|
|
|
prev_value: getHTMLEncodedText(toUpdate.oldRow[property]), |
|
|
|
}) |
|
|
|
}) |
|
|
|
|
|
|
|
.then(() => {}) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** update row data(to sync formula and other related columns) */ |
|
|
|
/** update row data(to sync formula and other related columns) */ |
|
|
|
Object.assign(toUpdate.row, updatedRowData) |
|
|
|
Object.assign(toUpdate.row, updatedRowData) |
|
|
|