Use fancycheckboxgroup
This commit is contained in:
parent
bb901d94d2
commit
dd58aaf5cb
|
@ -5,6 +5,7 @@
|
||||||
Layout,
|
Layout,
|
||||||
Link,
|
Link,
|
||||||
notifications,
|
notifications,
|
||||||
|
FancyCheckboxGroup,
|
||||||
} from "@budibase/bbui"
|
} from "@budibase/bbui"
|
||||||
import { IntegrationNames, IntegrationTypes } from "constants/backend"
|
import { IntegrationNames, IntegrationTypes } from "constants/backend"
|
||||||
import GoogleButton from "../_components/GoogleButton.svelte"
|
import GoogleButton from "../_components/GoogleButton.svelte"
|
||||||
|
@ -17,7 +18,6 @@
|
||||||
import cloneDeep from "lodash/cloneDeepWith"
|
import cloneDeep from "lodash/cloneDeepWith"
|
||||||
import IntegrationConfigForm from "../TableIntegrationMenu/IntegrationConfigForm.svelte"
|
import IntegrationConfigForm from "../TableIntegrationMenu/IntegrationConfigForm.svelte"
|
||||||
import { goto } from "@roxi/routify"
|
import { goto } from "@roxi/routify"
|
||||||
import { API } from "api"
|
|
||||||
|
|
||||||
import { saveDatasource } from "builderStore/datasource"
|
import { saveDatasource } from "builderStore/datasource"
|
||||||
import { DatasourceFeature } from "@budibase/types"
|
import { DatasourceFeature } from "@budibase/types"
|
||||||
|
@ -48,10 +48,13 @@
|
||||||
let isValid = false
|
let isValid = false
|
||||||
|
|
||||||
let allSheets
|
let allSheets
|
||||||
|
let selectedSheets
|
||||||
|
|
||||||
const saveDatasourceAndRedirect = async () => {
|
const saveDatasourceAndRedirect = async () => {
|
||||||
try {
|
try {
|
||||||
const resp = await saveDatasource(datasource)
|
const resp = await saveDatasource(datasource, {
|
||||||
|
tablesFilter: selectedSheets,
|
||||||
|
})
|
||||||
$goto(`./datasource/${resp._id}`)
|
$goto(`./datasource/${resp._id}`)
|
||||||
notifications.success(`Datasource created successfully.`)
|
notifications.success(`Datasource created successfully.`)
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
|
@ -150,9 +153,7 @@
|
||||||
<Layout noPadding no>
|
<Layout noPadding no>
|
||||||
<Body size="S">Select which spreadsheets you want to connect.</Body>
|
<Body size="S">Select which spreadsheets you want to connect.</Body>
|
||||||
|
|
||||||
{#each allSheets as sheet}
|
<FancyCheckboxGroup options={allSheets} bind:selected={selectedSheets} />
|
||||||
{sheet}
|
|
||||||
{/each}
|
|
||||||
</Layout>
|
</Layout>
|
||||||
{/if}
|
{/if}
|
||||||
</ModalContent>
|
</ModalContent>
|
||||||
|
|
|
@ -274,10 +274,6 @@ class GoogleSheetsIntegration implements DatasourcePlus {
|
||||||
}
|
}
|
||||||
|
|
||||||
async buildSchema(datasourceId: string, entities: Record<string, Table>) {
|
async buildSchema(datasourceId: string, entities: Record<string, Table>) {
|
||||||
// not fully configured yet
|
|
||||||
if (!this.config.auth) {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
await this.connect()
|
await this.connect()
|
||||||
const sheets = this.client.sheetsByIndex
|
const sheets = this.client.sheetsByIndex
|
||||||
const tables: Record<string, Table> = {}
|
const tables: Record<string, Table> = {}
|
||||||
|
|
Loading…
Reference in New Issue