Merge branch 'master' into feature/postgresql-multiple-schema

This commit is contained in:
Michael Drury 2024-01-08 13:14:50 +00:00 committed by GitHub
commit 4f3ab52ae3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 30 additions and 16 deletions

@ -1 +1 @@
Subproject commit b11e6b47370d9b77c63648b45929c86bfed6360c Subproject commit 8ee2734e77709438cbcaaabc024f677c7b24c883

View File

@ -172,11 +172,8 @@ export default function (
tracer.setUser({ tracer.setUser({
id: user?._id, id: user?._id,
tenantId: user?.tenantId, tenantId: user?.tenantId,
admin: user?.admin,
builder: user?.builder,
budibaseAccess: user?.budibaseAccess, budibaseAccess: user?.budibaseAccess,
status: user?.status, status: user?.status,
roles: user?.roles,
}) })
} }

View File

@ -14,6 +14,7 @@
const { fetchDatasourceSchema } = getContext("sdk") const { fetchDatasourceSchema } = getContext("sdk")
const component = getContext("component") const component = getContext("component")
const context = getContext("context")
// Set current step context to force child form to use it // Set current step context to force child form to use it
const currentStep = writable(1) const currentStep = writable(1)
@ -157,18 +158,23 @@
<BlockComponent type="heading" props={{ text: step.title }} /> <BlockComponent type="heading" props={{ text: step.title }} />
</BlockComponent> </BlockComponent>
<BlockComponent type="text" props={{ text: step.desc }} order={1} /> <BlockComponent type="text" props={{ text: step.desc }} order={1} />
<BlockComponent type="fieldgroup" order={2}> <BlockComponent type="container" order={2}>
{#each step.fields as field, fieldIdx (`${field.field || field.name}_${stepIdx}_${fieldIdx}`)} <div
{#if getComponentForField(field)} class="form-block fields"
<BlockComponent class:mobile={$context.device.mobile}
type={getComponentForField(field)} >
props={getPropsForField(field)} {#each step.fields as field, fieldIdx (`${field.field || field.name}_${stepIdx}_${fieldIdx}`)}
order={fieldIdx} {#if getComponentForField(field)}
interactive <BlockComponent
name={field.field} type={getComponentForField(field)}
/> props={getPropsForField(field)}
{/if} order={fieldIdx}
{/each} interactive
name={field.field}
/>
{/if}
{/each}
</div>
</BlockComponent> </BlockComponent>
<BlockComponent <BlockComponent
type="buttongroup" type="buttongroup"
@ -185,3 +191,14 @@
{/each} {/each}
</BlockComponent> </BlockComponent>
</FormBlockWrapper> </FormBlockWrapper>
<style>
.fields {
display: grid;
grid-template-columns: repeat(6, 1fr);
gap: 8px 16px;
}
.fields.mobile :global(.spectrum-Form-item) {
grid-column: span 6 !important;
}
</style>