Browse Source

shared map view issue debugging - WIP

pull/5248/head
Daniel Spaude 2 years ago
parent
commit
b0cad5fa8e
No known key found for this signature in database
GPG Key ID: 654A3D1FA4F35FFE
  1. 5
      packages/nc-gui/composables/useMapViewDataStore.ts
  2. 2
      packages/nc-gui/composables/useViewData.ts
  3. 1
      packages/nocodb/src/lib/controllers/publicControllers/publicMeta.ctl.ts

5
packages/nc-gui/composables/useMapViewDataStore.ts

@ -33,7 +33,7 @@ const [useProvideMapViewStore, useMapViewStore] = useInjectionState(
const formattedData = ref<Row[]>([])
const { api } = useApi()
// const { api } = useApi()
const { project } = useProject()
@ -71,8 +71,9 @@ const [useProvideMapViewStore, useMapViewStore] = useInjectionState(
}
async function loadMapMeta() {
alert('loadMapData')
if (!viewMeta?.value?.id || !meta?.value?.columns) return
mapMetaData.value = await $api.dbView.mapRead(viewMeta.value.id)
// mapMetaData.value = await $api.dbView.mapRead(viewMeta.value.id)
geoDataFieldColumn.value =
(meta.value.columns as ColumnType[]).filter((f) => f.id === mapMetaData.value.fk_geo_data_col_id)[0] || {}
}

2
packages/nc-gui/composables/useViewData.ts

@ -187,6 +187,7 @@ export function useViewData(
}
async function loadData(params: Parameters<Api<any>['dbViewRow']['list']>[4] = {}) {
debugger
if ((!project?.value?.id || !meta.value?.id || !viewMeta.value?.id) && !isPublic.value) return
const response = !isPublic.value
? await api.dbViewRow.list('noco', project.value.id!, meta.value!.id!, viewMeta.value!.id!, {
@ -217,6 +218,7 @@ export function useViewData(
galleryData.value = isPublic.value
? (sharedView.value?.view as GalleryType)
: await $api.dbView.galleryRead(viewMeta.value.id)
// debugger
}
async function insertRow(

1
packages/nocodb/src/lib/controllers/publicControllers/publicMeta.ctl.ts

@ -4,6 +4,7 @@ import { publicMetaService } from '../../services';
import type { Request, Response } from 'express';
export async function viewMetaGet(req: Request, res: Response) {
console.log('FOO viewMetaGet');
res.json(
await publicMetaService.viewMetaGet({
password: req.headers?.['xc-password'] as string,

Loading…
Cancel
Save