- You're over the limit.
- You're getting close to the limit.
- The limit of markers shown in a Map View is 1000 records.
+ {{ $t('msg.info.map.overLimit') }}
+ {{ $t('msg.info.map.closeLimit') }}
+ {{ $t('msg.info.map.limitNumber') }}
-
{{ count }} records
+
{{ count }} {{ $t('objects.records') }}
diff --git a/packages/nc-gui/components/smartsheet/toolbar/MappedBy.vue b/packages/nc-gui/components/smartsheet/toolbar/MappedBy.vue
index 1d3b206bea..2ee1ada1c6 100644
--- a/packages/nc-gui/components/smartsheet/toolbar/MappedBy.vue
+++ b/packages/nc-gui/components/smartsheet/toolbar/MappedBy.vue
@@ -72,12 +72,7 @@ const handleChange = () => {
-
+
[]) =>
- list.map((row) => ({
- row: { ...row },
- oldRow: { ...row },
- rowMeta: {},
- }))
+ list.map(
+ (row) =>
+ ({
+ row: { ...row },
+ oldRow: { ...row },
+ rowMeta: {},
+ } as Row),
+ )
const [useProvideMapViewStore, useMapViewStore] = useInjectionState(
(
@@ -73,7 +76,6 @@ const [useProvideMapViewStore, useMapViewStore] = useInjectionState(
}
async function loadMapData() {
-
if ((!project?.value?.id || !meta.value?.id || !viewMeta.value?.id) && !isPublic?.value) return
const res = !isPublic.value
diff --git a/packages/nc-gui/composables/useSmartsheetStore.ts b/packages/nc-gui/composables/useSmartsheetStore.ts
index 3bd276c022..b25e73c33f 100644
--- a/packages/nc-gui/composables/useSmartsheetStore.ts
+++ b/packages/nc-gui/composables/useSmartsheetStore.ts
@@ -12,23 +12,9 @@ const [useProvideSmartsheetStore, useSmartsheetStore] = useInjectionState(
initialSorts?: Ref,
initialFilters?: Ref,
) => {
- // const paginatedData = inject(PaginationDataInj)!
- // const { paginationData } = useViewData(meta, view)
-
- // debugger
const { $api } = useNuxtApp()
const { sqlUis, project } = useProject()
- const totalNumberOfTableRows = ref(async () => {
- const { count } = await $api.dbViewRow.count(
- NOCO,
- project?.value?.title as string,
- meta?.value?.id as string,
- meta?.value?.id as string,
- )
- return count
- })
-
const sqlUi = ref(meta.value?.base_id ? sqlUis.value[meta.value?.base_id] : Object.values(sqlUis.value)[0])
const cellRefs = ref([])
@@ -37,8 +23,6 @@ const [useProvideSmartsheetStore, useSmartsheetStore] = useInjectionState(
const eventBus = useEventBus(Symbol('SmartsheetStore'))
- // getters
- // const count = computed(() => paginatedData.value?.totalRows ?? Infinity)
const isLocked = computed(() => view.value?.lock_type === 'locked')
const isPkAvail = computed(() => (meta.value as TableType)?.columns?.some((c) => c.pk))
const isGrid = computed(() => view.value?.type === ViewTypes.GRID)
@@ -68,7 +52,6 @@ const [useProvideSmartsheetStore, useSmartsheetStore] = useInjectionState(
const nestedFilters = ref(unref(initialFilters) ?? [])
return {
- totalNumberOfTableRows,
view,
meta,
isLocked,
diff --git a/packages/nc-gui/composables/useViewData.ts b/packages/nc-gui/composables/useViewData.ts
index 135e7ff497..b572c9aea2 100644
--- a/packages/nc-gui/composables/useViewData.ts
+++ b/packages/nc-gui/composables/useViewData.ts
@@ -209,7 +209,6 @@ export function useViewData(
async function insertRow(
currentRow: Row,
- _rowIndex = formattedData.value?.length,
ltarState: Record = {},
{ metaValue = meta.value, viewMetaValue = viewMeta.value }: { metaValue?: TableType; viewMetaValue?: ViewType } = {},
) {
@@ -323,7 +322,7 @@ export function useViewData(
await until(() => !(row.rowMeta?.new && row.rowMeta?.saving)).toMatch((v) => v)
if (row.rowMeta.new) {
- return await insertRow(row, formattedData.value.indexOf(row), ltarState, args)
+ return await insertRow(row, ltarState, args)
} else {
// if the field name is missing skip update
if (property) {
diff --git a/packages/nc-gui/context/index.ts b/packages/nc-gui/context/index.ts
index b696e9387a..ecf93ddc25 100644
--- a/packages/nc-gui/context/index.ts
+++ b/packages/nc-gui/context/index.ts
@@ -17,7 +17,6 @@ export const IsFormInj: InjectionKey[> = Symbol('is-form-injection')
export const IsGridInj: InjectionKey][> = Symbol('is-grid-injection')
export const IsGalleryInj: InjectionKey][> = Symbol('is-gallery-injection')
export const IsMapInj: InjectionKey][> = Symbol('is-map-injection')
-export const IsGeodataActiveInj: InjectionKey][> = Symbol('is-geodata-active-injection')
export const IsKanbanInj: InjectionKey][> = Symbol('is-kanban-injection')
export const IsLockedInj: InjectionKey][> = Symbol('is-locked-injection')
export const CellValueInj: InjectionKey][> = Symbol('cell-value-injection')
diff --git a/packages/nc-gui/lang/en.json b/packages/nc-gui/lang/en.json
index 1eb7022f93..aa8ab2a361 100644
--- a/packages/nc-gui/lang/en.json
+++ b/packages/nc-gui/lang/en.json
@@ -250,6 +250,9 @@
"barcodeFormat": "Barcode format",
"qrCodeValueTooLong": "Too many characters for a QR code",
"barcodeValueTooLong": "Too many characters for a barcode",
+ "yourLocation": "Your Location",
+ "lng": "Lng",
+ "lat": "Lat",
"aggregateFunction": "Aggregate function",
"dbCreateIfNotExists": "Database : create if not exists",
"clientKey": "Client Key",
@@ -515,6 +518,11 @@
"orgCreator": "Creator can create new projects and access any invited project.",
"orgViewer": "Viewer is not allowed to create new projects but they can access any invited project."
},
+ "map": {
+ "overLimit": "You're over the limit.",
+ "closeLimit": "You're getting close to the limit.",
+ "limitNumber": "The limit of markers shown in a Map View is 1000 records."
+ },
"footerInfo": "Rows per page",
"upload": "Select file to Upload",
"upload_sub": "or drag and drop file",
diff --git a/packages/nocodb/src/lib/migrations/v2/nc_025_map_view_column.ts b/packages/nocodb/src/lib/migrations/v2/nc_025_map_view_column.ts
index ec915de2ad..d1f22fce9a 100644
--- a/packages/nocodb/src/lib/migrations/v2/nc_025_map_view_column.ts
+++ b/packages/nocodb/src/lib/migrations/v2/nc_025_map_view_column.ts
@@ -5,9 +5,7 @@ const up = async (knex) => {
table.string('id', 20).primary().notNullable();
table.string('base_id', 20);
- // table.foreign('base_id').references(`${MetaTable.BASES}.id`);
table.string('project_id', 128);
- // table.foreign('project_id').references(`${MetaTable.PROJECT}.id`);
table.string('fk_view_id', 20);
table.foreign('fk_view_id').references(`${MetaTable.MAP_VIEW}.fk_view_id`);
@@ -16,7 +14,6 @@ const up = async (knex) => {
table.string('uuid');
- // todo: type
table.string('label');
table.string('help');
diff --git a/packages/nocodb/src/lib/models/View.ts b/packages/nocodb/src/lib/models/View.ts
index 871aa055e6..a409537c04 100644
--- a/packages/nocodb/src/lib/models/View.ts
+++ b/packages/nocodb/src/lib/models/View.ts
@@ -433,7 +433,7 @@ export default class View implements ViewType {
show = false;
}
}
- // TODO: Check whether/what we need to do here for properly integrate MapView
+
else if (view.type === ViewTypes.KANBAN && !copyFromView) {
const kanbanView = await KanbanView.get(view_id, ncMeta);
if (vCol.id === kanbanView?.fk_grp_col_id) {
@@ -452,6 +452,13 @@ export default class View implements ViewType {
show = false;
}
}
+
+ else if (view.type === ViewTypes.MAP && !copyFromView) {
+ const mapView = await MapView.get(view_id, ncMeta);
+ if (vCol.id === mapView?.fk_geo_data_col_id) {
+ show = true;
+ }
+ }
// if columns is list of virtual columns then get the parent column
const col = vCol.fk_column_id
]