Allow roles to be revoked many times

This commit is contained in:
richard-dds
2018-10-23 16:55:56 -04:00
parent 783b47b2f7
commit cd9ae2c928
3 changed files with 23 additions and 7 deletions

View File

@@ -31,14 +31,21 @@ export default {
methods: {
change: function (e) {
e.preventDefault()
this.new_role = this.revoke ? "" : e.target.value
this.new_role = e.target.value
},
cancel: function () {
this.new_role = this.initialData
},
},
watch: {
revoke: function (val) {
if (val) {
this.new_role = ""
}
}
},
computed: {
displayName: function () {
const newRole = this.newRole
@@ -53,7 +60,7 @@ export default {
"label" : "label label--success"
},
newRole: function () {
return this.revoke ? "" : this.new_role
return this.new_role
}
},
}