diff --git a/src/routes/console/project-[project]/databases/database-[database]/collection-[collection]/attributes/relationship.svelte b/src/routes/console/project-[project]/databases/database-[database]/collection-[collection]/attributes/relationship.svelte index 51e93815c..f847e0ebd 100644 --- a/src/routes/console/project-[project]/databases/database-[database]/collection-[collection]/attributes/relationship.svelte +++ b/src/routes/console/project-[project]/databases/database-[database]/collection-[collection]/attributes/relationship.svelte @@ -44,7 +44,6 @@ import arrowTwo from './arrow-two.svg'; import { camelize } from '$lib/helpers/string'; import { SelectSearchItem } from '$lib/elements'; - import { isRelationshipToMany } from '../document-[document]/attributes/store'; // Props export let data: Models.AttributeRelationship; @@ -102,7 +101,6 @@ $: getCollections(search).then((res) => (collectionList = res)); $: collections = collectionList?.collections?.filter((n) => n.$id !== $collection.$id) ?? []; - $: isToMany = isRelationshipToMany(data); $: if (editing) { way = data.twoWay ? 'two' : 'one'; @@ -234,21 +232,26 @@ {data.key} -
-

- {camelize($collection.name)} can contain {data.relationType && - !['oneToOne', 'oneToMany'].includes(data.relationType) - ? 'many' - : 'one'} - {data.key} -

-

- {camelize($collection.name)} can belong to {isToMany - ? 'many' - : 'one'} - {data.key} -

-
+ {#if data.relationType} +
+

+ {camelize($collection.name)} can contain {[ + 'oneToOne', + 'manyToOne' + ].includes(data.relationType) + ? 'one' + : 'many'} + {camelize(data.key)} +

+

+ {camelize(data.key)} + can belong to {['oneToOne', 'oneToMany'].includes(data.relationType) + ? 'one' + : 'many'} + {camelize($collection.name)} +

+
+ {/if}