Use global events to revoke env access

This commit is contained in:
Patrick Smith
2018-10-23 17:28:03 -04:00
committed by richard-dds
parent cd9ae2c928
commit c7471f9e8b
3 changed files with 12 additions and 19 deletions

View File

@@ -20,7 +20,7 @@ export default {
props: {
choices: Array,
initialData: String,
revoke: Boolean,
projectId: String
},
data: function () {
@@ -29,6 +29,10 @@ export default {
}
},
mounted: function() {
this.$root.$on('revoke-' + this.projectId, this.revoke)
},
methods: {
change: function (e) {
this.new_role = e.target.value
@@ -36,13 +40,8 @@ export default {
cancel: function () {
this.new_role = this.initialData
},
},
watch: {
revoke: function (val) {
if (val) {
this.new_role = ""
}
revoke: function () {
this.new_role = ""
}
},