Browse Source

fix shared map view issue - shared map view works now

pull/5248/head
Daniel Spaude 2 years ago
parent
commit
fd5cb3f58e
No known key found for this signature in database
GPG Key ID: 654A3D1FA4F35FFE
  1. 7
      packages/nc-gui/composables/useMapViewDataStore.ts

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

@ -45,7 +45,7 @@ const [useProvideMapViewStore, useMapViewStore] = useInjectionState(
const { sorts, nestedFilters } = useSmartsheetStoreOrThrow() const { sorts, nestedFilters } = useSmartsheetStoreOrThrow()
const { fetchSharedViewData } = useSharedView() const { sharedView, fetchSharedViewData } = useSharedView()
const mapMetaData = ref<MapType>({}) const mapMetaData = ref<MapType>({})
@ -72,7 +72,10 @@ const [useProvideMapViewStore, useMapViewStore] = useInjectionState(
async function loadMapMeta() { async function loadMapMeta() {
if (!viewMeta?.value?.id || !meta?.value?.columns) return if (!viewMeta?.value?.id || !meta?.value?.columns) return
mapMetaData.value = await $api.dbView.mapRead(viewMeta.value.id) mapMetaData.value = isPublic.value ? (sharedView.value?.view as MapType) : await $api.dbView.mapRead(viewMeta.value.id)
// if (!viewMeta?.value?.id || !meta?.value?.columns) return
// mapMetaData.value = await $api.dbView.mapRead(viewMeta.value.id)
geoDataFieldColumn.value = geoDataFieldColumn.value =
(meta.value.columns as ColumnType[]).filter((f) => f.id === mapMetaData.value.fk_geo_data_col_id)[0] || {} (meta.value.columns as ColumnType[]).filter((f) => f.id === mapMetaData.value.fk_geo_data_col_id)[0] || {}
} }

Loading…
Cancel
Save