@extends('layouts.layout-2')

@section('content')


    <h4 class="font-weight-bold py-2 mb-2">
        {{ __('Vertriebspartner') }}
    </h4>

    <div class="card">
        <div class="card-datatable table-responsive">
            {{-- <div class="ml-4">
                <a href="{{ route('admin_lead_edit', ['new']) }}" class="btn btn-sm btn-primary">{{__('Neuen Vertriebspartner erstellen')}}</a>
            </div>--}}
            <table class="datatables-leads table table-striped table-bordered">

                <thead>
                <tr>
                    <th>#</th>
                    <th>{{__('E-Mail')}}</th>
                    <th>{{__('Vorname')}}</th>
                    <th>{{__('Nachname')}}</th>
                    <th>{{__('Level')}}</th>
                    <th>{{__('Mitglied')}}</th>
                    <th>{{__('bis')}}</th>
                    <th>{{__('Umsatz')}}</th>
                    <th>{{__('Sales')}}</th>
                    <th>{{__('verifiziert')}}</th>
                    <th>{{__('freigegeben')}}</th>
                    <th>{{__('Einv.')}}</th>
                </tr>
                </thead>
                <tbody>

                </tbody>

            </table>
    {{-- <div class="mt-4 ml-4">
        <a href="{{ route('admin_lead_edit', ['new']) }}" class="btn btn-sm btn-primary">{{__('Neuen Vertriebspartner erstellen')}}</a>
    </div> --}}
</div>
</div>

<script>
$( document ).ready(function() {

    $('.datatables-leads').dataTable({
        "processing": true,
        "serverSide": true,
        "ajax": '{!! route('admin_leads_datatable') !!}',
        "order": [[0, "desc" ]],
        "columns": [
            {data: 'id', searchable: false},
            { data: 'email', name: 'email' },
            { data: 'first_name', name: 'account.first_name' },
            { data: 'last_name', name: 'account.last_name' },
            { data: 'user_level', name: 'user_level' },
            { data: 'payment_account', name: 'payment_account' },
            { data: 'payment_account_date', name: 'payment_account_date' },
            { data: 'turnover', name: 'turnover' },
            { data: 'sales_total', name: 'sales_total' },
            { data: 'confirmed', name: 'confirmed' },
            { data: 'active', name: 'active' },
            { data: 'agreement', name: 'agreement' },
        ],
        "bLengthChange": false,
        "iDisplayLength": 50,
        "language": {
            "url": "/js/German.json"
        }
    });
});
</script>
@endsection

