diff --git a/packages/builder/src/pages/builder/portal/manage/users/[userId].svelte b/packages/builder/src/pages/builder/portal/manage/users/[userId].svelte index b8c55d6aca..8968384c91 100644 --- a/packages/builder/src/pages/builder/portal/manage/users/[userId].svelte +++ b/packages/builder/src/pages/builder/portal/manage/users/[userId].svelte @@ -9,6 +9,8 @@ Divider, Label, Input, + Select, + Toggle, Modal, Table, ModalContent, @@ -33,23 +35,25 @@ $: appList = Object.keys($apps?.data).map(id => ({ ...$apps?.data?.[id], _id: id, - role: [$roleFetch?.data?.roles?.[id]], + role: [$userFetch?.data?.roles?.[id]], })) let selectedApp - const roleFetch = fetchData(`/api/admin/users/${userId}`) + const userFetch = fetchData(`/api/admin/users/${userId}`) const apps = fetchData(`/api/admin/roles`) async function deleteUser() { const res = await users.del(userId) if (res.message) { - notifications.success(`User ${$roleFetch?.data?.email} deleted.`) + notifications.success(`User ${$userFetch?.data?.email} deleted.`) $goto("./") } else { notifications.error("Failed to delete user.") } } + async function toggleBuilderAccess() {} + async function openUpdateRolesModal({ detail }) { console.log(detail) selectedApp = detail @@ -65,11 +69,10 @@