mirror of
https://gitlab.com/bramw/baserow.git
synced 2025-04-15 09:34:13 +00:00
Merge branch 'member-fallback-for-invites' into 'develop'
Implement members fallback for invites See merge request bramw/baserow!1060
This commit is contained in:
commit
5200b1d4b8
1 changed files with 12 additions and 4 deletions
|
@ -4,12 +4,12 @@
|
|||
ref="editRoleContextLink"
|
||||
@click="$refs.editRoleContext.toggle($refs.editRoleContextLink)"
|
||||
>
|
||||
{{ roleName(roles, row) }}
|
||||
{{ roleName(roles, rowSanitised) }}
|
||||
<i class="fas fa-chevron-down"></i>
|
||||
</a>
|
||||
<EditRoleContext
|
||||
ref="editRoleContext"
|
||||
:row="row"
|
||||
:row="rowSanitised"
|
||||
:roles="roles"
|
||||
role-value-column="permissions"
|
||||
@update-role="roleUpdate($event)"
|
||||
|
@ -39,6 +39,14 @@ export default {
|
|||
},
|
||||
computed: {
|
||||
...mapGetters({ userId: 'auth/getUserId', roles: 'roles/getAllRoles' }),
|
||||
rowSanitised() {
|
||||
return {
|
||||
...this.row,
|
||||
permissions: this.roles.some(({ uid }) => uid === this.row.permissions)
|
||||
? this.row.permissions
|
||||
: 'BUILDER',
|
||||
}
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
roleName(roles, row) {
|
||||
|
@ -53,8 +61,8 @@ export default {
|
|||
|
||||
try {
|
||||
await GroupService(this.$client).updateInvitation(
|
||||
invitation.id,
|
||||
invitation
|
||||
newInvitation.id,
|
||||
newInvitation
|
||||
)
|
||||
} catch (error) {
|
||||
this.$emit('row-update', oldInvitation)
|
||||
|
|
Loading…
Add table
Reference in a new issue