|
|
|
@ -17,53 +17,48 @@ |
|
|
|
{#each workflowParams as [parameter, type]} |
|
|
|
<div class="block-field"> |
|
|
|
<label class="label">{parameter}</label> |
|
|
|
{#if Array.isArray(type)} |
|
|
|
<select |
|
|
|
class="budibase_input" |
|
|
|
bind:value={workflowBlock.args[parameter]}> |
|
|
|
{#each type as option} |
|
|
|
<option value={option}>{option}</option> |
|
|
|
{/each} |
|
|
|
</select> |
|
|
|
{:else if type === 'component'} |
|
|
|
<ComponentSelector bind:value={workflowBlock.args[parameter]} /> |
|
|
|
{:else if type === 'accessLevel'} |
|
|
|
<select |
|
|
|
class="budibase_input" |
|
|
|
bind:value={workflowBlock.args[parameter]}> |
|
|
|
<option value="ADMIN">Admin</option> |
|
|
|
<option value="POWER_USER">Power User</option> |
|
|
|
</select> |
|
|
|
{:else if type === 'password'} |
|
|
|
<input |
|
|
|
type="password" |
|
|
|
class="budibase_input" |
|
|
|
bind:value={workflowBlock.args[parameter]} /> |
|
|
|
{:else if type === 'number'} |
|
|
|
<input |
|
|
|
type="number" |
|
|
|
class="budibase_input" |
|
|
|
bind:value={workflowBlock.args[parameter]} /> |
|
|
|
{:else if type === 'longText'} |
|
|
|
<textarea |
|
|
|
type="text" |
|
|
|
class="budibase_input" |
|
|
|
bind:value={workflowBlock.args[parameter]} /> |
|
|
|
{:else if type === 'model'} |
|
|
|
<ModelSelector bind:value={workflowBlock.args[parameter]} /> |
|
|
|
{:else if type === 'record'} |
|
|
|
<RecordSelector bind:value={workflowBlock.args[parameter]} /> |
|
|
|
{:else if type === 'string'} |
|
|
|
<input |
|
|
|
type="text" |
|
|
|
class="budibase_input" |
|
|
|
bind:value={workflowBlock.args[parameter]} /> |
|
|
|
{/if} |
|
|
|
</div> |
|
|
|
{#if Array.isArray(type)} |
|
|
|
<select class="budibase_input" bind:value={workflowBlock.args[parameter]}> |
|
|
|
{#each type as option} |
|
|
|
<option value={option}>{option}</option> |
|
|
|
{/each} |
|
|
|
</select> |
|
|
|
{:else if type === 'component'} |
|
|
|
<ComponentSelector bind:value={workflowBlock.args[parameter]} /> |
|
|
|
{:else if type === 'accessLevel'} |
|
|
|
<select class="budibase_input" bind:value={workflowBlock.args[parameter]}> |
|
|
|
<option value="ADMIN">Admin</option> |
|
|
|
<option value="POWER_USER">Power User</option> |
|
|
|
</select> |
|
|
|
{:else if type === 'password'} |
|
|
|
<input |
|
|
|
type="password" |
|
|
|
class="budibase_input" |
|
|
|
bind:value={workflowBlock.args[parameter]} /> |
|
|
|
{:else if type === 'number'} |
|
|
|
<input |
|
|
|
type="number" |
|
|
|
class="budibase_input" |
|
|
|
bind:value={workflowBlock.args[parameter]} /> |
|
|
|
{:else if type === 'longText'} |
|
|
|
<textarea |
|
|
|
type="text" |
|
|
|
class="budibase_input" |
|
|
|
bind:value={workflowBlock.args[parameter]} /> |
|
|
|
{:else if type === 'model'} |
|
|
|
<ModelSelector bind:value={workflowBlock.args[parameter]} /> |
|
|
|
{:else if type === 'record'} |
|
|
|
<RecordSelector bind:value={workflowBlock.args[parameter]} /> |
|
|
|
{:else if type === 'string'} |
|
|
|
<input |
|
|
|
type="text" |
|
|
|
class="budibase_input" |
|
|
|
bind:value={workflowBlock.args[parameter]} /> |
|
|
|
{/if} |
|
|
|
</div> |
|
|
|
{/each} |
|
|
|
|
|
|
|
<style> |
|
|
|
|
|
|
|
.block-field { |
|
|
|
display: grid; |
|
|
|
} |
|
|
|
|