frontend bug fixes, remove bindable prop, add not equals filter

This commit is contained in:
Martin McKeaveney 2020-10-14 21:43:36 +01:00
parent 535c9febd5
commit 988789f1d4
7 changed files with 21 additions and 17 deletions

View File

@ -37,8 +37,6 @@
<Table title={decodeURI(name)} schema={view.schema} {data}>
<FilterButton {view} />
<CalculateButton {view} />
{#if view.calculation}
<GroupByButton {view} />
{/if}
<GroupByButton {view} />
<ExportButton {view} />
</Table>

View File

@ -65,18 +65,17 @@
<div class="actions">
<Input label="Name" thin bind:value={field.name} />
{#if !originalName}
<Select
secondary
thin
label="Type"
on:change={handleFieldConstraints}
bind:value={field.type}>
{#each Object.values(fieldDefinitions) as field}
<option value={field.type}>{field.name}</option>
{/each}
</Select>
{/if}
<Select
disabled={originalName}
secondary
thin
label="Type"
on:change={handleFieldConstraints}
bind:value={field.type}>
{#each Object.values(fieldDefinitions) as field}
<option value={field.type}>{field.name}</option>
{/each}
</Select>
{#if field.type !== 'link'}
<Toggle

View File

@ -9,6 +9,10 @@
name: "Equals",
key: "EQUALS",
},
{
name: "Not Equals",
key: "NOT_EQUALS",
},
{
name: "Less Than",
key: "LT",

View File

@ -13,6 +13,7 @@
import { onMount } from "svelte"
export let label = ""
export let bindable = true
export let componentInstance = {}
export let control = null
export let key = ""
@ -93,7 +94,7 @@
{...props}
name={key} />
</div>
{#if control === Input && !key.startsWith('_')}
{#if bindable && control === Input && !key.startsWith('_')}
<button data-cy={`${key}-binding-button`} on:click={dropdown.show}>
<Icon name="edit" />
</button>

View File

@ -88,6 +88,7 @@
{#if screenOrPageInstance}
{#each screenOrPageDefinition as def}
<PropertyControl
bindable={false}
control={def.control}
label={def.label}
key={def.key}

View File

@ -1,5 +1,6 @@
const TOKEN_MAP = {
EQUALS: "===",
NOT_EQUALS: "!==",
LT: "<",
LTE: "<=",
MT: ">",

View File

@ -40,7 +40,7 @@ module.exports = async (ctx, next) => {
ctx.user = {
// if appId can't be determined from path param or subdomain
appId: appId,
appId,
}
await next()
return