Browse Source

geodata: remove unused code

pull/4749/head
Daniel Spaude 2 years ago
parent
commit
e81463301b
No known key found for this signature in database
GPG Key ID: 654A3D1FA4F35FFE
  1. 5
      packages/nc-gui/components/smartsheet/Cell.vue
  2. 7
      packages/nc-gui/components/smartsheet/Map.vue
  3. 18
      packages/nc-gui/components/smartsheet/expanded-form/index.vue

5
packages/nc-gui/components/smartsheet/Cell.vue

@ -1,7 +1,6 @@
<script setup lang="ts">
import type { ColumnType } from 'nocodb-sdk'
import { isSystemColumn } from 'nocodb-sdk'
import type { InitialGeoPositionData } from './expanded-form/index.vue'
import {
ActiveCellInj,
ColumnInj,
@ -56,10 +55,6 @@ interface Props {
rowIndex?: number
active?: boolean
virtual?: boolean
// TODO: check whether
// a) this is in general the right approach to pass in default values
// b) if yes: probably we want to make it generic (column type independent)
defaultGeoPosition?: InitialGeoPositionData
}
const props = defineProps<Props>()

7
packages/nc-gui/components/smartsheet/Map.vue

@ -196,12 +196,6 @@ watch(view, async (nextView) => {
}
})
const expandedFormDlgInitialGeoPositionData = computed(() => ({
lat: expandedFormClickedLatLongForNewRow.value?.[0],
long: expandedFormClickedLatLongForNewRow.value?.[1],
geoColId: geoDataFieldColumn.value?.id,
}))
const count = computed(() => paginationData.value.totalRows)
</script>
@ -231,7 +225,6 @@ const count = computed(() => paginationData.value.totalRows)
:state="expandedFormRowState"
:meta="meta"
:view="view"
:initial-geo-position-data="expandedFormDlgInitialGeoPositionData"
/>
</Suspense>

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

@ -23,11 +23,9 @@ import {
} from '#imports'
import type { Row } from '~/lib'
export interface InitialGeoPositionData {
lat?: number
long?: number
geoColId?: string
}
const props = defineProps<Props>()
const emits = defineEmits(['update:modelValue', 'cancel'])
interface Props {
modelValue?: boolean
@ -38,22 +36,14 @@ interface Props {
useMetaFields?: boolean
rowId?: string
view?: ViewType
initialGeoPositionData?: InitialGeoPositionData
}
const props = defineProps<Props>()
const emits = defineEmits(['update:modelValue', 'cancel'])
const row = ref(props.row)
const state = toRef(props, 'state')
const meta = toRef(props, 'meta')
// const initialGeoPositionData = toRef(props, 'initialGeoPositionData')
const initialGeoPositionData = ref(props.initialGeoPositionData)
const router = useRouter()
const fields = computedInject(FieldsInj, (_fields) => {
@ -157,7 +147,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">
@ -185,7 +174,6 @@ export default {
:column="col"
:edit-enabled="true"
:active="true"
:default-geo-position="initialGeoPositionData"
@update:model-value="changedColumns.add(col.title)"
/>
</div>

Loading…
Cancel
Save