From a76d50b9d809e1701f5590dce88e47d886556f5a Mon Sep 17 00:00:00 2001 From: braks <78412429+bcakmakoglu@users.noreply.github.com> Date: Wed, 12 Oct 2022 20:33:14 +0200 Subject: [PATCH] revert(nc-gui): kanban store changes --- .../nc-gui/composables/useKanbanViewStore.ts | 42 +++++++++++++------ 1 file changed, 29 insertions(+), 13 deletions(-) diff --git a/packages/nc-gui/composables/useKanbanViewStore.ts b/packages/nc-gui/composables/useKanbanViewStore.ts index 311e801d49..e75351e669 100644 --- a/packages/nc-gui/composables/useKanbanViewStore.ts +++ b/packages/nc-gui/composables/useKanbanViewStore.ts @@ -1,9 +1,27 @@ import type { ComputedRef, Ref } from 'vue' import type { Api, ColumnType, KanbanType, SelectOptionType, SelectOptionsType, TableType, ViewType } from 'nocodb-sdk' -import { useI18n } from 'vue-i18n' -import { message } from 'ant-design-vue' import type { Row } from '~/lib' -import { SharedViewPasswordInj, deepCompare, enumColor, extractPkFromRow, useInjectionState, useNuxtApp } from '#imports' +import { + IsPublicInj, + SharedViewPasswordInj, + deepCompare, + enumColor, + extractPkFromRow, + extractSdkResponseErrorMsg, + getHTMLEncodedText, + inject, + message, + provide, + ref, + useApi, + useI18n, + useInjectionState, + useNuxtApp, + useProject, + useSharedView, + useSmartsheetStoreOrThrow, + useUIPermission, +} from '#imports' type GroupingFieldColOptionsType = SelectOptionType & { collapsed: boolean } @@ -223,7 +241,7 @@ const [useProvideKanbanViewStore, useKanbanViewStore] = useInjectionState( groupingFieldColOptions.value = [ ...((groupingFieldColumn.value?.colOptions as SelectOptionsType & { collapsed: boolean })?.options ?? []), // enrich uncategorized stack - { id: 'uncategorized', title: null, order: 0, color: enumColor.light[2] }, + { id: 'uncategorized', title: null, order: 0, color: enumColor.light[2] } as any, ] // sort by initial order .sort((a, b) => a.order! - b.order!) @@ -302,15 +320,13 @@ const [useProvideKanbanViewStore, useKanbanViewStore] = useInjectionState( // } ) // audit - $api.utils - .auditRowUpdate(id, { - fk_model_id: meta.value?.id as string, - column_name: property, - row_id: id, - value: getHTMLEncodedText(toUpdate.row[property]), - prev_value: getHTMLEncodedText(toUpdate.oldRow[property]), - }) - .then(() => {}) + $api.utils.auditRowUpdate(id, { + fk_model_id: meta.value?.id as string, + column_name: property, + row_id: id, + value: getHTMLEncodedText(toUpdate.row[property]), + prev_value: getHTMLEncodedText(toUpdate.oldRow[property]), + }) /** update row data(to sync formula and other related columns) */ Object.assign(toUpdate.row, updatedRowData)