From e75e96891fd9c6edca4c474d0e915c88eb819441 Mon Sep 17 00:00:00 2001 From: mike12345567 Date: Mon, 1 Mar 2021 18:03:33 +0000 Subject: [PATCH] Formatting. --- .../DataTable/modals/CreateEditColumn.svelte | 35 +++++++++++++------ 1 file changed, 24 insertions(+), 11 deletions(-) diff --git a/packages/builder/src/components/backend/DataTable/modals/CreateEditColumn.svelte b/packages/builder/src/components/backend/DataTable/modals/CreateEditColumn.svelte index b4a9283352..ad1deaae2a 100644 --- a/packages/builder/src/components/backend/DataTable/modals/CreateEditColumn.svelte +++ b/packages/builder/src/components/backend/DataTable/modals/CreateEditColumn.svelte @@ -11,7 +11,11 @@ import { cloneDeep } from "lodash/fp" import { backendUiStore } from "builderStore" import { TableNames, UNEDITABLE_USER_FIELDS } from "constants" - import { FIELDS, AUTO_COLUMN_SUB_TYPES, RelationshipTypes } from "constants/backend" + import { + FIELDS, + AUTO_COLUMN_SUB_TYPES, + RelationshipTypes, + } from "constants/backend" import { getAutoColumnInformation, buildAutoColumn } from "builderStore/utils" import { notifier } from "builderStore/store/notifications" import ValuesList from "components/common/ValuesList.svelte" @@ -157,9 +161,18 @@ const thisName = truncate(table.name, { length: 20 }), linkName = truncate(linkTable.name, { length: 20 }) return [ - { name: `Many ${thisName} has many ${linkName}`, value: RelationshipTypes.MANY_TO_MANY }, - { name: `One ${thisName} has many ${linkName}`, value: RelationshipTypes.ONE_TO_MANY }, - { name: `Many ${thisName} has one ${linkName}`, value: RelationshipTypes.MANY_TO_ONE }, + { + name: `Many ${thisName} has many ${linkName}`, + value: RelationshipTypes.MANY_TO_MANY, + }, + { + name: `One ${thisName} has many ${linkName}`, + value: RelationshipTypes.ONE_TO_MANY, + }, + { + name: `Many ${thisName} has one ${linkName}`, + value: RelationshipTypes.MANY_TO_ONE, + }, ] } @@ -250,16 +263,16 @@
- {#each relationshipOptions as {value, name}} + {#each relationshipOptions as { value, name }} + disabled={originalName} + name="Relationship type" + {value} + bind:group={field.relationshipType}>
- + - +
{/each}