Browse Source

refactor(nc-gui): rename stack_meta to meta

pull/3818/head
Wing-Kam Wong 2 years ago
parent
commit
47b2436eca
  1. 4
      packages/nc-gui/components/smartsheet/Kanban.vue
  2. 4
      packages/nc-gui/composables/useKanbanViewData.ts

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

@ -108,13 +108,13 @@ function onMoveCallback(event: any) {
async function onMoveStack(event: any) { async function onMoveStack(event: any) {
if (event.moved) { if (event.moved) {
const { oldIndex, newIndex } = event.moved const { oldIndex, newIndex } = event.moved
const { grp_column_id, stack_meta } = kanbanMetaData.value const { grp_column_id, meta: stack_meta } = kanbanMetaData.value
groupingFieldColOptions.value[oldIndex].order = newIndex groupingFieldColOptions.value[oldIndex].order = newIndex
groupingFieldColOptions.value[newIndex].order = oldIndex groupingFieldColOptions.value[newIndex].order = oldIndex
const stackMetaObj = JSON.parse(stack_meta as string) || {} const stackMetaObj = JSON.parse(stack_meta as string) || {}
stackMetaObj[grp_column_id as string] = groupingFieldColOptions.value stackMetaObj[grp_column_id as string] = groupingFieldColOptions.value
await updateKanbanMeta({ await updateKanbanMeta({
stack_meta: stackMetaObj, meta: stackMetaObj,
}) })
} }
} }

4
packages/nc-gui/composables/useKanbanViewData.ts

@ -113,7 +113,7 @@ export function useKanbanViewData(
groupingField.value = groupingFieldColumn.value.title! groupingField.value = groupingFieldColumn.value.title!
const { grp_column_id, stack_meta } = kanbanMetaData.value const { grp_column_id, meta: stack_meta } = kanbanMetaData.value
stackMetaObj.value = stack_meta ? JSON.parse(stack_meta as string) : {} stackMetaObj.value = stack_meta ? JSON.parse(stack_meta as string) : {}
@ -184,7 +184,7 @@ export function useKanbanViewData(
if (grp_column_id) { if (grp_column_id) {
stackMetaObj.value[grp_column_id] = groupingFieldColOptions.value stackMetaObj.value[grp_column_id] = groupingFieldColOptions.value
await updateKanbanMeta({ await updateKanbanMeta({
stack_meta: stackMetaObj.value, meta: stackMetaObj.value,
}) })
} }
} }

Loading…
Cancel
Save