Fetch sheets

This commit is contained in:
Adria Navarro 2023-06-06 13:52:44 +01:00
parent 5135ac36b7
commit 39848eef07
1 changed files with 5 additions and 5 deletions

View File

@ -47,6 +47,8 @@
let isValid = false let isValid = false
let sheets
const saveDatasourceAndRedirect = async () => { const saveDatasourceAndRedirect = async () => {
try { try {
const resp = await saveDatasource(datasource) const resp = await saveDatasource(datasource)
@ -82,9 +84,8 @@
return return
} }
getDatasourceInfo(datasource).then(i => { const info = await getDatasourceInfo(datasource)
debugger sheets = info.tableNames
console.log(i)
step = GoogleDatasouceConfigStep.SET_SHEETS step = GoogleDatasouceConfigStep.SET_SHEETS
notifications.success( notifications.success(
@ -92,7 +93,6 @@
? "Connection Successful" ? "Connection Successful"
: `Datasource created successfully.` : `Datasource created successfully.`
) )
})
// prevent the modal from closing // prevent the modal from closing
return false return false
@ -146,7 +146,7 @@
{/if} {/if}
{#if step === GoogleDatasouceConfigStep.SET_SHEETS} {#if step === GoogleDatasouceConfigStep.SET_SHEETS}
<Layout noPadding no> <Layout noPadding no>
<Body size="S">Select which spreadsheet you want to connect.</Body> <Body size="S">Select which spreadsheets you want to connect.</Body>
</Layout> </Layout>
{/if} {/if}
</ModalContent> </ModalContent>