Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- swal({
- title: 'Auto close alert!',
- html: 'I will close in <strong></strong> seconds.',
- onOpen: () => {
- var ano = $('.slt-ano').val()
- swal.showLoading()
- $.ajaxSetup({
- headers: {
- 'X-CSRF-TOKEN' : $('meta[name="csrf-token"]').attr('content')
- }
- })
- return $.ajax({
- url : '{{ route('medicao.getDadosToGrapsh') }}',
- type: 'post',
- dataType: 'json',
- data: {
- ano : ano
- }
- }).done((r)=>{
- return r
- })
- },
- }).then((result) => {
- console.log( result )
- if (
- // Read more about handling dismissals
- result.dismiss === swal.DismissReason.timer
- ) {
- console.log('I was closed by the timer')
- }
- })
Add Comment
Please, Sign In to add comment