Merge branch 'linked-records' of github.com:Budibase/budibase into linked-records

This commit is contained in:
Michael Drury 2020-10-01 11:33:53 +01:00
commit 725e4e9944
3 changed files with 11 additions and 7 deletions

View File

@ -15,6 +15,7 @@
$: sortColumn = $backendUiStore.sort && $backendUiStore.sort.column
$: sortDirection = $backendUiStore.sort && $backendUiStore.sort.direction
$: type = field?.type
function showEditor() {
editing = true
@ -54,10 +55,12 @@
<CreateEditColumnModal onClosed={hideEditor} {field} />
{:else}
<ul>
<li data-cy="edit-column-header" on:click={showEditor}>
<Icon name="edit" />
Edit
</li>
{#if type !== 'link'}
<li data-cy="edit-column-header" on:click={showEditor}>
<Icon name="edit" />
Edit
</li>
{/if}
<li
data-cy="delete-column-header"
on:click={() => confirmDeleteDialog.show()}>

View File

@ -13,9 +13,10 @@
export let onClosed
let errors = []
$: model = record.modelId ? $backendUiStore.models.find(model => model._id === record?.modelId) : $backendUiStore.selectedModel
$: model = record.modelId
? $backendUiStore.models.find(model => model._id === record?.modelId)
: $backendUiStore.selectedModel
$: modelSchema = Object.entries(model?.schema ?? {})
$: console.log(modelSchema)
async function saveRecord() {
const recordResponse = await api.saveRecord(

View File

@ -46,7 +46,7 @@
<style>
.container {
padding: var(--spacing-xl);
padding: 30px;
display: grid;
grid-gap: var(--spacing-xl);
}