From 1bc339679a737c753729a7fb71f65f6ff620b0d7 Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Fri, 4 Dec 2020 08:27:42 +0000 Subject: [PATCH] Add modal for editing user roles --- .../backend/DataTable/DataTable.svelte | 5 + .../DataTable/buttons/EditRolesButton.svelte | 23 +++ .../backend/DataTable/modals/EditRoles.svelte | 136 ++++++++++++++++++ 3 files changed, 164 insertions(+) create mode 100644 packages/builder/src/components/backend/DataTable/buttons/EditRolesButton.svelte create mode 100644 packages/builder/src/components/backend/DataTable/modals/EditRoles.svelte diff --git a/packages/builder/src/components/backend/DataTable/DataTable.svelte b/packages/builder/src/components/backend/DataTable/DataTable.svelte index 063ca34633..2869b82e70 100644 --- a/packages/builder/src/components/backend/DataTable/DataTable.svelte +++ b/packages/builder/src/components/backend/DataTable/DataTable.svelte @@ -4,8 +4,10 @@ import CreateColumnButton from "./buttons/CreateColumnButton.svelte" import CreateViewButton from "./buttons/CreateViewButton.svelte" import ExportButton from "./buttons/ExportButton.svelte" + import EditRolesButton from "./buttons/EditRolesButton.svelte" import * as api from "./api" import Table from "./Table.svelte" + import { TableNames } from "constants" let data = [] let loading = false @@ -36,4 +38,7 @@ {/if} + {#if $backendUiStore.selectedTable?._id === TableNames.USERS} + + {/if} diff --git a/packages/builder/src/components/backend/DataTable/buttons/EditRolesButton.svelte b/packages/builder/src/components/backend/DataTable/buttons/EditRolesButton.svelte new file mode 100644 index 0000000000..024905fddc --- /dev/null +++ b/packages/builder/src/components/backend/DataTable/buttons/EditRolesButton.svelte @@ -0,0 +1,23 @@ + + +
+ +
+ + + + + diff --git a/packages/builder/src/components/backend/DataTable/modals/EditRoles.svelte b/packages/builder/src/components/backend/DataTable/modals/EditRoles.svelte new file mode 100644 index 0000000000..627112d87c --- /dev/null +++ b/packages/builder/src/components/backend/DataTable/modals/EditRoles.svelte @@ -0,0 +1,136 @@ + + + + {#if errors.length} + + {/if} + + {#if selectedRole} + + + + {/if} +
+ {#if !isCreating} + + {/if} +
+