From b08a03ca0c89aab48222611536a4ef2bd4631528 Mon Sep 17 00:00:00 2001 From: Pranav C <61551451+pranavxc@users.noreply.github.com> Date: Sun, 4 Jul 2021 19:08:44 +0530 Subject: [PATCH] feat: M2M Signed-off-by: Pranav C <61551451+pranavxc@users.noreply.github.com> --- .../spreadsheet/components/editColumn.vue | 3 +- .../editColumn/linkedToAnotherOptions.vue | 3 +- .../spreadsheet/components/expandedForm.vue | 13 +- .../components/virtualCell/belogsToCell.vue | 18 +- .../virtualCell/components/item-chip.vue | 21 +- .../virtualCell/components/listChildItems.vue | 65 +++-- .../virtualCell/components/listItems.vue | 2 +- .../components/virtualCell/hasManyCell.vue | 21 +- .../components/virtualCell/manyToManyCell.vue | 21 +- .../components/virtualHeaderCell.vue | 4 +- .../project/spreadsheet/views/xcGridView.vue | 23 +- packages/nc-gui/config/vuetify.options.js | 2 +- packages/nc-gui/plugins/globalMixin.js | 4 +- .../lib/dataMapper/lib/sql/BaseModelSql.ts | 2 +- .../migrator/SqlMigrator/lib/KnexMigrator.ts | 3 +- .../nocodb/src/lib/noco/NcProjectBuilder.ts | 2 +- .../nocodb/src/lib/noco/meta/NcMetaIOImpl.ts | 5 +- .../nocodb/src/lib/noco/meta/NcMetaMgr.ts | 227 +++++++++--------- .../src/lib/noco/rest/RestApiBuilder.ts | 2 +- packages/nocodb/src/lib/sqlMgr/SqlMgr.ts | 2 +- 20 files changed, 281 insertions(+), 162 deletions(-) diff --git a/packages/nc-gui/components/project/spreadsheet/components/editColumn.vue b/packages/nc-gui/components/project/spreadsheet/components/editColumn.vue index b474ce7d8f..3954e52e19 100644 --- a/packages/nc-gui/components/project/spreadsheet/components/editColumn.vue +++ b/packages/nc-gui/components/project/spreadsheet/components/editColumn.vue @@ -19,7 +19,7 @@ @input="newColumn.altered = newColumn.altered || 8" :rules="[ v => !!v || 'Required', - v => !meta || !meta.columns || !column || meta.columns.every(c => column && c.cn === column.cn || v !== c.cn ) && meta.v.every(c => v !== c._cn ) || 'Duplicate column name' + v => !meta || !meta.columns || meta.columns.every(c => column && c.cn === column.cn || v !== c.cn ) && meta.v.every(c => v !== c._cn ) || 'Duplicate column name' ]" class="caption" label="Column name" @@ -94,6 +94,7 @@ :nodes="nodes" :meta="meta" :isSQLite="isSQLite" + :alias="newColumn.cn" @onColumnSelect="onRelColumnSelect" > diff --git a/packages/nc-gui/components/project/spreadsheet/components/editColumn/linkedToAnotherOptions.vue b/packages/nc-gui/components/project/spreadsheet/components/editColumn/linkedToAnotherOptions.vue index bc8924d849..d1e25ea649 100644 --- a/packages/nc-gui/components/project/spreadsheet/components/editColumn/linkedToAnotherOptions.vue +++ b/packages/nc-gui/components/project/spreadsheet/components/editColumn/linkedToAnotherOptions.vue @@ -103,7 +103,7 @@ - diff --git a/packages/nc-gui/components/project/spreadsheet/components/virtualCell/components/listChildItems.vue b/packages/nc-gui/components/project/spreadsheet/components/virtualCell/components/listChildItems.vue index 81e27e1aba..5ac0d22cc7 100644 --- a/packages/nc-gui/components/project/spreadsheet/components/virtualCell/components/listChildItems.vue +++ b/packages/nc-gui/components/project/spreadsheet/components/virtualCell/components/listChildItems.vue @@ -1,22 +1,44 @@