Browse Source

fix(gui-v2): metadata use table_name when needed

Re #3143

Signed-off-by: mertmit <mertmit99@gmail.com>
pull/3254/head
mertmit 2 years ago
parent
commit
c819a6f4ac
  1. 8
      packages/nc-gui-v2/components/dashboard/settings/Metadata.vue

8
packages/nc-gui-v2/components/dashboard/settings/Metadata.vue

@ -6,7 +6,7 @@ import MdiDatabaseSync from '~icons/mdi/database-sync'
import { extractSdkResponseErrorMsg } from '~/utils' import { extractSdkResponseErrorMsg } from '~/utils'
const { $api } = useNuxtApp() const { $api } = useNuxtApp()
const { project } = useProject() const { project, loadTables } = useProject()
let isLoading = $ref(false) let isLoading = $ref(false)
let isDifferent = $ref(false) let isDifferent = $ref(false)
@ -39,6 +39,7 @@ async function syncMetaDiff() {
isLoading = true isLoading = true
await $api.project.metaDiffSync(project.value.id) await $api.project.metaDiffSync(project.value.id)
message.info('Table metadata recreated successfully') message.info('Table metadata recreated successfully')
await loadTables()
await loadMetaDiff() await loadMetaDiff()
} catch (e: any) { } catch (e: any) {
message.error(await extractSdkResponseErrorMsg(e)) message.error(await extractSdkResponseErrorMsg(e))
@ -58,8 +59,9 @@ const tableHeaderRenderer = (label: string) => () => h('div', { class: 'text-gra
const columns = [ const columns = [
{ {
title: tableHeaderRenderer('Models'), title: tableHeaderRenderer('Models'),
dataIndex: 'title', key: 'table_name',
key: 'title', customRender: ({ record }: { record: { table_name: string; title?: string } }) =>
h('div', {}, record.title || record.table_name),
}, },
{ {
title: tableHeaderRenderer('Sync State'), title: tableHeaderRenderer('Sync State'),

Loading…
Cancel
Save