118 lines
No EOL
5.7 KiB
PHP
118 lines
No EOL
5.7 KiB
PHP
@extends('layouts.layout-2')
|
|
|
|
@section('content')
|
|
|
|
|
|
<h4 class="font-weight-bold py-2 mb-2">
|
|
{{ __('Abos') }}
|
|
</h4>
|
|
<div class="card">
|
|
{{--
|
|
<div class="card-header">
|
|
<div class="form-row align-items-center">
|
|
<div class="col-sm-4 mb-2">
|
|
<label class="form-label" for="filter_user_shop_id">Filter zugewiesener Berater</label>
|
|
|
|
<select class="selectpicker" data-style="btn-default" name="filter_member_id" id="filter_member_id" data-live-search="true">
|
|
<option value="">Filter aus</option>
|
|
@foreach($filter_members as $member)
|
|
<option value="{{$member->id}}" @if(get_user_attr('filter_member_id') == $member->id) selected @endif>{{$member->first_name}} {{$member->last_name}} | {{$member->email}}</option>
|
|
@endforeach
|
|
</select>
|
|
</div>
|
|
|
|
|
|
|
|
<div class="col-10 col-sm-3 mb-2">
|
|
<label class="form-label" for="filter_status">Filter Status</label>
|
|
<select class="custom-select" name="filter_status" id="filter_status">
|
|
<option value="">Filter aus</option>
|
|
@foreach(\App\Services\AboHelper::getTransStatusFilterText() as $id=>$name)
|
|
<option value="{{$id}}" @if(get_user_attr('filter_status') == $id) selected @endif>{{$name}}</option>
|
|
@endforeach
|
|
</select>
|
|
</div>
|
|
|
|
<div class="col-2 col-sm-1 mb-2 mt-4">
|
|
<a href="{{ route('admin_sales_customers') }}?reset=filter" data-toggle="tooltip" data-placement="top" title="Reset Filter" class="btn icon-btn btn-sm btn-outline-dark float-right">
|
|
<span class="fa fa-sync"></span>
|
|
</a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
--}}
|
|
<div class="card-datatable table-responsive">
|
|
<table class="datatable-abos table table-striped table-bordered" id="datatable-abos">
|
|
<thead>
|
|
<tr>
|
|
<th>#</th>
|
|
<th>{{__('tables.start_date')}}</th>
|
|
<th>{{__('tables.next_date')}}</th>
|
|
<th>{{__('tables.abo_delivery_day')}}</th>
|
|
<th>{{__('tables.status')}}</th>
|
|
<th>{{__('tables.active')}}</th>
|
|
<th>{{__('tables.is_for')}}</th>
|
|
<th>{{__('First name')}}</th>
|
|
<th>{{__('Last name')}}</th>
|
|
<th>{{__('E-Mail')}}</th>
|
|
<th>{{__('tables.exc')}}</th>
|
|
<th>{{__('tables.amount')}}</th>
|
|
<th>{{__('tables.payment')}}</th>
|
|
<th>{{__('tables.adviser')}}</th>
|
|
<th>{{__('PayOneID')}}</th>
|
|
|
|
</tr>
|
|
</thead>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<script>
|
|
$( document ).ready(function() {
|
|
var oTable = $('#datatable-abos').DataTable({
|
|
"processing": true,
|
|
"serverSide": true,
|
|
ajax: {
|
|
url: '{!! route( 'admin_abos_datatable') !!}',
|
|
data: function(d) {
|
|
d.filter_member_id = $('select[name=filter_member_id]').val();
|
|
d.filter_user_shop_id = $('select[name=filter_user_shop_id]').val();
|
|
d.filter_status = $('select[name=filter_status]').val();
|
|
}
|
|
},
|
|
"order": [[0, "desc" ]],
|
|
"columns": [
|
|
{ data: 'id', searchable: false },
|
|
{ data: 'start_date', name: 'start_date', searchable: false },
|
|
{ data: 'next_date', name: 'next_date', searchable: false },
|
|
{ data: 'abo_interval', name: 'abo_interval', searchable: false },
|
|
{ data: 'status', name: 'status', searchable: false },
|
|
{ data: 'active', name: 'active', searchable: false },
|
|
{ data: 'is_for', name: 'is_for', searchable: false },
|
|
{ data: 'shopping_user.billing_firstname', name: 'shopping_user.billing_firstname' },
|
|
{ data: 'shopping_user.billing_lastname', name: 'shopping_user.billing_lastname' },
|
|
{ data: 'shopping_user.billing_email', name: 'shopping_user.billing_email' },
|
|
{ data: 'count', name: 'count', searchable: false },
|
|
{ data: 'amount', name: 'amount', searchable: false },
|
|
{ data: 'payment', name: 'payment', searchable: false, orderable: false },
|
|
{ data: 'member', name: 'member', searchable: false, orderable: false },
|
|
{ data: 'payone_userid', name: 'payone_userid', searchable: true },
|
|
|
|
],
|
|
"bLengthChange": false,
|
|
"iDisplayLength": 100,
|
|
"language": {
|
|
"url": "/js/datatables-{{ \App::getLocale() }}.json"
|
|
}
|
|
});
|
|
$('#filter_member_id').on('change', function(){
|
|
oTable.draw();
|
|
});
|
|
$('#filter_user_shop_id').on('change', function(){
|
|
oTable.draw();
|
|
});
|
|
$('#filter_txaction').on('change', function(){
|
|
oTable.draw();
|
|
});
|
|
});
|
|
</script>
|
|
@endsection |