Browse Source

geodata: fix linter issues

pull/4749/head
flisowna 2 years ago
parent
commit
6f932a3266
  1. 1
      packages/nc-gui/components/cell/GeoData.vue
  2. 9
      packages/nc-gui/components/smartsheet/expanded-form/index.vue
  3. 2
      packages/nc-gui/components/smartsheet/header/CellIcon.ts
  4. 10
      packages/nc-gui/components/smartsheet/sidebar/MenuBottom.vue
  5. 28
      packages/nocodb/src/lib/models/MapView.ts

1
packages/nc-gui/components/cell/GeoData.vue

@ -38,7 +38,6 @@ const handleFinish = () => {
}
const clear = () => {
isExpanded = false
formState.latitude = latitude

9
packages/nc-gui/components/smartsheet/expanded-form/index.vue

@ -23,6 +23,10 @@ import {
} from '#imports'
import type { Row } from '~/lib'
const props = defineProps<Props>()
const emits = defineEmits(['update:modelValue', 'cancel'])
export interface InitialGeoPositionData {
lat?: number
long?: number
@ -41,10 +45,6 @@ interface Props {
initialGeoPositionData?: InitialGeoPositionData
}
const props = defineProps<Props>()
const emits = defineEmits(['update:modelValue', 'cancel'])
const row = ref(props.row)
const state = toRef(props, 'state')
@ -157,7 +157,6 @@ export default {
<SmartsheetExpandedFormHeader :view="props.view" @cancel="onClose" />
<div class="!bg-gray-100 rounded flex-1">
<div class="flex h-full nc-form-wrapper items-stretch min-h-[max(70vh,100%)]">
<div class="flex-1 overflow-auto scrollbar-thin-dull nc-form-fields-container">
<div class="w-[500px] mx-auto">

2
packages/nc-gui/components/smartsheet/header/CellIcon.ts

@ -11,11 +11,11 @@ import {
isCurrency,
isDate,
isDateTime,
isGeoData,
isDecimal,
isDuration,
isEmail,
isFloat,
isGeoData,
isInt,
isJSON,
isPercent,

10
packages/nc-gui/components/smartsheet/sidebar/MenuBottom.vue

@ -1,19 +1,13 @@
<script lang="ts" setup>
import { ViewTypes } from 'nocodb-sdk'
import { IsGeodataActiveInj, ReadonlyInj, ref, useGlobal, useNuxtApp, useSmartsheetStoreOrThrow, viewIcons } from '#imports'
import { useNuxtApp, useSmartsheetStoreOrThrow, viewIcons } from '#imports'
const isGeodataActive = inject(IsGeodataActiveInj, ref(false))
const emits = defineEmits<Emits>()
interface Emits {
(event: 'openModal', data: { type: ViewTypes; title?: string }): void
}
const emits = defineEmits<Emits>()
const readOnly = inject(ReadonlyInj)
const { includeM2M } = useGlobal()
const { $e } = useNuxtApp()
const { isSqlView } = useSmartsheetStoreOrThrow()

28
packages/nocodb/src/lib/models/MapView.ts

@ -10,7 +10,7 @@ export default class MapView implements MapType {
project_id?: string;
base_id?: string;
fk_geo_data_col_id?: string;
meta?: string | object;
meta?: string | Record<string, unknown>;
// below fields are not in use at this moment
// keep them for time being
@ -41,9 +41,6 @@ export default class MapView implements MapType {
return view && new MapView(view);
}
public static async IsColumnBeingUsedInMapView(
columnId: string,
ncMeta = Noco.ncMeta
@ -59,8 +56,7 @@ export default class MapView implements MapType {
);
}
static async insert(view: Partial<MapView>, ncMeta = Noco.ncMeta) {
static async insert(view: Partial<MapView>, ncMeta = Noco.ncMeta) {
const insertObj = {
project_id: view.project_id,
base_id: view.base_id,
@ -75,13 +71,7 @@ export default class MapView implements MapType {
insertObj.base_id = viewRef.base_id;
}
await ncMeta.metaInsert2(
null,
null,
MetaTable.MAP_VIEW,
insertObj,
true
);
await ncMeta.metaInsert2(null, null, MetaTable.MAP_VIEW, insertObj, true);
return this.get(view.fk_view_id, ncMeta);
}
@ -107,14 +97,8 @@ export default class MapView implements MapType {
await NocoCache.set(key, o);
}
// update meta
return await ncMeta.metaUpdate(
null,
null,
MetaTable.MAP_VIEW,
updateObj,
{
fk_view_id: mapId,
}
);
return await ncMeta.metaUpdate(null, null, MetaTable.MAP_VIEW, updateObj, {
fk_view_id: mapId,
});
}
}

Loading…
Cancel
Save