@extends('admin.layouts.app')
@section('breadcrumb-first', $breadcrumb->first)
@section('breadcrumb-second', $breadcrumb->second)
@section('button')
<a href="javascript:;" class="btn btn-custom btn-sm waves-effect waves-light" data-toggle="modal" data-target="#modal-filter">
	<i class="mdi mdi-filter me-1"></i> Filter Mutasi Bank
</a>
@endsection
@section('content')
<div class="row">
	<div class="col-lg-12">
        @include('admin.log.bank_mutation.filter')
        <div class="card card-custom">
            <div class="card-body">
                <div class="table-responsive">
                    {!! $dataTable->table(['class' => 'table table-borderless table-hover mb-0'], false) !!}
                </div>
			</div>
		</div>
	</div>
</div>
{!! $dataTable->scripts() !!}
<script>
    $(document).ready(function () {
        document.getElementById("data-table").children[0].className = "thead-light";
        $('#filter_form').on('submit', function(element) {
            element.preventDefault();
            $("#modal-filter").modal('hide');
            $('#preloader').fadeIn('slow');
            $.when(window.LaravelDataTables["data-table"].page.len($('#filter_row').val()).draw()).done(function() {
                $('#preloader').fadeOut('slow');
            });
        });
        $('#filter_form').on('reset', function(element) {
            $('[data-toggle="select2"], select, input, textarea').val(null).trigger('change');
            $('#filter_row').val('10').trigger('change');
            $("#modal-filter").modal('hide');
            $('#preloader').fadeIn('slow');
            $.when(window.LaravelDataTables["data-table"].page.len('10').draw()).done(function() {
                $('#preloader').fadeOut('slow');
            });
        });
    });
</script>
@endsection