adds notifications to roles updating action

This commit is contained in:
Keviin Åberg Kultalahti 2021-05-14 15:14:37 +02:00
parent ac883053e0
commit bdca818c48
2 changed files with 9 additions and 4 deletions

View File

@ -25,7 +25,7 @@
const roleSchema = {
name: { displayName: "App" },
roles: {},
roles: { type: "options" },
}
// Here we need to merge the Apps list and the roles response to get something that makes sense for the table

View File

@ -1,5 +1,10 @@
<script>
import { Body, Multiselect, ModalContent } from "@budibase/bbui"
import {
Body,
Multiselect,
ModalContent,
notifications,
} from "@budibase/bbui"
import { users } from "stores/portal"
export let app
@ -10,7 +15,7 @@
function updateUserRoles() {
users.updateRoles({ ...user, roles: { ...user.roles, [app._id]: roles } })
console.log("updating roles!")
notifications.success("Roles updated")
}
</script>
@ -23,7 +28,7 @@
showCloseIcon={false}
>
<Body noPadding
>Select the roles that this user should use for the {app.name}.</Body
>Update {user.email}'s roles for <strong>{app.name}</strong>.</Body
>
<Multiselect
placeholder={null}