From 720327b58fba099afaaa2d5a74a7e9ff52e43ef2 Mon Sep 17 00:00:00 2001 From: NEOLPAR Date: Wed, 10 Aug 2022 13:11:10 +0100 Subject: [PATCH 01/13] fixed pouchdb unable to find the view throwing error --- packages/server/src/api/controllers/view/utils.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/packages/server/src/api/controllers/view/utils.js b/packages/server/src/api/controllers/view/utils.js index 5bddbf345c..1fa7a999c4 100644 --- a/packages/server/src/api/controllers/view/utils.js +++ b/packages/server/src/api/controllers/view/utils.js @@ -20,8 +20,13 @@ exports.getView = async viewName => { return null } - const viewDoc = await db.get(generateMemoryViewID(viewName)) - return viewDoc.view + try { + const viewDoc = await db.get(generateMemoryViewID(viewName)) + return viewDoc.view + } catch (err) { + // if PouchDB doesn't found the view it will fall here + return null + } } } From 58f59c88b0f3592ab898f3a24480e032c3f8fad7 Mon Sep 17 00:00:00 2001 From: FlaminWrap <97764630+FlaminWrap@users.noreply.github.com> Date: Wed, 10 Aug 2022 23:04:52 +0000 Subject: [PATCH 02/13] Fix issue #4290 * Fixes issue #4290 * Changed the title from 'Accept Invitation' to 'Invitation to organistaion / Budibase' * Changed the 'Please enter a password to set up your user.' to 'Please enter a password to get started.' * Increased width to 300px to allow longer org names --- .../src/pages/builder/invite/index.svelte | 23 ++++++++++++++----- 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/packages/builder/src/pages/builder/invite/index.svelte b/packages/builder/src/pages/builder/invite/index.svelte index 8ac35de07f..2b9e9592f1 100644 --- a/packages/builder/src/pages/builder/invite/index.svelte +++ b/packages/builder/src/pages/builder/invite/index.svelte @@ -1,13 +1,16 @@
- logo + logo - Accept Invitation + Invitation to {company} - Please enter a password to set up your user. + Please enter a password to get started. @@ -46,7 +57,7 @@ } .container { margin: 0 auto; - width: 260px; + width: 300px; display: flex; flex-direction: column; justify-content: flex-start; From 94081378266c9ac193ebf52f2498063553da1f4f Mon Sep 17 00:00:00 2001 From: NEOLPAR Date: Thu, 11 Aug 2022 14:56:13 +0100 Subject: [PATCH 03/13] the error thrown by pouchdb is propagated if it is other than not-found --- packages/server/src/api/controllers/view/utils.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/server/src/api/controllers/view/utils.js b/packages/server/src/api/controllers/view/utils.js index 1fa7a999c4..7b5bad46b4 100644 --- a/packages/server/src/api/controllers/view/utils.js +++ b/packages/server/src/api/controllers/view/utils.js @@ -24,8 +24,10 @@ exports.getView = async viewName => { const viewDoc = await db.get(generateMemoryViewID(viewName)) return viewDoc.view } catch (err) { - // if PouchDB doesn't found the view it will fall here - return null + // Return null when PouchDB doesn't found the view + if (err.status === 404) return null + + throw err } } } From 6205d16dd25dafcb76b37f4845ce62206495fae0 Mon Sep 17 00:00:00 2001 From: FlaminWrap <97764630+FlaminWrap@users.noreply.github.com> Date: Thu, 11 Aug 2022 20:05:06 +0000 Subject: [PATCH 04/13] Update index.svelte --- packages/builder/src/pages/builder/invite/index.svelte | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/builder/src/pages/builder/invite/index.svelte b/packages/builder/src/pages/builder/invite/index.svelte index 2b9e9592f1..ffc2b09e85 100644 --- a/packages/builder/src/pages/builder/invite/index.svelte +++ b/packages/builder/src/pages/builder/invite/index.svelte @@ -8,9 +8,9 @@ const inviteCode = $params["?code"] let password, error - + $: company = $organisation.company || "Budibase" - + async function acceptInvite() { try { await users.acceptInvite(inviteCode, password) @@ -20,7 +20,7 @@ notifications.error(error.message) } } - + onMount(async () => { try { await organisation.init() From 9ec850842bab3d0f936ac086b63ddf4dc888310c Mon Sep 17 00:00:00 2001 From: NEOLPAR Date: Fri, 12 Aug 2022 11:42:18 +0100 Subject: [PATCH 05/13] fix filter not showing --- packages/builder/src/pages/builder/portal/apps/index.svelte | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/builder/src/pages/builder/portal/apps/index.svelte b/packages/builder/src/pages/builder/portal/apps/index.svelte index a089664d2e..13d23f6a51 100644 --- a/packages/builder/src/pages/builder/portal/apps/index.svelte +++ b/packages/builder/src/pages/builder/portal/apps/index.svelte @@ -20,7 +20,7 @@ import { store, automationStore } from "builderStore" import { API } from "api" import { onMount } from "svelte" - import { apps, auth, admin, templates, groups } from "stores/portal" + import { apps, auth, admin, templates } from "stores/portal" import download from "downloadjs" import { goto } from "@roxi/routify" import AppRow from "components/start/AppRow.svelte" @@ -355,7 +355,7 @@ {/if}
- {#if $auth.groupsEnabled && $groups.length} + {#if $auth.groupsEnabled} {/if}