From 56d83864ea2a834ba13793ea0b01da0c80c823de Mon Sep 17 00:00:00 2001 From: mike12345567 Date: Fri, 2 Jul 2021 14:35:05 +0100 Subject: [PATCH] Removing console logs and simplifying the relationship name. --- .../datasource/[selectedDatasource]/index.svelte | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/packages/builder/src/pages/builder/app/[application]/data/datasource/[selectedDatasource]/index.svelte b/packages/builder/src/pages/builder/app/[application]/data/datasource/[selectedDatasource]/index.svelte index 106a95f74c..756121b458 100644 --- a/packages/builder/src/pages/builder/app/[application]/data/datasource/[selectedDatasource]/index.svelte +++ b/packages/builder/src/pages/builder/app/[application]/data/datasource/[selectedDatasource]/index.svelte @@ -31,7 +31,6 @@ if (column.type !== "link") { continue } - console.log(`table - ${table.name} - ${column.name} - id: ${column._id} - ${column.main}`) // these relationships have an id to pair them to each other // one has a main for the from side const key = column.main ? "from" : "to" @@ -57,15 +56,12 @@ const fromTableName = getTableName(toCol.tableId) const toTableName = getTableName(fromCol.tableId) const throughTableName = getTableName(fromCol.through) - console.log(throughTableName) - let displayFrom = `${fromTableName} (${fromCol.name})` - let displayTo = `${toTableName} (${toCol.name})` let displayString if (throughTableName) { - displayString = `${displayFrom} through ${throughTableName} → ${displayTo}` + displayString = `${fromTableName} through ${throughTableName} → ${toTableName}` } else { - displayString = `${displayFrom} → ${displayTo}` + displayString = `${fromTableName} → ${toTableName}` } return displayString } @@ -219,13 +215,13 @@ on:click={() => openRelationshipModal(relationship.from, relationship.to)} > -

+

{buildRelationshipDisplayString( relationship.from, relationship.to )}

-

{relationship.from?.name} to {relationship.to?.name}

+

{relationship.from?.name} to {relationship.to?.name}

{/each}