<div class="container containerProduct" >

<form class="ProductListForm" enctype="multipart/form-data">
    @csrf
    @include('admin.statistics.filter')

    <div class="form-group row">
        <div class="col-sm-10">
            <button type="button" class="btn btn-success FormSendButton" inputmode="text" value="">Lekérdezés inditása</button>
        </div>
    </div>

</form>
    <div class="table-responsive-xl" >
        <div class="container containerLoading" style="display: none">
            <div class="d-flex justify-content-center"  >
                <strong>Loading...</strong>
                <div class="spinner-border ml-1" role="status" aria-hidden="true"></div>
            </div>
        </div>
        <div class="container-fluid containerResult" style="display: none">
            <table id="dataTableProduct" class="dataTable display" style="width:100%">
                <thead>
                <tr>

                    <th>Azonosító</th>
                    <th>Név</th>
                    <th>Hooreyca azonosító</th>
                    <th data-orderable="false">Termékcsoport</th>
                    <th data-orderable="false">Beszállító</th>
                    <th data-orderable="false">Ár</th>
                    <th>Felvitel</th>
                    <th data-orderable="false" ></th>
                </tr>
                </thead>
                <tfoot>
                <tr>
                    <th>Azonosító</th>
                    <th>Név</th>
                    <th>Hooreyca azonosító</th>
                    <th data-orderable="false">Termékcsoport</th>
                    <th data-orderable="false">Beszállító</th>
                    <th data-orderable="false">Ár</th>
                    <th>Felvitel</th>
                    <th data-orderable="false" ></th>
                </tr>
                </tfoot>
            </table>
        </div>

    </div>



</div>
<style>
    .ProductListForm .ui-state-default{
        //background-image: url(/images/vendor/jquery-ui-themes/themes/pepper-grinder/ui-icons_222222_256x240.png?bcf1cdc9c7d1486173cc9aaa8b1fc77b);
    }
</style>
<script>

    $(document).ready(function() {
        if(!APP.Product){
            console.log('nincs APP.Product');
            APP.Product = new window.Product({ });
            console.log(typeof Product);
            console.log('letrehozva APP.Product');

        };
        //Product=APP.Product;
        if(!APP.ProductAdmin){
            console.log('nincs APP.ProductAdmin')
            APP.ProductAdmin = new window.ProductAdmin();
        };
        @if ($init)
        APP.ProductAdmin.init({
            URL: {
                getDataTableContent:'{{route('admin.product.getDataTableContent')}}',
                getProductSearch:'{{route('admin.statistics.getProductSearch')}}',
                index:'{{route('admin.product.index')}}',
                show:'{{route('admin.product.show',"%id%")}}',
                create:'{{route('admin.product.create')}}',
                edit:'{{route('admin.product.edit',"%id%")}}',
                store:'{{route('admin.product.store')}}',
                update:'{{route('admin.product.update',"%id%")}}',
                destroy:'{{route('admin.product.destroy',"%id%")}}',
                attachFile:'{{route('admin.product.attachFile',"%id%")}}',
                detachFile:'{{route('admin.product.detachFile',"%id%")}}',
            },
            testMode:{{($testMode?$testMode:'false')}},
            filters:{!!$availableFilters!!}
        },APP.Product);
        @endif

    });
</script>

