Browse Source

fix(nc-gui): wire new apis

pull/7716/head
DarkPhoenix2704 7 months ago
parent
commit
05d1502406
  1. 1
      packages/nc-gui/components/smartsheet/calendar/index.vue
  2. 8
      packages/nc-gui/composables/useExpandedFormStore.ts

1
packages/nc-gui/components/smartsheet/calendar/index.vue

@ -86,7 +86,6 @@ const expandedFormRowState = ref<Record<string, any>>()
const expandRecord = (row: RowType, state?: Record<string, any>) => {
const rowId = extractPkFromRow(row.row, meta.value!.columns!)
if (rowId) {
router.push({
query: {

8
packages/nc-gui/composables/useExpandedFormStore.ts

@ -1,9 +1,11 @@
import { UITypes, ViewTypes, isVirtualCol } from 'nocodb-sdk'
import type { AuditType, ColumnType, TableType } from 'nocodb-sdk'
import { UITypes, ViewTypes, isVirtualCol } from 'nocodb-sdk'
import type { Ref } from 'vue'
import dayjs from 'dayjs'
import {
IsPublicInj,
NOCO,
type Row,
computed,
extractPkFromRow,
extractSdkResponseErrorMsg,
@ -22,7 +24,6 @@ import {
useSharedView,
useUndoRedo,
} from '#imports'
import type { Row } from '#imports'
const [useProvideExpandedFormStore, useExpandedFormStore] = useInjectionState((meta: Ref<TableType>, _row: Ref<Row>) => {
const { $e, $state, $api } = useNuxtApp()
@ -31,6 +32,8 @@ const [useProvideExpandedFormStore, useExpandedFormStore] = useInjectionState((m
const { t } = useI18n()
const isPublic = inject(IsPublicInj, ref(false))
const commentsOnly = ref(false)
const commentsAndLogs = ref<any[]>([])
@ -301,6 +304,7 @@ const [useProvideExpandedFormStore, useExpandedFormStore] = useInjectionState((m
}
const loadRow = async (rowId?: string, onlyVirtual = false) => {
if (isPublic.value) return
let record = await $api.dbTableRow.read(
NOCO,
// todo: base_id missing on view type

Loading…
Cancel
Save