From c1f1c8d169ed480a140d0d79d54486d44828b5a7 Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Wed, 19 May 2021 10:25:23 +0100 Subject: [PATCH] Add first name and last name to user schema and add modal to update names --- .../_components/UpdateUserInfoModal.svelte | 40 +++++++++++++++++++ .../src/pages/builder/apps/index.svelte | 23 ++++++++--- 2 files changed, 57 insertions(+), 6 deletions(-) create mode 100644 packages/builder/src/pages/builder/apps/_components/UpdateUserInfoModal.svelte diff --git a/packages/builder/src/pages/builder/apps/_components/UpdateUserInfoModal.svelte b/packages/builder/src/pages/builder/apps/_components/UpdateUserInfoModal.svelte new file mode 100644 index 0000000000..e54c3c719f --- /dev/null +++ b/packages/builder/src/pages/builder/apps/_components/UpdateUserInfoModal.svelte @@ -0,0 +1,40 @@ + + + + + Personalise the platform by adding your first name and last name. + + + + diff --git a/packages/builder/src/pages/builder/apps/index.svelte b/packages/builder/src/pages/builder/apps/index.svelte index 3b383bc1ba..7d9c8b93b4 100644 --- a/packages/builder/src/pages/builder/apps/index.svelte +++ b/packages/builder/src/pages/builder/apps/index.svelte @@ -10,6 +10,7 @@ Page, Icon, Body, + Modal, } from "@budibase/bbui" import { onMount } from "svelte" import { apps, organisation } from "stores/portal" @@ -17,8 +18,11 @@ import { goto } from "@roxi/routify" import { AppStatus } from "constants" import { gradient } from "actions" + import UpdateUserInfoModal from "./_components/UpdateUserInfoModal.svelte" let loaded = false + let userInfoModal + let userPasswordModal onMount(async () => { await organisation.init() @@ -35,8 +39,10 @@
- Hey {$auth.user.email} - + + Hey {$auth.user.firstName || $auth.user.email} + + Welcome to the {$organisation.company} portal. Below you'll find the list of apps that you have access to, as well as company news and the employee handbook. @@ -47,7 +53,9 @@
- Update user information + userInfoModal.show()}> + Update user information + Update password
- GROUP + GROUP {#if $auth.user?.builder?.global} {/if} @@ -76,7 +84,7 @@
{app.name} - + Edited {Math.round(Math.random() * 10 + 1)} months ago
@@ -89,6 +97,9 @@
+ + + {/if}