Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- methods: {
- handleDesactive() {
- if ( this.typeShow != 6 ) {
- axios.get(`/atas/${this.id}/desativar`)
- .then( res => eventHub.$emit('removeCard', this.id) )
- .then(() => alert('You clicked the button!'))
- } else {
- axios.get(`/atas/${this.id}/ativar`)
- .then( res => eventHub.$emit('removeCard', this.id) )
- .then(() => alert('You clicked the button!'))
- }
- }
- }
- /**********************************************
- * OU *
- **********************************************/
- methods: {
- handleDesactive() {
- if ( this.typeShow != 6 ) {
- axios.get(`/atas/${this.id}/desativar`)
- .then( res => {
- eventHub.$emit('removeCard', this.id)
- alert('You clicked the button!')
- })
- } else {
- axios.get(`/atas/${this.id}/ativar`)
- .then( res => {
- eventHub.$emit('removeCard', this.id)
- alert('You clicked the button!')
- })
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement