<div class="modal-content">
    <div class="modal-header">
        <h5 class="modal-title">
            Produkt hinzufügen /
            @if($homeparty_user->is_host)
                Gastgeber/in
            @else
                Gast
            @endif
            {{ $homeparty_user->billing_firstname }} {{ $homeparty_user->billing_lastname }}
        </h5>
        <button type="button" class="close" data-dismiss="modal" aria-label="Close">×</button>
    </div>
    <div class="modal-body">
        <div class="card-datatable pt-0 table-responsive">
            <table id="datatable-homeparty" class="table table-striped table-bordered" data-homeparty-id="{{$homeparty->id}}" data-homeparty-user-id="{{$homeparty_user->id}}">
                <thead>
                <tr>
                    <th></th>
                    <th>{{__('Bild')}}</th>
                    <th>{{__('Produkt')}}</th>
                    <th>{{__('Artikelnummer')}}</th>
                    <th>{{__('EK-Preis brutto')}}</th>
                    <th>{{__('VK-Preis brutto')}}</th>
                    <th>{{__('Points')}}</th>
                </tr>
                </thead>
            </table>
        </div>
</div>
    <div class="modal-footer">
            <button type="button" class="btn btn-default" data-dismiss="modal">schließen</button>
    </div>
</div>
<script>
    $( document ).ready(function() {
        var oTable = $('#datatable-homeparty').DataTable({
            "processing": true,
            "serverSide": true,
            "ajax": '{!! route('user_homeparty_datatable') !!}',
            "order": [[4, "asc" ]],
            "columns": [

                { data: 'add_card', name: 'add_card', searchable: false, orderable: false },
                { data: 'picture', name: 'picture', searchable: false, width: 35 },
                { data: 'name', name: 'name' },
                { data: 'number', name: 'number' },
                { data: 'price_gross', name: 'price_gross', searchable: false, orderable: false },
                { data: 'price_vk_gross', name: 'price_vk_gross', searchable: false },
                { data: 'points', name: 'points', searchable: false },

            ],
            "bLengthChange": false,
            "iDisplayLength": 1000,
            "paging": false,
            "language": {
                "url": "/js/German.json"
            },
            drawCallback: function (settings) {
                iqHomepartyCart.reInitModal();
            }
        });
        iqHomepartyCart.setDatabase('#datatable-homeparty');

    });
</script>