From cb0c6bac072f814154df15fcd50f928938f18c72 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Keviin=20=C3=85berg=20Kultalahti?= Date: Wed, 12 May 2021 09:13:59 +0200 Subject: [PATCH] move logic from Users page to separate component --- .../users/_components/AddUserModal.svelte | 21 +++++++++++++------ .../builder/portal/manage/users/index.svelte | 21 ++++--------------- 2 files changed, 19 insertions(+), 23 deletions(-) diff --git a/packages/builder/src/pages/builder/portal/manage/users/_components/AddUserModal.svelte b/packages/builder/src/pages/builder/portal/manage/users/_components/AddUserModal.svelte index 177a7ff810..415c1cde82 100644 --- a/packages/builder/src/pages/builder/portal/manage/users/_components/AddUserModal.svelte +++ b/packages/builder/src/pages/builder/portal/manage/users/_components/AddUserModal.svelte @@ -1,22 +1,30 @@ diff --git a/packages/builder/src/pages/builder/portal/manage/users/index.svelte b/packages/builder/src/pages/builder/portal/manage/users/index.svelte index 25836260d6..868c455a67 100644 --- a/packages/builder/src/pages/builder/portal/manage/users/index.svelte +++ b/packages/builder/src/pages/builder/portal/manage/users/index.svelte @@ -11,7 +11,6 @@ Label, Layout, Modal, - notifications, } from "@budibase/bbui" import AddUserModal from "./_components/AddUserModal.svelte" import BasicOnboardingModal from "./_components/BasicOnboardingModal.svelte" @@ -26,8 +25,6 @@ // group: {} } - let onboardingOptions = ["Email onboarding", "Basic onboarding"] - let selectedOnboardingOption = onboardingOptions[0] let search let email $: filteredUsers = $users.filter(user => user.email.includes(search || "")) @@ -35,13 +32,9 @@ let createUserModal let basicOnboardingModal - function createUserFlow() { - if (selectedOnboardingOption === onboardingOptions[0]) { - notifications.success("Email sent.") - } else { - createUserModal.hide() - basicOnboardingModal.show() - } + function openBasicOnoboardingModal() { + createUserModal.hide() + basicOnboardingModal.show() } @@ -80,13 +73,7 @@