mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
fix user role change modal
This commit is contained in:
parent
3d1eb2b939
commit
c08b5387c5
@ -27,7 +27,7 @@
|
|||||||
:title="modalTitle"
|
:title="modalTitle"
|
||||||
:cancel-title="$t('overlay.cancel')"
|
:cancel-title="$t('overlay.cancel')"
|
||||||
:ok-title="modalOkTitle"
|
:ok-title="modalOkTitle"
|
||||||
@ok="modalEvent"
|
@ok="setUserRole(roleSelected, currentRole)"
|
||||||
>
|
>
|
||||||
<p class="my-4">{{ modalQuestion }}</p>
|
<p class="my-4">{{ modalQuestion }}</p>
|
||||||
</b-modal>
|
</b-modal>
|
||||||
@ -60,17 +60,9 @@ export default {
|
|||||||
modalTitle: '',
|
modalTitle: '',
|
||||||
modalQuestion: '',
|
modalQuestion: '',
|
||||||
modalOkTitle: '',
|
modalOkTitle: '',
|
||||||
modalEvent: null,
|
|
||||||
username: '',
|
username: '',
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
|
||||||
// roleSelected(newRole, oldRole) {
|
|
||||||
// if (newRole !== oldRole) {
|
|
||||||
// // this.setUserRole(newRole, oldRole)
|
|
||||||
// }
|
|
||||||
// },
|
|
||||||
},
|
|
||||||
methods: {
|
methods: {
|
||||||
showModal() {
|
showModal() {
|
||||||
this.username = `${this.item.firstName} ${this.item.lastName}`
|
this.username = `${this.item.firstName} ${this.item.lastName}`
|
||||||
@ -80,7 +72,6 @@ export default {
|
|||||||
newRole: this.roleSelected, // TODO get the text:Administrator instead of admin
|
newRole: this.roleSelected, // TODO get the text:Administrator instead of admin
|
||||||
})
|
})
|
||||||
this.modalOkTitle = this.$t('overlay.changeUserRole.yes')
|
this.modalOkTitle = this.$t('overlay.changeUserRole.yes')
|
||||||
this.modalEvent = this.setUserRole(this.roleSelected, this.currentRole)
|
|
||||||
},
|
},
|
||||||
setUserRole(newRole, oldRole) {
|
setUserRole(newRole, oldRole) {
|
||||||
this.$apollo
|
this.$apollo
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user