diff --git a/src/routes/(console)/project-[project]/databases/database-[database]/collection-[collection]/attributes/+page.svelte b/src/routes/(console)/project-[project]/databases/database-[database]/collection-[collection]/attributes/+page.svelte index 5a827c7fc5..3c3809a928 100644 --- a/src/routes/(console)/project-[project]/databases/database-[database]/collection-[collection]/attributes/+page.svelte +++ b/src/routes/(console)/project-[project]/databases/database-[database]/collection-[collection]/attributes/+page.svelte @@ -46,6 +46,13 @@ email = 'mail', enum = 'view-list' } + + const relationTypeMap = { + oneToOne: 'one-to-one', + oneToMany: 'one-to-many', + manyToOne: 'many-to-one', + manyToMany: 'many-to-many' + } @@ -121,15 +128,15 @@ {#if 'format' in attribute && attribute.format} {attribute.format} + {:else if isRelationship(attribute)} + {relationTypeMap[attribute.relationType]} + + with {attribute?.key} + {:else} {attribute.type} - {#if isRelationship(attribute)} - - with {attribute?.key} - - {/if} {/if} {attribute.array ? '[]' : ''}