Browse Source

chore(gui-v2): fix import paths

pull/2877/head
braks 2 years ago
parent
commit
1b9ac87af9
  1. 2
      packages/nc-gui-v2/components/smartsheet-column/AdvancedOptions.vue
  2. 4
      packages/nc-gui-v2/components/smartsheet-column/EditOrAdd.vue
  3. 4
      packages/nc-gui-v2/components/smartsheet-header/Cell.vue
  4. 10
      packages/nc-gui-v2/components/smartsheet/Grid.vue
  5. 4
      packages/nc-gui-v2/composables/useColumnCreateStore.ts

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

@ -1,5 +1,5 @@
<script setup lang="ts">
import { useColumnCreateStoreOrThrow } from '~/composables/useColumnCreateStore'
import { useColumnCreateStoreOrThrow } from '#imports'
const { formState, validateInfos, setAdditionalValidations, sqlUi, onDataTypeChange, onAlter } = useColumnCreateStoreOrThrow()

4
packages/nc-gui-v2/components/smartsheet-column/EditOrAdd.vue

@ -1,7 +1,5 @@
<script lang="ts" setup>
import { computed, inject, watchEffect } from '#imports'
import { useColumnCreateStoreOrThrow } from '~/composables/useColumnCreateStore'
import useMetas from '~/composables/useMetas'
import { computed, inject, useColumnCreateStoreOrThrow, useMetas, watchEffect } from '#imports'
import { MetaInj } from '~/context'
import { uiTypes } from '~/utils/columnUtils'
import MdiPlusIcon from '~icons/mdi/plus-circle-outline'

4
packages/nc-gui-v2/components/smartsheet-header/Cell.vue

@ -2,8 +2,8 @@
import type { ColumnType, TableType } from 'nocodb-sdk'
import type { Ref } from 'vue'
import { inject } from 'vue'
import { ColumnInj, MetaInj } from '../../context'
import { useProvideColumnCreateStore } from '~/composables/useColumnCreateStore'
import { ColumnInj, MetaInj } from '~/context'
import { useProvideColumnCreateStore } from '#imports'
const { column } = defineProps<{ column: ColumnType & { meta: any } }>()
provide(ColumnInj, column)

10
packages/nc-gui-v2/components/smartsheet/Grid.vue

@ -1,6 +1,14 @@
<script lang="ts" setup>
import { isVirtualCol } from 'nocodb-sdk'
import { inject, onKeyStroke, onMounted, provide, useGridViewColumnWidth, useViewData, useProvideColumnCreateStore } from '#imports'
import {
inject,
onKeyStroke,
onMounted,
provide,
useGridViewColumnWidth,
useProvideColumnCreateStore,
useViewData,
} from '#imports'
import {
ActiveViewInj,
ChangePageInj,

4
packages/nc-gui-v2/composables/useColumnCreateStore.ts

@ -4,9 +4,9 @@ import type { ColumnType, TableType } from 'nocodb-sdk'
import { UITypes } from 'nocodb-sdk'
import type { Ref } from 'vue'
import { useToast } from 'vue-toastification'
import { useColumn } from './useColumn'
import { computed } from '#imports'
import { useNuxtApp } from '#app'
import useColumn from '~/composables/useColumn'
import { extractSdkResponseErrorMsg } from '~/utils/errorUtils'
const useForm = Form.useForm
@ -193,7 +193,7 @@ const [useProvideColumnCreateStore, useColumnCreateStore] = createInjectionState
toast.success('Column created')
}
onSuccess()
} catch (e) {
} catch (e: any) {
toast.error(await extractSdkResponseErrorMsg(e))
}
}

Loading…
Cancel
Save