π₯ π₯ π₯ A Free & Self-hostable Airtable Alternative
TypeScript airtableairtable-alternativeautomatic-apihacktoberfestlow-codeno-codeno-code-databaseno-code-platformpostgresqlrest-apirestful-apispreadsheetsqliteswagger
fix: review changes
DarkPhoenix2704b5ad1830209b
diff --git a/packages/nc-gui/components/dashboard/TreeView/Table/Node.vue b/packages/nc-gui/components/dashboard/TreeView/Table/Node.vueindex 22fffc15aa..1cc198303a 100644--- a/packages/nc-gui/components/dashboard/TreeView/Table/Node.vue+++ b/packages/nc-gui/components/dashboard/TreeView/Table/Node.vue@@ -337,13 +337,6 @@ async function onPermissions(_table: SidebarTableNode) {isTablePermissionsDialogVisible.value = true}-// TODO: Should find a way to render the components without using the `nextTick` function-const refreshViews = async () => {- isExpanded.value = false- await nextTick()- isExpanded.value = true-}-/** Cancel renaming view */function onCancel() {if (!isEditing.value) return@@ -750,7 +743,7 @@ async function onRename() {:table-id="table.id":title="table.title"/>- <DashboardTreeViewViewsList v-if="isExpanded" :table-id="table.id" :base-id="base.id" @deleted="refreshViews" />+ <DashboardTreeViewViewsList v-if="isExpanded" :table-id="table.id" :base-id="base.id" /></div></template>diff --git a/packages/nc-gui/components/dashboard/TreeView/Views/List.vue b/packages/nc-gui/components/dashboard/TreeView/Views/List.vueindex 8228deac0c..7122a7f160 100644--- a/packages/nc-gui/components/dashboard/TreeView/Views/List.vue+++ b/packages/nc-gui/components/dashboard/TreeView/Views/List.vue@@ -42,8 +42,6 @@ const { t } = useI18n()const { viewsByTable, activeView, allRecentViews } = storeToRefs(useViewsStore())-const { navigateToTable } = useTablesStore()-const views = computed(() => viewsByTable.value.get(table.value.id!)?.filter((v) => !v.is_default) ?? [])const { api } = useApi()@@ -52,7 +50,7 @@ const { refreshCommandPalette } = useCommandPalette()const { addUndo, defineModelScope } = useUndoRedo()-const { navigateToView, loadViews, removeFromRecentViews } = useViewsStore()+const { navigateToView, loadViews } = useViewsStore()/** Selected view(s) for menu */const selected = ref<string[]>([])@@ -285,24 +283,6 @@ function openDeleteDialog(view: ViewType) {closeDialog()emits('deleted')-- removeFromRecentViews({- viewId: view.id,- tableId: view.fk_model_id,- baseId: base.value.id,- })- refreshCommandPalette()- if (activeView.value?.id === view.id) {- navigateToTable({- tableId: table.value.id!,- baseId: base.value.id!,- })- }-- await loadViews({- tableId: table.value.id!,- force: true,- })},})diff --git a/packages/nc-gui/components/dlg/SharedBaseDuplicate.vue b/packages/nc-gui/components/dlg/SharedBaseDuplicate.vueindex 139bbb1b8e..9c66c27aa7 100644--- a/packages/nc-gui/components/dlg/SharedBaseDuplicate.vue+++ b/packages/nc-gui/components/dlg/SharedBaseDuplicate.vue@@ -73,7 +73,7 @@ const _duplicate = async () => {if (data.status !== 'close') {if (data.status === JobStatus.COMPLETED) {console.log('job completed', jobData)- await ncNavigateTo({+ ncNavigateTo({...(isEeUI ? { workspaceId: jobData.fk_workspace_id } : {}),baseId: jobData.base_id,})diff --git a/packages/nc-gui/components/dlg/View/Delete.vue b/packages/nc-gui/components/dlg/View/Delete.vueindex 9afedb0e47..d469b9ad2a 100644--- a/packages/nc-gui/components/dlg/View/Delete.vue+++ b/packages/nc-gui/components/dlg/View/Delete.vue@@ -6,7 +6,6 @@ interface Props {interface Emits {(event: 'update:modelValue', data: boolean): void- (event: 'deleted'): void}const props = defineProps<Props>()diff --git a/packages/nc-gui/components/smartsheet/toolbar/OpenedViewAction.vue b/packages/nc-gui/components/smartsheet/toolbar/OpenedViewAction.vueindex 369e5b2f80..aff466fae7 100644--- a/packages/nc-gui/components/smartsheet/toolbar/OpenedViewAction.vue+++ b/packages/nc-gui/components/smartsheet/toolbar/OpenedViewAction.vue@@ -3,7 +3,7 @@ const { activeTable } = storeToRefs(useTablesStore())const { isMobileMode } = useGlobal()-const { isSharedBase, base } = storeToRefs(useBase())+const { isSharedBase } = storeToRefs(useBase())const { sharedView } = useSharedView()@@ -11,14 +11,10 @@ const { t } = useI18n()const { $e } = useNuxtApp()-const { refreshCommandPalette } = useCommandPalette()-const viewStore = useViewsStore()const { activeView, views } = storeToRefs(viewStore)-const { loadViews, removeFromRecentViews, updateView } = viewStore--const { navigateToTable } = useTablesStore()+const { updateView } = viewStoreconst isDropdownOpen = ref(false)@@ -129,23 +125,6 @@ function openDeleteDialog() {'modelValue': isOpen,'view': activeView.value,'onUpdate:modelValue': closeDialog,- 'onDeleted': async () => {- closeDialog()-- removeFromRecentViews({ viewId: activeView.value!.id, tableId: activeView.value!.fk_model_id, baseId: base.value.id })- refreshCommandPalette()- if (activeView.value?.id === activeView.value!.id) {- navigateToTable({- tableId: activeTable.value!.id!,- baseId: base.value.id!,- })- }-- await loadViews({- tableId: activeTable.value!.id!,- force: true,- })- },})function closeDialog() {diff --git a/packages/nc-gui/composables/useKanbanViewStore.ts b/packages/nc-gui/composables/useKanbanViewStore.tsindex e176e3c01e..e6dc2fb1d5 100644--- a/packages/nc-gui/composables/useKanbanViewStore.ts+++ b/packages/nc-gui/composables/useKanbanViewStore.ts@@ -818,6 +818,7 @@ const [useProvideKanbanViewStore, useKanbanViewStore] = useInjectionState((data: DataPayload) => {const { id, action, payload, before } = data+ // TODO: @mertmit handle filters and sort for newly added and updated recordsif (action === 'add') {try {const stackKey =diff --git a/packages/nc-gui/store/tables.ts b/packages/nc-gui/store/tables.tsindex 29dc67ed43..388f18a2b7 100644--- a/packages/nc-gui/store/tables.ts+++ b/packages/nc-gui/store/tables.ts@@ -110,7 +110,7 @@ export const useTablesStore = defineStore('tablesStore', () => {query = route.value.query}- await ncNavigateTo({+ ncNavigateTo({workspaceId: workspaceIdOrType,baseId: baseIdOrBaseId,tableId,diff --git a/packages/nc-gui/store/views.ts b/packages/nc-gui/store/views.tsindex e2061a5e68..8e0ecb3524 100644--- a/packages/nc-gui/store/views.ts+++ b/packages/nc-gui/store/views.ts@@ -446,7 +446,7 @@ export const useViewsStore = defineStore('viewsStore', () => {tableId: view.fk_model_id,})} else {- await ncNavigateTo({+ ncNavigateTo({workspaceId: activeWorkspaceId.value,baseId: view.base_id,})diff --git a/packages/nc-gui/store/workspace.ts b/packages/nc-gui/store/workspace.tsindex a1bc501c4d..f504027aa0 100644--- a/packages/nc-gui/store/workspace.ts+++ b/packages/nc-gui/store/workspace.ts@@ -209,7 +209,7 @@ export const useWorkspace = defineStore('workspaceStore', () => {throw new Error('Workspace not selected')}- await ncNavigateTo({+ ncNavigateTo({workspaceId,})}diff --git a/packages/nocodb/src/db/field-handler/handlers/long-text/long-text.general.handler.ts b/packages/nocodb/src/db/field-handler/handlers/long-text/long-text.general.handler.tsindex af643283aa..6d1af21c7f 100644--- a/packages/nocodb/src/db/field-handler/handlers/long-text/long-text.general.handler.ts+++ b/packages/nocodb/src/db/field-handler/handlers/long-text/long-text.general.handler.ts@@ -1,7 +1,7 @@import { NcError } from 'src/helpers/catchError';import { NC_MAX_TEXT_LENGTH } from 'src/constants';-import { isAIPromptCol, type NcContext, ncIsObject } from 'nocodb-sdk';-import type { AIRecordType } from 'nocodb-sdk';+import { isAIPromptCol, ncIsObject } from 'nocodb-sdk';+import type { AIRecordType, NcContext } from 'nocodb-sdk';import type { IBaseModelSqlV2 } from 'src/db/IBaseModelSqlV2';import type { MetaService } from 'src/meta/meta.service';import type { Column } from '~/models';diff --git a/packages/nocodb/src/schema/swagger.json b/packages/nocodb/src/schema/swagger.jsonindex 5d833daef5..a890a90bba 100644--- a/packages/nocodb/src/schema/swagger.json+++ b/packages/nocodb/src/schema/swagger.json@@ -7927,11 +7927,28 @@"content": {"application/json": {"schema": {- "type": "number"+ "$ref": "#/components/schemas/View"},"examples": {"Example 1": {- "value": 1+ "value": {+ "id": "vw_qp94qfnvffgk5f",+ "source_id": "ds_a95vextjl510z7",+ "base_id": "p_slkm6i3v31q4bc",+ "fk_model_id": "md_8hr3xndx8umuce",+ "title": "Gallery-1",+ "type": 2,+ "is_default": null,+ "show_system_fields": null,+ "lock_type": "collaborative",+ "uuid": null,+ "password": null,+ "show": true,+ "order": 3,+ "created_at": "2023-03-13T07:29:18.707Z",+ "updated_at": "2023-03-13T07:29:18.707Z",+ "meta": {}+ }}}}@@ -8146,11 +8163,28 @@"content": {"application/json": {"schema": {- "type": "number"+ "$ref": "#/components/schemas/View"},"examples": {"Example 1": {- "value": 1+ "value": {+ "id": "vw_qp94qfnvffgk5f",+ "source_id": "ds_a95vextjl510z7",+ "base_id": "p_slkm6i3v31q4bc",+ "fk_model_id": "md_8hr3xndx8umuce",+ "title": "Gallery-1",+ "type": 2,+ "is_default": null,+ "show_system_fields": null,+ "lock_type": "collaborative",+ "uuid": null,+ "password": null,+ "show": true,+ "order": 3,+ "created_at": "2023-03-13T07:29:18.707Z",+ "updated_at": "2023-03-13T07:29:18.707Z",+ "meta": {}+ }}}}@@ -8421,11 +8455,28 @@"content": {"application/json": {"schema": {- "type": "number"+ "$ref": "#/components/schemas/View"},"examples": {"Example 1": {- "value": 1+ "value": {+ "id": "vw_qp94qfnvffgk5f",+ "source_id": "ds_a95vextjl510z7",+ "base_id": "p_slkm6i3v31q4bc",+ "fk_model_id": "md_8hr3xndx8umuce",+ "title": "Gallery-1",+ "type": 2,+ "is_default": null,+ "show_system_fields": null,+ "lock_type": "collaborative",+ "uuid": null,+ "password": null,+ "show": true,+ "order": 3,+ "created_at": "2023-03-13T07:29:18.707Z",+ "updated_at": "2023-03-13T07:29:18.707Z",+ "meta": {}+ }}}}@@ -8598,11 +8649,28 @@"content": {"application/json": {"schema": {- "type": "number"+ "$ref": "#/components/schemas/View"},"examples": {"Example 1": {- "value": 1+ "value": {+ "id": "vw_qp94qfnvffgk5f",+ "source_id": "ds_a95vextjl510z7",+ "base_id": "p_slkm6i3v31q4bc",+ "fk_model_id": "md_8hr3xndx8umuce",+ "title": "Gallery-1",+ "type": 2,+ "is_default": null,+ "show_system_fields": null,+ "lock_type": "collaborative",+ "uuid": null,+ "password": null,+ "show": true,+ "order": 3,+ "created_at": "2023-03-13T07:29:18.707Z",+ "updated_at": "2023-03-13T07:29:18.707Z",+ "meta": {}+ }}}}