small fixes
This commit is contained in:
parent
2c5a65cbb2
commit
2abb5d5759
|
@ -5,7 +5,7 @@ import { store } from "builderStore"
|
||||||
import {
|
import {
|
||||||
tables as tablesStore,
|
tables as tablesStore,
|
||||||
queries as queriesStores,
|
queries as queriesStores,
|
||||||
} from "stores/backend/"
|
} from "stores/backend"
|
||||||
import { makePropSafe } from "@budibase/string-templates"
|
import { makePropSafe } from "@budibase/string-templates"
|
||||||
import { TableNames } from "../constants"
|
import { TableNames } from "../constants"
|
||||||
|
|
||||||
|
@ -252,7 +252,7 @@ export const getSchemaForDatasource = (datasource, isForm = false) => {
|
||||||
if (datasource) {
|
if (datasource) {
|
||||||
const { type } = datasource
|
const { type } = datasource
|
||||||
if (type === "query") {
|
if (type === "query") {
|
||||||
const queries = get(queriesStores).queries
|
const queries = get(queriesStores).list
|
||||||
table = queries.find(query => query._id === datasource._id)
|
table = queries.find(query => query._id === datasource._id)
|
||||||
} else {
|
} else {
|
||||||
const tables = get(tablesStore).list
|
const tables = get(tablesStore).list
|
||||||
|
|
|
@ -81,7 +81,7 @@
|
||||||
<Spacer extraLarge />
|
<Spacer extraLarge />
|
||||||
<div class="query-header">
|
<div class="query-header">
|
||||||
<Heading small>Queries</Heading>
|
<Heading small>Queries</Heading>
|
||||||
<Button secondary on:click={() => $goto('../new')}>Add Query</Button>
|
<Button secondary on:click={() => $goto('./new')}>Add Query</Button>
|
||||||
</div>
|
</div>
|
||||||
<Spacer extraLarge />
|
<Spacer extraLarge />
|
||||||
<div class="query-list">
|
<div class="query-list">
|
||||||
|
|
|
@ -4,12 +4,12 @@
|
||||||
import { onMount } from "svelte"
|
import { onMount } from "svelte"
|
||||||
|
|
||||||
onMount(async () => {
|
onMount(async () => {
|
||||||
// navigate to first table in list, if not already selected
|
// navigate to first datasource in list, if not already selected
|
||||||
$datasources.list.length > 0 && $goto(`../${$datasources.list[0]._id}`)
|
$datasources.list.length > 0 && $goto(`../${$datasources.list[0]._id}`)
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
{#if $tables.list.length === 0}
|
{#if $datasources.list.length === 0}
|
||||||
<i>Connect your first datasource to start building.</i>
|
<i>Connect your first datasource to start building.</i>
|
||||||
{:else}
|
{:else}
|
||||||
<i>Select a datasource to edit</i>
|
<i>Select a datasource to edit</i>
|
||||||
|
|
Loading…
Reference in New Issue