Browse Source

chore(nc-gui): lint

pull/5046/head
Wing-Kam Wong 2 years ago
parent
commit
b81f48309a
  1. 16
      packages/nc-gui/components/template/Editor.vue
  2. 19
      packages/nc-gui/composables/useKanbanViewStore.ts
  3. 16
      packages/nc-gui/composables/useViewData.ts

16
packages/nc-gui/components/template/Editor.vue

@ -501,16 +501,12 @@ async function importTemplate() {
} }
} }
} }
const createdTable = await $api.base.tableCreate( const createdTable = await $api.base.tableCreate(project.value?.id as string, (baseId || project.value?.bases?.[0].id)!, {
project.value?.id as string, table_name: table.table_name,
(baseId || project.value?.bases?.[0].id)!, // leave title empty to get a generated one based on table_name
{ title: '',
table_name: table.table_name, columns: table.columns || [],
// leave title empty to get a generated one based on table_name })
title: '',
columns: table.columns || [],
},
)
table.id = createdTable.id table.id = createdTable.id
table.title = createdTable.title table.title = createdTable.title

19
packages/nc-gui/composables/useKanbanViewStore.ts

@ -1,15 +1,5 @@
import type { ComputedRef, Ref } from 'vue' import type { ComputedRef, Ref } from 'vue'
import type { import type { Api, ColumnType, KanbanType, SelectOptionType, SelectOptionsType, TableType, ViewType } from 'nocodb-sdk'
Api,
AttachmentType,
ColumnType,
KanbanType,
SelectOptionType,
SelectOptionsType,
TableType,
ViewType,
} from 'nocodb-sdk'
import { UITypes } from 'nocodb-sdk'
import type { Row } from '~/lib' import type { Row } from '~/lib'
import { import {
IsPublicInj, IsPublicInj,
@ -25,7 +15,6 @@ import {
ref, ref,
useApi, useApi,
useFieldQuery, useFieldQuery,
useGlobal,
useI18n, useI18n,
useInjectionState, useInjectionState,
useNuxtApp, useNuxtApp,
@ -55,8 +44,6 @@ const [useProvideKanbanViewStore, useKanbanViewStore] = useInjectionState(
const { $e, $api } = useNuxtApp() const { $e, $api } = useNuxtApp()
const { appInfo } = useGlobal()
const { sorts, nestedFilters } = useSmartsheetStoreOrThrow() const { sorts, nestedFilters } = useSmartsheetStoreOrThrow()
const { sharedView, fetchSharedViewData, fetchSharedViewGroupedData } = useSharedView() const { sharedView, fetchSharedViewData, fetchSharedViewGroupedData } = useSharedView()
@ -91,10 +78,6 @@ const [useProvideKanbanViewStore, useKanbanViewStore] = useInjectionState(
return where return where
}) })
const attachmentColumns = computed(() =>
(meta.value?.columns as ColumnType[])?.filter((c) => c.uidt === UITypes.Attachment).map((c) => c.title),
)
provide(SharedViewPasswordInj, password) provide(SharedViewPasswordInj, password)
// kanban view meta data // kanban view meta data

16
packages/nc-gui/composables/useViewData.ts

@ -1,15 +1,5 @@
import { UITypes, ViewTypes } from 'nocodb-sdk' import { UITypes, ViewTypes } from 'nocodb-sdk'
import type { import type { Api, ColumnType, FormColumnType, FormType, GalleryType, PaginatedType, TableType, ViewType } from 'nocodb-sdk'
Api,
AttachmentType,
ColumnType,
FormColumnType,
FormType,
GalleryType,
PaginatedType,
TableType,
ViewType,
} from 'nocodb-sdk'
import type { ComputedRef, Ref } from 'vue' import type { ComputedRef, Ref } from 'vue'
import { import {
IsPublicInj, IsPublicInj,
@ -91,10 +81,6 @@ export function useViewData(
const { isUIAllowed } = useUIPermission() const { isUIAllowed } = useUIPermission()
const attachmentColumns = computed(() =>
(meta.value?.columns as ColumnType[])?.filter((c) => c.uidt === UITypes.Attachment).map((c) => c.title),
)
const routeQuery = $computed(() => route.query as Record<string, string>) const routeQuery = $computed(() => route.query as Record<string, string>)
const paginationData = computed({ const paginationData = computed({

Loading…
Cancel
Save