From fa04672318040a621c0385d741940ca3254f31aa Mon Sep 17 00:00:00 2001 From: Peter Clement Date: Mon, 16 Aug 2021 09:44:15 +0100 Subject: [PATCH 1/3] Bug fix for unable to navigate from sql screen --- .../[selectedDatasource]/index.svelte | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/packages/builder/src/pages/builder/app/[application]/data/datasource/[selectedDatasource]/index.svelte b/packages/builder/src/pages/builder/app/[application]/data/datasource/[selectedDatasource]/index.svelte index b0377d2f27..0cd667a82e 100644 --- a/packages/builder/src/pages/builder/app/[application]/data/datasource/[selectedDatasource]/index.svelte +++ b/packages/builder/src/pages/builder/app/[application]/data/datasource/[selectedDatasource]/index.svelte @@ -9,7 +9,6 @@ import ICONS from "components/backend/DatasourceNavigator/icons" import { capitalise } from "helpers" - let unsaved = false let relationshipModal let displayColumnModal let selectedFromRelationship, selectedToRelationship @@ -71,7 +70,6 @@ // Create datasource await datasources.save(datasource) notifications.success(`Datasource ${name} updated successfully.`) - unsaved = false } catch (err) { notifications.error(`Error saving datasource: ${err}`) } @@ -81,7 +79,6 @@ try { await datasources.updateSchema(datasource) notifications.success(`Datasource ${name} tables updated successfully.`) - unsaved = false await tables.fetch() } catch (err) { notifications.error(`Error updating datasource schema: ${err}`) @@ -98,10 +95,6 @@ $goto(`../../table/${table._id}`) } - function setUnsaved() { - unsaved = true - } - function openRelationshipModal(fromRelationship, toRelationship) { selectedFromRelationship = fromRelationship || {} selectedToRelationship = toRelationship || {} @@ -111,16 +104,6 @@ function openDisplayColumnModal() { displayColumnModal.show() } - - $beforeUrlChange(() => { - if (unsaved) { - notifications.error( - "Unsaved changes. Please save your datasource configuration before leaving." - ) - return false - } - return true - }) @@ -164,7 +147,6 @@ {#if datasource.plus} From 45b8af286070426fa244a4daf8a3e39a087d085e Mon Sep 17 00:00:00 2001 From: Peter Clement Date: Wed, 18 Aug 2021 00:02:17 +0100 Subject: [PATCH 2/3] fixes organisation logo not showing --- .../src/pages/builder/portal/settings/organisation.svelte | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/builder/src/pages/builder/portal/settings/organisation.svelte b/packages/builder/src/pages/builder/portal/settings/organisation.svelte index b274d3af91..b036585e22 100644 --- a/packages/builder/src/pages/builder/portal/settings/organisation.svelte +++ b/packages/builder/src/pages/builder/portal/settings/organisation.svelte @@ -37,7 +37,11 @@ async function uploadLogo(file) { let data = new FormData() data.append("file", file) - const res = await post("/api/global/configs/upload/settings/logo", data, {}) + const res = await post( + "/api/admin/configs/upload/settings/logoUrl", + data, + {} + ) return await res.json() } From 1e0da6e702a242726cd5b5219a859431ab5790fd Mon Sep 17 00:00:00 2001 From: Peter Clement Date: Wed, 18 Aug 2021 10:37:14 +0100 Subject: [PATCH 3/3] linting --- .../data/datasource/[selectedDatasource]/index.svelte | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/builder/src/pages/builder/app/[application]/data/datasource/[selectedDatasource]/index.svelte b/packages/builder/src/pages/builder/app/[application]/data/datasource/[selectedDatasource]/index.svelte index 0cd667a82e..fc82e3a11c 100644 --- a/packages/builder/src/pages/builder/app/[application]/data/datasource/[selectedDatasource]/index.svelte +++ b/packages/builder/src/pages/builder/app/[application]/data/datasource/[selectedDatasource]/index.svelte @@ -1,5 +1,5 @@