

<div class='row'>

        <div class='col-md-12'>
           <div class="card">
             <div class="card-header">
                  <h4 class='card-title'><i class="fas fa-database"></i> Maintenance</h4></div>    
						<div class="card-body">
						
                            <div class='col-md-12 notif'></div>
                            <div class='col-md-6'>
                               <div class="card">
                                   <div class="card-header">
                                        <h5 class='card-title'>Reset Database</h5>
                                    </div>
                                    <div class='card-body' id="hapus">
                                       
                                           
                                            <button name='reset' class='hapus btn btn-outline-danger'><i class='fa fa-trash'></i> Reset Database</button>
                                       
                                    </div>
                                </div>
                            </div>
                        </div>
                        
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<script>
$('#hapus').on('click', '.hapus', function() {
        var id = $(this).data('id');
        console.log(id);
        Swal.fire({
				  title: 'Are you sure?',
				  text: "RESET DATABASE",
				  type: 'warning',
				  showCancelButton: true,
				  confirmButtonColor: '#3085d6',
				  cancelButtonColor: '#d33',
				  confirmButtonText: 'Yes, delete it!'	
        }).then((result) => {
            if (result.value) {
                $.ajax({
                   url: 'pengaturan/crud_setting.php?pg=reset',
                    method: "POST",
                    
                    success: function(data) {
						  iziToast.info(
            {
                 title: 'Sukses!',
                message: 'Database berhasil direset',
				titleColor: '#FFFF00',
				messageColor: '#fff',
				backgroundColor: 'rgba(0, 0, 0, 0.5)',
				 progressBarColor: '#FFFF00',
                  position: 'topRight'				  
                });
                        setTimeout(function() {
                            window.location.reload();
                        }, 2000);
                    }
                });
            }
            return false;
        })

    });

</script>
                      	 
									 
