$(document).ready(function(){
 
  $('#company_trash_modal').css("width","800px");

  $('.company_trash').on('click',function(){
  
    $.ajaxSetup({

      headers: {

          'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')

      } 

    });


    $.ajax({ 
    
      url:url_trashcompany,

      method:"POST",

      data:{},

      success:function(result)

      {
        var section="";
        var count=(result).length;
        

        for(i=0;i<(count);i++){
        
           section=section+
          
           '<tr>'+ 
          
            '<td><label class="control-label" for="company name"> '+result[i]['name']+'</label></td>'+
           
            '<td><label class="control-label" for="GST NO"> '+result[i]['gstin']+'</label></td>'+
								
            '<td><label class="control-label" for="Email"> '+result[i]['email']+'</label></td>'+
								
            '<td><a href="#" class="btn btn-success trashbtnRestore" data-id="'+result[i]['id']+'">Restore</a>|<a href="#" class="btn btn-danger trashbtnDelete" data-id="'+result[i]['id']+'">Delete</a></td>'+

          '</tr>'

            
          $('#company_trashedlist').append(section);
        }

          
      }

   });
    






    $("#company_trashed").modal('show');

  });





  
});




