diff --git a/packages/nc-gui/components/dashboard/settings/Erd.vue b/packages/nc-gui/components/dashboard/settings/Erd.vue index 4b7b88156e..ac720f498b 100644 --- a/packages/nc-gui/components/dashboard/settings/Erd.vue +++ b/packages/nc-gui/components/dashboard/settings/Erd.vue @@ -1,29 +1,29 @@ - - - + + + + @@ -136,5 +165,15 @@ onMounted(async () => { + + + + Show PK and FK + + + + Show views + + diff --git a/packages/nc-gui/components/dashboard/settings/erd/RelationEdge.vue b/packages/nc-gui/components/dashboard/settings/erd/RelationEdge.vue index d4ae481581..b8baa47910 100644 --- a/packages/nc-gui/components/dashboard/settings/erd/RelationEdge.vue +++ b/packages/nc-gui/components/dashboard/settings/erd/RelationEdge.vue @@ -1,5 +1,5 @@ - - - + + + + + + diff --git a/packages/nc-gui/components/dashboard/settings/erd/TableNode.vue b/packages/nc-gui/components/dashboard/settings/erd/TableNode.vue index a75e68861f..e888123307 100644 --- a/packages/nc-gui/components/dashboard/settings/erd/TableNode.vue +++ b/packages/nc-gui/components/dashboard/settings/erd/TableNode.vue @@ -9,12 +9,14 @@ const props = defineProps({ }, }) -const { data: table } = props -const columns = table.columns -// console.log(table) +const { data } = toRefs(props) -const pkColumn = computed(() => { - return columns.find((col) => col.pk) +provide(MetaInj, data) + +const columns = data.value.columns + +const pkAndFkColumns = computed(() => { + return columns.filter(() => data.value.showPkAndFk).filter((col) => col.pk || col.uidt === UITypes.ForeignKey) }) const nonPkColumns = computed(() => { @@ -25,23 +27,19 @@ const nonPkColumns = computed(() => { - {{ table.title }} + {{ data.title }} - - - + + + + + - + - - + + @@ -52,3 +50,9 @@ const nonPkColumns = computed(() => { + +