fix user role change modal

This commit is contained in:
mahula 2023-03-24 14:36:02 +01:00
parent 3d1eb2b939
commit c08b5387c5

View File

@ -27,7 +27,7 @@
:title="modalTitle"
:cancel-title="$t('overlay.cancel')"
:ok-title="modalOkTitle"
@ok="modalEvent"
@ok="setUserRole(roleSelected, currentRole)"
>
<p class="my-4">{{ modalQuestion }}</p>
</b-modal>
@ -60,17 +60,9 @@ export default {
modalTitle: '',
modalQuestion: '',
modalOkTitle: '',
modalEvent: null,
username: '',
}
},
watch: {
// roleSelected(newRole, oldRole) {
// if (newRole !== oldRole) {
// // this.setUserRole(newRole, oldRole)
// }
// },
},
methods: {
showModal() {
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
})
this.modalOkTitle = this.$t('overlay.changeUserRole.yes')
this.modalEvent = this.setUserRole(this.roleSelected, this.currentRole)
},
setUserRole(newRole, oldRole) {
this.$apollo