Advertisement
Guest User

Untitled

a guest
Dec 13th, 2018
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.95 KB | None | 0 0
  1. methods: {
  2. handleDesactive() {
  3. if ( this.typeShow != 6 ) {
  4. axios.get(`/atas/${this.id}/desativar`)
  5. .then( res => eventHub.$emit('removeCard', this.id) )
  6. .then(() => alert('You clicked the button!'))
  7. } else {
  8. axios.get(`/atas/${this.id}/ativar`)
  9. .then( res => eventHub.$emit('removeCard', this.id) )
  10. .then(() => alert('You clicked the button!'))
  11. }
  12. }
  13. }
  14.  
  15. /**********************************************
  16. * OU *
  17. **********************************************/
  18.  
  19. methods: {
  20. handleDesactive() {
  21. if ( this.typeShow != 6 ) {
  22. axios.get(`/atas/${this.id}/desativar`)
  23. .then( res => {
  24. eventHub.$emit('removeCard', this.id)
  25. alert('You clicked the button!')
  26. })
  27. } else {
  28. axios.get(`/atas/${this.id}/ativar`)
  29. .then( res => {
  30. eventHub.$emit('removeCard', this.id)
  31. alert('You clicked the button!')
  32. })
  33. }
  34. }
  35. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement