users and relationships

This commit is contained in:
Gerard Burns 2024-04-15 07:27:10 +01:00
parent 12d2982c67
commit 585b4e07ad
1 changed files with 22 additions and 0 deletions

View File

@ -1,6 +1,10 @@
<script>
import { tables } from "stores/builder"
import { BindingValue, Block, Subject, JSONValue, Property, Section } from './components'
$: {
console.log($tables)
}
export let schema
export let columnName
</script>
@ -77,6 +81,24 @@
name="Formula type"
value={schema?.formulaType === "dynamic" ? "Dynamic" : "Static"}
/>
{:else if schema.type === "link"}
<Property
name="Type"
value={schema?.relationshipType}
/>
<Property
name="Related Table"
value={$tables?.list?.find(table => table._id === schema?.tableId)?.name}
/>
<Property
name="Column in Related Table"
value={schema?.fieldName}
/>
{:else if schema.type === "bb_reference"}
<Property
name="Allow multiple users"
value={schema?.relationshipType === "many-to-many" ? "Yes" : "No"}
/>
{/if}
<Property
name="Required"