Browse Source

refactor(gui-v2): corrections

Signed-off-by: Pranav C <pranavxc@gmail.com>
pull/2716/head
Pranav C 2 years ago
parent
commit
5caf05b2d0
  1. 7
      packages/nc-gui-v2/components/cell/Duration.vue
  2. 4
      packages/nc-gui-v2/components/index.ts
  3. 3
      packages/nc-gui-v2/composables/useViewCreate.ts

7
packages/nc-gui-v2/components/cell/Duration.vue

@ -3,15 +3,16 @@ import { computed, inject, ref } from '#imports'
import { ColumnInj } from '~/components'
import { convertDurationToSeconds, convertMS2Duration, durationOptions } from '~/utils/durationHelper'
interface Props {
modelValue: number | string
}
const { modelValue } = defineProps<Props>()
const emit = defineEmits(['update:modelValue'])
const column = inject(ColumnInj)
interface Props {
modelValue: number | string
}
const showWarningMessage = ref(false)
const durationInMS = ref(0)
const isEdited = ref(false)

4
packages/nc-gui-v2/components/index.ts

@ -1,10 +1,8 @@
import type { ColumnType, FormType, GalleryType, GridType, KanbanType, TableType } from 'nocodb-sdk'
import type { ColumnType, TableType, ViewType } from 'nocodb-sdk'
import type { InjectionKey, Ref } from 'vue'
import type { EventHook } from '@vueuse/core'
import type useViewData from '~/composables/useViewData'
export type ViewType = (GridType | GalleryType | FormType | KanbanType) & { id?: string }
export const ColumnInj: InjectionKey<ColumnType & { meta: any }> = Symbol('column-injection')
export const MetaInj: InjectionKey<Ref<TableType>> = Symbol('meta-injection')
export const TabMetaInj: InjectionKey<any> = Symbol('tab-meta-injection')

3
packages/nc-gui-v2/composables/useViewCreate.ts

@ -1,9 +1,8 @@
import type { TableType } from 'nocodb-sdk'
import type { TableType, ViewType } from 'nocodb-sdk'
import { ViewTypes } from 'nocodb-sdk'
import type { Ref } from 'vue'
import { useToast } from 'vue-toastification'
import { useNuxtApp } from '#app'
import type { ViewType } from '~/components'
import useMetas from '~/composables/useMetas'
export default (meta: Ref<TableType>, onViewCreate?: (viewMeta: any) => void) => {

Loading…
Cancel
Save