Browse Source

fix: kanban meta as object

pull/7727/head
mertmit 10 months ago
parent
commit
a24c7900dd
  1. 2
      packages/nc-gui/components/smartsheet/Kanban.vue
  2. 2
      packages/nc-gui/composables/useKanbanViewStore.ts
  3. 3
      packages/nocodb/src/models/KanbanView.ts

2
packages/nc-gui/components/smartsheet/Kanban.vue

@ -232,7 +232,7 @@ async function onMoveStack(event: any, undo = false) {
const { fk_grp_col_id, meta: stack_meta } = kanbanMetaData.value
groupingFieldColOptions.value[oldIndex].order = newIndex
groupingFieldColOptions.value[newIndex].order = oldIndex
const stackMetaObj = JSON.parse(stack_meta as string) || {}
const stackMetaObj = parseProp(stack_meta) || {}
stackMetaObj[fk_grp_col_id as string] = groupingFieldColOptions.value
await updateKanbanMeta({
meta: stackMetaObj,

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

@ -211,7 +211,7 @@ const [useProvideKanbanViewStore, useKanbanViewStore] = useInjectionState(
const { fk_grp_col_id, meta: stack_meta } = kanbanMetaData.value
stackMetaObj.value = stack_meta ? JSON.parse(stack_meta as string) : {}
stackMetaObj.value = parseProp(stack_meta) || {}
if (stackMetaObj.value && fk_grp_col_id && stackMetaObj.value[fk_grp_col_id]) {
// keep the existing order (index of the array) but update the values done outside kanban

3
packages/nocodb/src/models/KanbanView.ts

@ -40,6 +40,9 @@ export default class KanbanView implements KanbanType {
view = await ncMeta.metaGet2(null, null, MetaTable.KANBAN_VIEW, {
fk_view_id: viewId,
});
view = prepareForResponse(view);
await NocoCache.set(`${CacheScope.KANBAN_VIEW}:${viewId}`, view);
}

Loading…
Cancel
Save