diff --git a/packages/builder/src/components/backend/DatasourceNavigator/TableIntegrationMenu/CreateExternalTableModal.svelte b/packages/builder/src/components/backend/DatasourceNavigator/TableIntegrationMenu/CreateExternalTableModal.svelte index 45269a365c..664b5629d4 100644 --- a/packages/builder/src/components/backend/DatasourceNavigator/TableIntegrationMenu/CreateExternalTableModal.svelte +++ b/packages/builder/src/components/backend/DatasourceNavigator/TableIntegrationMenu/CreateExternalTableModal.svelte @@ -35,7 +35,9 @@ await datasources.fetch() $goto(`../../table/${table._id}`) } catch (error) { - notifications.error("Error saving table") + notifications.error( + `Error saving table - ${error?.message || "unknown error"}` + ) } } diff --git a/packages/builder/src/components/backend/DatasourceNavigator/modals/GoogleDatasourceConfigModal.svelte b/packages/builder/src/components/backend/DatasourceNavigator/modals/GoogleDatasourceConfigModal.svelte index 8e03a6e1d1..c12ddab78d 100644 --- a/packages/builder/src/components/backend/DatasourceNavigator/modals/GoogleDatasourceConfigModal.svelte +++ b/packages/builder/src/components/backend/DatasourceNavigator/modals/GoogleDatasourceConfigModal.svelte @@ -4,7 +4,7 @@ import cloneDeep from "lodash/cloneDeepWith" import GoogleButton from "../_components/GoogleButton.svelte" import { saveDatasource as save } from "builderStore/datasource" - import { API } from "api" + import { organisation } from "stores/portal" import { onMount } from "svelte" export let integration @@ -12,11 +12,10 @@ // kill the reference so the input isn't saved let datasource = cloneDeep(integration) - let isGoogleConfigured + $: isGoogleConfigured = !!$organisation.google onMount(async () => { - const config = await API.getTenantConfig() - isGoogleConfigured = !!config?.config.google + await organisation.init() }) diff --git a/packages/builder/src/pages/builder/portal/settings/auth/index.svelte b/packages/builder/src/pages/builder/portal/settings/auth/index.svelte index 0e82dd31e7..2d4dc7ee46 100644 --- a/packages/builder/src/pages/builder/portal/settings/auth/index.svelte +++ b/packages/builder/src/pages/builder/portal/settings/auth/index.svelte @@ -47,8 +47,9 @@ $: googleCallbackTooltip = $admin.cloud ? null : googleCallbackReadonly - ? "Vist the organisation page to update the platform URL" + ? "Visit the organisation page to update the platform URL" : "Leave blank to use the default callback URL" + $: googleSheetsCallbackUrl = `${$organisation.platformUrl}/api/global/auth/datasource/google/callback` $: GoogleConfigFields = { Google: [ @@ -62,6 +63,14 @@ placeholder: $organisation.googleCallbackUrl, copyButton: true, }, + { + name: "sheetsURL", + label: "Sheets URL", + readonly: googleCallbackReadonly, + tooltip: googleCallbackTooltip, + placeholder: googleSheetsCallbackUrl, + copyButton: true, + }, ], } @@ -396,7 +405,11 @@
To allow users to authenticate using their Google accounts, fill out the - fields below. + fields below. Read the documentation for more information.