<div class="container containerProfitCenter" >

    <form class="supplierListForm" enctype="multipart/form-data">
        @csrf
        <div class="container-fluid" >
            <table class="dataTable display" style="width:100%">
                <thead>
                <tr>

                    <th>Azonosító</th>
                    <th>Név</th>
                    <th>Hooreyca azonosító</th>
                    <th>Betűkódja</th>
                    <th>Felvitel</th>
                    <th></th>
                </tr>
                </thead>
                <tfoot>
                <tr>
                    <th>Azonosító</th>
                    <th>Beszállító</th>
                    <th>Hooreyca azonosító</th>
                    <th>Betűkódja</th>
                    <th>Felvitel</th>
                    <th></th>
                </tr>
                </tfoot>
            </table>
        </div>
    </form>
</div>
<script>
    $(document).ready(function() {
        if(!APP.ProfitCenter){
            console.log('nincs APP.ProfitCenter');
            APP.ProfitCenter = new window.DataModelProfitCenter({ });
            console.log(typeof ProfitCenter);
            /*
              APP.Supplier = new Supplier({
                  'contacts':[
                      {
                          id:76,
                          name:'Miksóné Borbély Erzsébet',
                          email:'szamlazas1@funkcio.hu',
                          phone:'{{formatterPhoneNumber("+36203407500")}}'
                    },
                    {
                        id:12,
                        name:'Pap Beáta',
                        email:'szamlazas2@funkcio.hu',
                        phone:'{{formatterPhoneNumber("+36208512351")}}'
                    },
                    {
                        id:3,
                        name:'Kósa Veronika',
                        email:'szamlazas4@funkcio.hu',
                        phone:'{{formatterPhoneNumber("+36204589180")}}'
                    }

                ]
            });
          */
            console.log('letrehozva APP.ProfitCenter');

        };
        //Supplier=APP.Supplier;
        if(!APP.ProfitCenterAdmin){
            console.log('nincs APP.ProfitCenterAdmin')
            APP.ProfitCenterAdmin = new window.ProfitCenterAdmin();
        };
        @if ($init)
            debug('a: {{$testMode}}')
            debug("b: {{($testMode) ? 'true' : 'false'}}");
        APP.ProfitCenterAdmin.init({
            URL: {
                getDataTableContent:'{{route('admin.profitCenter.getDataTableContent')}}',
                index:'{{route('admin.profitCenter.index')}}',
                show:'{{route('admin.profitCenter.show',"%id%")}}',
                create:'{{route('admin.profitCenter.create')}}',
                edit:'{{route('admin.profitCenter.edit',"%id%")}}',
                store:'{{route('admin.profitCenter.store')}}',
                update:'{{route('admin.profitCenter.update',"%id%")}}',
                destroy:'{{route('admin.profitCenter.destroy',"%id%")}}',
            },
            testMode: {{$testMode ? 'true' : 'false'}}
        },APP.ProfitCenter);
        @endif


    });
</script>

