show all query types in form component
This commit is contained in:
parent
03512da423
commit
d0b7cf71e3
|
@ -20,6 +20,7 @@
|
|||
|
||||
export let value = {}
|
||||
export let otherSources
|
||||
export let showAllQueries
|
||||
|
||||
$: tables = $backendUiStore.tables.map(m => ({
|
||||
label: m.name,
|
||||
|
@ -36,8 +37,8 @@
|
|||
return [...acc, ...viewsArr]
|
||||
}, [])
|
||||
$: queries = $backendUiStore.queries
|
||||
.filter(query => query.queryVerb === "read" || query.readable)
|
||||
.map(query => ({
|
||||
.filter(query => showAllQueries || (query.queryVerb === "read" || query.readable))
|
||||
.map(query => ({
|
||||
label: query.name,
|
||||
name: query.name,
|
||||
tableId: query._id,
|
||||
|
|
|
@ -4,4 +4,4 @@
|
|||
const otherSources = [{ name: "Custom", label: "Custom" }]
|
||||
</script>
|
||||
|
||||
<DatasourceSelect on:change {...$$props} {otherSources} />
|
||||
<DatasourceSelect on:change {...$$props} showAllQueries={true} {otherSources} />
|
||||
|
|
|
@ -66,8 +66,8 @@
|
|||
"non-existing-app-name",
|
||||
"App with same name already exists. Please try another app name.",
|
||||
value =>
|
||||
!existingAppNames.some(appName =>
|
||||
new RegExp(appName, "ig").test(value)
|
||||
!existingAppNames.some(
|
||||
appName => appName.toLowerCase() === value.toLowerCase()
|
||||
)
|
||||
)
|
||||
|
||||
|
|
Loading…
Reference in New Issue