|
|
@ -1,5 +1,5 @@ |
|
|
|
<script setup lang="ts"> |
|
|
|
<script setup lang="ts"> |
|
|
|
import type { ColumnType, TableType, ViewType } from 'nocodb-sdk' |
|
|
|
import type { TableType, ViewType } from 'nocodb-sdk' |
|
|
|
import { isSystemColumn, isVirtualCol } from 'nocodb-sdk' |
|
|
|
import { isSystemColumn, isVirtualCol } from 'nocodb-sdk' |
|
|
|
import type { Ref } from 'vue' |
|
|
|
import type { Ref } from 'vue' |
|
|
|
import Cell from '../Cell.vue' |
|
|
|
import Cell from '../Cell.vue' |
|
|
@ -10,14 +10,10 @@ import { |
|
|
|
FieldsInj, |
|
|
|
FieldsInj, |
|
|
|
IsFormInj, |
|
|
|
IsFormInj, |
|
|
|
MetaInj, |
|
|
|
MetaInj, |
|
|
|
NOCO, |
|
|
|
|
|
|
|
computedInject, |
|
|
|
computedInject, |
|
|
|
extractPkFromRow, |
|
|
|
|
|
|
|
provide, |
|
|
|
provide, |
|
|
|
ref, |
|
|
|
ref, |
|
|
|
toRef, |
|
|
|
toRef, |
|
|
|
useNuxtApp, |
|
|
|
|
|
|
|
useProject, |
|
|
|
|
|
|
|
useProvideExpandedFormStore, |
|
|
|
useProvideExpandedFormStore, |
|
|
|
useProvideSmartsheetStore, |
|
|
|
useProvideSmartsheetStore, |
|
|
|
useVModel, |
|
|
|
useVModel, |
|
|
@ -53,25 +49,10 @@ const fields = computedInject(FieldsInj, (_fields) => { |
|
|
|
|
|
|
|
|
|
|
|
provide(MetaInj, meta) |
|
|
|
provide(MetaInj, meta) |
|
|
|
|
|
|
|
|
|
|
|
const { commentsDrawer, changedColumns, state: rowState, isNew } = useProvideExpandedFormStore(meta, row) |
|
|
|
const { commentsDrawer, changedColumns, state: rowState, isNew, loadRow } = useProvideExpandedFormStore(meta, row) |
|
|
|
|
|
|
|
|
|
|
|
const { $api } = useNuxtApp() |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (props.loadRow) { |
|
|
|
if (props.loadRow) { |
|
|
|
const { project } = useProject() |
|
|
|
await loadRow() |
|
|
|
|
|
|
|
|
|
|
|
const { sharedView } = useSharedView() as Record<string, any> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
row.value.row = await $api.dbTableRow.read( |
|
|
|
|
|
|
|
NOCO, |
|
|
|
|
|
|
|
(project?.value?.id || sharedView.value.view.project_id) as string, |
|
|
|
|
|
|
|
meta.value.title, |
|
|
|
|
|
|
|
extractPkFromRow(row.value.row, meta.value.columns as ColumnType[]), |
|
|
|
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
row.value.oldRow = { ...row.value.row } |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
row.value.rowMeta = {} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
useProvideSmartsheetStore(ref({}) as Ref<ViewType>, meta) |
|
|
|
useProvideSmartsheetStore(ref({}) as Ref<ViewType>, meta) |
|
|
|