Browse Source

fix(nc-gui): isgeometry defined and linting issues

pull/6390/head
reenphygeorge 1 year ago
parent
commit
e8a5f63696
  1. 7
      packages/nc-gui/components/cell/Email.vue
  2. 2
      packages/nc-gui/components/dashboard/Sidebar.vue
  3. 2
      packages/nc-gui/components/smartsheet/column/AdvancedOptions.vue
  4. 2
      packages/nc-gui/components/smartsheet/column/SelectOptions.vue
  5. 7
      packages/nc-gui/components/smartsheet/header/CellIcon.ts
  6. 1
      packages/nc-gui/utils/cell.ts
  7. 1
      packages/nc-gui/utils/iconUtils.ts

7
packages/nc-gui/components/cell/Email.vue

@ -86,7 +86,12 @@ watch(
<span v-else-if="vModel === null && showNull" class="nc-null">NULL</span>
<nuxt-link v-else-if="validEmail" class="text-sm underline hover:opacity-75 inline-block" :href="`mailto:${vModel}`" target="_blank">
<nuxt-link
v-else-if="validEmail"
class="text-sm underline hover:opacity-75 inline-block"
:href="`mailto:${vModel}`"
target="_blank"
>
<LazyCellClampedText :value="vModel" :lines="rowHeight" />
</nuxt-link>

2
packages/nc-gui/components/dashboard/Sidebar.vue

@ -5,8 +5,6 @@ const { isWorkspaceLoading } = storeToRefs(workspaceStore)
const { isSharedBase } = storeToRefs(useProject())
const isCreateProjectOpen = ref(false)
const treeViewDom = ref<HTMLElement>()
const isTreeViewOnScrollTop = ref(false)

2
packages/nc-gui/components/smartsheet/column/AdvancedOptions.vue

@ -82,8 +82,8 @@ vModel.value.au = !!vModel.value.au */
<a-form-item v-if="!hideLength" :label="$t('labels.lengthValue')">
<a-input
class="!rounded-md"
v-model:value="vModel.dtxp"
class="!rounded-md"
:disabled="sqlUi.getDefaultLengthIsDisabled(vModel.dt) || !sqlUi.columnEditable(vModel)"
@input="onAlter"
/>

2
packages/nc-gui/components/smartsheet/column/SelectOptions.vue

@ -29,7 +29,7 @@ const emit = defineEmits(['update:value'])
const vModel = useVModel(props, 'value', emit)
const { formState, setAdditionalValidations, validateInfos, isPg, isMysql } = useColumnCreateStoreOrThrow()
const { formState, setAdditionalValidations, validateInfos, isMysql } = useColumnCreateStoreOrThrow()
const { project } = storeToRefs(useProject())

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

@ -1,4 +1,4 @@
import { UITypes, type ColumnType } from 'nocodb-sdk'
import { type ColumnType } from 'nocodb-sdk'
import type { PropType } from '@vue/runtime-core'
import {
ColumnInj,
@ -17,6 +17,7 @@ import {
isEmail,
isFloat,
isGeoData,
isGeometry,
isInt,
isJSON,
isPercent,
@ -79,10 +80,10 @@ const renderIcon = (column: ColumnType, abstractType: any) => {
return iconMap.duration
} else if (isPercent(column)) {
return iconMap.percent
} else if (isGeometry(column)) {
return iconMap.calculator
} else if (isInt(column, abstractType) || isFloat(column, abstractType)) {
return iconMap.number
} else if(column.uidt === UITypes.Geometry) {
return iconMap.calculator
} else if (isString(column, abstractType)) {
return iconMap.text
} else {

1
packages/nc-gui/utils/cell.ts

@ -31,6 +31,7 @@ export const isDuration = (column: ColumnType) => column.uidt === UITypes.Durati
export const isGeoData = (column: ColumnType) => column.uidt === UITypes.GeoData
export const isPercent = (column: ColumnType) => column.uidt === UITypes.Percent
export const isSpecificDBType = (column: ColumnType) => column.uidt === UITypes.SpecificDBType
export const isGeometry = (column: ColumnType) => column.uidt === UITypes.Geometry
export const isAutoSaved = (column: ColumnType) =>
[
UITypes.SingleLineText,

1
packages/nc-gui/utils/iconUtils.ts

@ -24,7 +24,6 @@ import MsGroup from '~icons/material-symbols/groups-outline-rounded'
import MsAddBoxOutline from '~icons/nc-icons/add-box'
import MsDownloadRounded from '~icons/nc-icons/download'
import LogosAirtable from '~icons/logos/airtable'
import MsStar from '~icons/material-symbols/star-outline-rounded'
import NcStar from '~icons/nc-icons/star'
import NcUnStar from '~icons/nc-icons/star-remove'
import MsSort from '~icons/material-symbols/sort'

Loading…
Cancel
Save