10.April 2026
This commit is contained in:
parent
a00c42e770
commit
f58c709945
208 changed files with 19280 additions and 2914 deletions
|
|
@ -1,22 +1,30 @@
|
|||
@extends('layouts.layout-2')
|
||||
|
||||
@section('content')
|
||||
|
||||
<h4 class="font-weight-bold py-2 mb-2">
|
||||
<a href="{{route('admin_abos')}}" class="btn btn-sm btn-default float-right">{{ __('back') }}</a>
|
||||
{{ __('navigation.abo') }} <span class="text-muted">{{ '#'.$user_abo->payone_userid }}</span>
|
||||
<a href="{{ route('admin_abos') }}" class="btn btn-sm btn-default float-right">{{ __('back') }}</a>
|
||||
{{ __('navigation.abo') }} <span class="text-muted">{{ '#' . $user_abo->payone_userid }}</span>
|
||||
</h4>
|
||||
|
||||
|
||||
@if(Session::has('alert-error'))
|
||||
<div class="col-sm-12">
|
||||
<div class="alert alert-danger p-2 mt-2">
|
||||
<ul>
|
||||
<li>{{ Session::get('alert-error') }}</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
@if (Session::has('alert-error'))
|
||||
<div class="col-sm-12">
|
||||
<div class="alert alert-danger p-2 mt-2">
|
||||
<ul>
|
||||
<li>{{ Session::get('alert-error') }}</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
@if (Session::has('alert-warning'))
|
||||
<div class="col-sm-12">
|
||||
<div class="alert alert-warning p-2 mt-2">
|
||||
<ul>
|
||||
<li>{{ Session::get('alert-warning') }}</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
<div class="card">
|
||||
@include('admin.abo._detail')
|
||||
</div>
|
||||
|
|
@ -27,20 +35,24 @@
|
|||
@include('admin.customer._customer_detail', ['shopping_user' => $customer_detail])
|
||||
</div>
|
||||
|
||||
{!! Form::open(['action' => route('user_abos_update', [$view, $user_abo->id]), 'class' => 'form-horizontal', 'id'=>'cart-order-form']) !!}
|
||||
<input type="hidden" name="is_for" value="{{ $user_abo->is_for }}">
|
||||
<div class="card mt-3">
|
||||
@include('admin.abo._order_abo')
|
||||
{!! Form::open([
|
||||
'action' => route('user_abos_update', [$view, $user_abo->id]),
|
||||
'class' => 'form-horizontal',
|
||||
'id' => 'cart-order-form',
|
||||
]) !!}
|
||||
<input type="hidden" name="is_for" value="{{ $user_abo->is_for }}">
|
||||
<div class="card mt-3">
|
||||
@include('admin.abo._order_abo')
|
||||
</div>
|
||||
|
||||
@if ($comp_products && Yard::instance('shopping')->getNumComp() > 0)
|
||||
<div id="holder_html_view_comp_product">
|
||||
@include('user.order.comp_product')
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@if($comp_products && Yard::instance('shopping')->getNumComp() > 0)
|
||||
<div id="holder_html_view_comp_product">
|
||||
@include('user.order.comp_product')
|
||||
</div>
|
||||
@endif
|
||||
{{ Form::close() }}
|
||||
|
||||
{{ Form::close() }}
|
||||
|
||||
<div class="card mt-3">
|
||||
@include('admin.abo._initial_composition')
|
||||
</div>
|
||||
|
|
@ -54,48 +66,49 @@
|
|||
</div>
|
||||
|
||||
|
||||
<a href="{{route('admin_abos')}}" class="btn btn-sm btn-default mt-2 float-right">{{ __('back') }}</a>
|
||||
<a href="{{ route('admin_abos') }}" class="btn btn-sm btn-default mt-2 float-right">{{ __('back') }}</a>
|
||||
|
||||
<div class="modal fade" id="modal-confirm-add" tabindex="-1" role="dialog" aria-labelledby="modal-confirm-add-label" aria-hidden="true"
|
||||
data-title-add-only="{{ __('abo.confirm_add_title') }}"
|
||||
data-title-normal="{{ __('abo.confirm_add_title_normal') }}"
|
||||
data-warning-add-only="{{ __('abo.confirm_add_warning') }}"
|
||||
data-warning-normal="{{ __('abo.confirm_add_warning_normal') }}">
|
||||
<div class="modal-dialog" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title" id="modal-confirm-add-label"></h5>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="alert alert-warning mb-3">
|
||||
<i class="fa fa-exclamation-triangle"></i> <span id="confirm-add-warning-text"></span>
|
||||
<div class="modal fade" id="modal-confirm-add" tabindex="-1" role="dialog" aria-labelledby="modal-confirm-add-label"
|
||||
aria-hidden="true" data-title-add-only="{{ __('abo.confirm_add_title') }}"
|
||||
data-title-normal="{{ __('abo.confirm_add_title_normal') }}"
|
||||
data-warning-add-only="{{ __('abo.confirm_add_warning') }}"
|
||||
data-warning-normal="{{ __('abo.confirm_add_warning_normal') }}">
|
||||
<div class="modal-dialog" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title" id="modal-confirm-add-label"></h5>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="alert alert-warning mb-3">
|
||||
<i class="fa fa-exclamation-triangle"></i> <span id="confirm-add-warning-text"></span>
|
||||
</div>
|
||||
<table class="table table-sm mb-0">
|
||||
<tr>
|
||||
<td class="font-weight-bold">{{ __('order.article') }}:</td>
|
||||
<td id="confirm-add-product-name"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="font-weight-bold">{{ __('tables.price') }}:</td>
|
||||
<td id="confirm-add-product-price"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="font-weight-bold">{{ __('tables.quantity') }}:</td>
|
||||
<td id="confirm-add-qty-info"></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default"
|
||||
data-dismiss="modal">{{ __('abo.confirm_add_cancel') }}</button>
|
||||
<button type="button" class="btn btn-primary"
|
||||
id="confirm-add-btn">{{ __('abo.confirm_add_ok') }}</button>
|
||||
</div>
|
||||
<table class="table table-sm mb-0">
|
||||
<tr>
|
||||
<td class="font-weight-bold">{{ __('order.article') }}:</td>
|
||||
<td id="confirm-add-product-name"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="font-weight-bold">{{ __('tables.price') }}:</td>
|
||||
<td id="confirm-add-product-price"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="font-weight-bold">{{ __('tables.quantity') }}:</td>
|
||||
<td id="confirm-add-qty-info"></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">{{ __('abo.confirm_add_cancel') }}</button>
|
||||
<button type="button" class="btn btn-primary" id="confirm-add-btn">{{ __('abo.confirm_add_ok') }}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@endsection
|
||||
|
||||
@section('scripts')
|
||||
|
|
@ -107,4 +120,4 @@
|
|||
|
||||
|
||||
</script>
|
||||
@endsection
|
||||
@endsection
|
||||
|
|
|
|||
|
|
@ -9,33 +9,48 @@
|
|||
<div class="card mb-4">
|
||||
<h5 class="card-header">Struktur</h5>
|
||||
<div class="card-body">
|
||||
<button type="button" id="" data-save="navigation-structure" class="btn btn-primary nestable_list_menu_save">{{ __('save') }}</button>
|
||||
<button type="button" id="" data-save="navigation-structure"
|
||||
class="btn btn-primary nestable_list_menu_save">{{ __('save') }}</button>
|
||||
<hr>
|
||||
<div class="row">
|
||||
<div class="col-sm-6">
|
||||
<div class="white-box">
|
||||
<div class="custom-dd dd" id="nestable_list_1" data-href-save="{{ route('admin_downloadcenter_item_store', ['structure'])}}">
|
||||
<div class="custom-dd dd" id="nestable_list_1"
|
||||
data-href-save="{{ route('admin_downloadcenter_item_store', ['structure']) }}">
|
||||
<ol class="dd-list">
|
||||
@if(count($category_active))
|
||||
@foreach($category_active as $category)
|
||||
<li class="dd-item" data-id="{{ $category->id }}" data-name="{{ $category->slug }}">
|
||||
<span class="pull-right">
|
||||
<a href="#" class="btn btn-sm mt-1 nestable_update_btn" data-action="update-category-active" data-target="self" data-id="{{ $category->id }}" data-url="{{ route('admin_downloadcenter_item_store', ['update_ajax']) }}">
|
||||
@if($category->active) <i class="fa fa-eye text-success"></i> @else <i class="fa fa-eye-slash text-danger"></i> @endif
|
||||
</a>
|
||||
<a href="{{ route('admin_downloadcenter_item_delete', ['obj' => 'category', 'id'=> $category->id])}}" class="btn btn-sm mt-1 nestable_list_delete"><i class="fa fa-trash text-danger"></i></a>
|
||||
</span>
|
||||
@if (count($category_active))
|
||||
@foreach ($category_active as $category)
|
||||
<li class="dd-item" data-id="{{ $category->id }}"
|
||||
data-name="{{ $category->slug }}">
|
||||
<div style="display: inline-block;">
|
||||
<div class="ml-4">
|
||||
<a href="#"
|
||||
class="btn btn-sm mt-1 mt-0 nestable_update_btn"
|
||||
data-action="update-category-active" data-target="self"
|
||||
data-id="{{ $category->id }}"
|
||||
data-url="{{ route('admin_downloadcenter_item_store', ['update_ajax']) }}">
|
||||
@if ($category->active)
|
||||
<i class="fa fa-eye text-success"></i>
|
||||
@else
|
||||
<i class="fa fa-eye-slash text-danger"></i>
|
||||
@endif
|
||||
</a>
|
||||
<a href="{{ route('admin_downloadcenter_item_delete', ['obj' => 'category', 'id' => $category->id]) }}"
|
||||
class="btn btn-sm mt-1 mt-0 nestable_list_delete"><i
|
||||
class="fa fa-trash text-danger"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="dd-handle">
|
||||
<strong> {{ $category->name }} </strong>
|
||||
<strong> {{ $category->name }} </strong>
|
||||
</div>
|
||||
<ol class="dd-list">
|
||||
{!! \App\Services\DcHelper::makeNestableList($category->id) !!}
|
||||
{!! \App\Services\DcHelper::makeNestableList($category->id) !!}
|
||||
<li class="dd-item" data-id="0">
|
||||
</li>
|
||||
</ol>
|
||||
</li>
|
||||
@endforeach
|
||||
@endif
|
||||
@endforeach
|
||||
@endif
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -47,23 +62,27 @@
|
|||
<ol class="dd-list">
|
||||
<li class="dd-item" data-id="0">
|
||||
<div class="dd-handle dd-nodrag">
|
||||
<strong><em> Neue Tags </em></strong>
|
||||
<strong><em> Neue Tags </em></strong>
|
||||
</div>
|
||||
<ol class="dd-list">
|
||||
@if(count($tags_inactive))
|
||||
@foreach($tags_inactive as $tag)
|
||||
<li class="dd-item" data-id="{{ $tag->id }}">
|
||||
<span class="pull-right">
|
||||
<a href="{{ route('admin_downloadcenter_item_delete', ['obj' => 'tag', 'id'=> $tag->id])}}" class="btn btn-sm nestable_list_delete"><i class="fa fa-trash text-danger"></i></a>
|
||||
</span>
|
||||
<div class="dd-handle">
|
||||
{{ $tag->name }}
|
||||
</div>
|
||||
</li>
|
||||
@endforeach
|
||||
@endif
|
||||
@if (count($tags_inactive))
|
||||
@foreach ($tags_inactive as $tag)
|
||||
<li class="dd-item" data-id="{{ $tag->id }}">
|
||||
<div style="display: inline-block; width: 100%;">
|
||||
<div class="float-right">
|
||||
<a href="{{ route('admin_downloadcenter_item_delete', ['obj' => 'tag', 'id' => $tag->id]) }}"
|
||||
class="btn btn-sm nestable_list_delete"><i
|
||||
class="fa fa-trash text-danger"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="dd-handle">
|
||||
{{ $tag->name }}
|
||||
</div>
|
||||
</li>
|
||||
@endforeach
|
||||
@endif
|
||||
<li class="dd-item " data-id="0">
|
||||
|
||||
|
||||
</li>
|
||||
</ol>
|
||||
</li>
|
||||
|
|
@ -73,16 +92,20 @@
|
|||
</div>
|
||||
</div>
|
||||
<hr>
|
||||
<button type="button" id="" data-save="navigation-structure" class="btn btn-primary nestable_list_menu_save">{{ __('save') }}</button>
|
||||
<button type="button" id="" data-save="navigation-structure"
|
||||
class="btn btn-primary nestable_list_menu_save">{{ __('save') }}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="card mb-4">
|
||||
<div class="card-body">
|
||||
{!! Form::open(['action' => route('admin_downloadcenter_item_store', ['category']), 'class' => 'form-horizontal']) !!}
|
||||
{!! Form::open([
|
||||
'action' => route('admin_downloadcenter_item_store', ['category']),
|
||||
'class' => 'form-horizontal',
|
||||
]) !!}
|
||||
<label class="form-label" for="dc_category_name">Neue Katagorie anlegen</label>
|
||||
{{ Form::text('dc_category_name', '', array('placeholder'=>'Bezeichung Katagorie', 'class'=>'form-control', 'id'=>'dc_category_name')) }}
|
||||
{{ Form::text('dc_category_name', '', ['placeholder' => 'Bezeichung Katagorie', 'class' => 'form-control', 'id' => 'dc_category_name']) }}
|
||||
<button type="submit" class="btn btn-submit mt-4">{{ __('save') }}</button>
|
||||
{!! Form::close() !!}
|
||||
<br>
|
||||
|
|
@ -90,7 +113,7 @@
|
|||
<br>
|
||||
{!! Form::open(['action' => route('admin_downloadcenter_item_store', ['tag']), 'class' => 'form-horizontal']) !!}
|
||||
<label class="form-label" for="dc_tag_name">Neuen Tag anlegen</label>
|
||||
{{ Form::text('dc_tag_name', '', array('placeholder'=>'Bezeichung Tag', 'class'=>'form-control', 'id'=>'dc_tag_name')) }}
|
||||
{{ Form::text('dc_tag_name', '', ['placeholder' => 'Bezeichung Tag', 'class' => 'form-control', 'id' => 'dc_tag_name']) }}
|
||||
<button type="submit" class="btn btn-submit mt-4">{{ __('save') }}</button>
|
||||
{!! Form::close() !!}
|
||||
<br>
|
||||
|
|
@ -101,19 +124,18 @@
|
|||
@endsection
|
||||
|
||||
@section('styles')
|
||||
<link rel="stylesheet" href="/vendor/libs/nestable/nestable.css">
|
||||
<style>
|
||||
.dd-list {
|
||||
min-width: auto;
|
||||
}
|
||||
.dd-nodrag{
|
||||
pointer-events: none;
|
||||
}
|
||||
</style>
|
||||
<link rel="stylesheet" href="/vendor/libs/nestable/nestable.css">
|
||||
<style>
|
||||
.dd-list {
|
||||
min-width: auto;
|
||||
}
|
||||
|
||||
.dd-nodrag {
|
||||
pointer-events: none;
|
||||
}
|
||||
</style>
|
||||
@endsection
|
||||
@section('scripts')
|
||||
|
||||
<script src="/vendor/libs/nestable/jquery-nestable-full.js?v=1"></script>
|
||||
<script src="/js/nestable-init.js?v=1"></script>
|
||||
|
||||
@endsection
|
||||
<script src="/vendor/libs/nestable/jquery-nestable-full.js?v=1"></script>
|
||||
<script src="/js/nestable-init.js?v=1"></script>
|
||||
@endsection
|
||||
|
|
|
|||
214
resources/views/admin/incentive/_form.blade.php
Normal file
214
resources/views/admin/incentive/_form.blade.php
Normal file
|
|
@ -0,0 +1,214 @@
|
|||
@if ($errors->any())
|
||||
<div class="alert alert-danger">
|
||||
<ul class="mb-0">
|
||||
@foreach ($errors->all() as $error)
|
||||
<li>{{ $error }}</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
{{-- ===== KONFIGURATION ===== --}}
|
||||
<div class="card mb-4">
|
||||
<div class="card-header">
|
||||
<i class="ion ion-md-settings mr-1"></i>
|
||||
<strong>{{ __('incentive.configuration') }}</strong>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
|
||||
<div class="form-row">
|
||||
<div class="form-group col-md-8">
|
||||
<label for="name">{{ __('incentive.name') }} *</label>
|
||||
<input type="text" class="form-control" id="name" name="name"
|
||||
value="{{ old('name', $incentive->name ?? '') }}" required>
|
||||
<small class="form-text text-muted">{{ __('incentive.name_help') }}</small>
|
||||
</div>
|
||||
<div class="form-group col-md-4">
|
||||
<label for="status">{{ __('incentive.status') }} *</label>
|
||||
<select class="custom-select" id="status" name="status" required>
|
||||
@foreach (\App\Models\Incentive::$statusTypes as $key => $label)
|
||||
<option value="{{ $key }}" @if (old('status', $incentive->status ?? 0) == $key) selected @endif>
|
||||
{{ __('incentive.status_' . $label) }}
|
||||
</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-row">
|
||||
<div class="form-group col-md-4">
|
||||
<label for="qualification_start">{{ __('incentive.qualification_start') }} *</label>
|
||||
{!! Form::text(
|
||||
'qualification_start',
|
||||
old(
|
||||
'qualification_start',
|
||||
isset($incentive->qualification_start) ? $incentive->qualification_start->format('d.m.Y') : '',
|
||||
),
|
||||
[
|
||||
'class' => 'form-control datepicker-base',
|
||||
'required' => true,
|
||||
],
|
||||
) !!}
|
||||
</div>
|
||||
<div class="form-group col-md-4">
|
||||
<label for="qualification_end">{{ __('incentive.qualification_end') }} *</label>
|
||||
{!! Form::text(
|
||||
'qualification_end',
|
||||
old(
|
||||
'qualification_end',
|
||||
isset($incentive->qualification_end) ? $incentive->qualification_end->format('d.m.Y') : '',
|
||||
),
|
||||
[
|
||||
'class' => 'form-control datepicker-base',
|
||||
'required' => true,
|
||||
],
|
||||
) !!}
|
||||
</div>
|
||||
<div class="form-group col-md-4">
|
||||
<label for="calculation_end">{{ __('incentive.calculation_end') }} *</label>
|
||||
{!! Form::text(
|
||||
'calculation_end',
|
||||
old('calculation_end', isset($incentive->calculation_end) ? $incentive->calculation_end->format('d.m.Y') : ''),
|
||||
[
|
||||
'class' => 'form-control datepicker-base',
|
||||
'required' => true,
|
||||
],
|
||||
) !!}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-row">
|
||||
<div class="form-group col-md-4">
|
||||
<label for="points_partner_onetime">{{ __('incentive.points_partner_onetime') }} *</label>
|
||||
<input type="number" class="form-control" id="points_partner_onetime" name="points_partner_onetime"
|
||||
value="{{ old('points_partner_onetime', $incentive->points_partner_onetime ?? 600) }}"
|
||||
min="0" required>
|
||||
</div>
|
||||
<div class="form-group col-md-4">
|
||||
<label for="points_abo_onetime">{{ __('incentive.points_abo_onetime') }} *</label>
|
||||
<input type="number" class="form-control" id="points_abo_onetime" name="points_abo_onetime"
|
||||
value="{{ old('points_abo_onetime', $incentive->points_abo_onetime ?? 400) }}" min="0"
|
||||
required>
|
||||
</div>
|
||||
<div class="form-group col-md-4">
|
||||
<label for="max_winners">{{ __('incentive.max_winners') }} *</label>
|
||||
<input type="number" class="form-control" id="max_winners" name="max_winners"
|
||||
value="{{ old('max_winners', $incentive->max_winners ?? 30) }}" min="1" required>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-row">
|
||||
<div class="form-group col-md-6">
|
||||
<label for="min_direct_partners">{{ __('incentive.min_direct_partners') }} *</label>
|
||||
<input type="number" class="form-control" id="min_direct_partners" name="min_direct_partners"
|
||||
value="{{ old('min_direct_partners', $incentive->min_direct_partners ?? 4) }}" min="0"
|
||||
required>
|
||||
</div>
|
||||
<div class="form-group col-md-6">
|
||||
<label for="min_customer_abos">{{ __('incentive.min_customer_abos') }} *</label>
|
||||
<input type="number" class="form-control" id="min_customer_abos" name="min_customer_abos"
|
||||
value="{{ old('min_customer_abos', $incentive->min_customer_abos ?? 6) }}" min="0" required>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group mb-0">
|
||||
<label for="image">{{ __('incentive.image') }}</label>
|
||||
<input type="text" class="form-control" id="image" name="image"
|
||||
value="{{ old('image', $incentive->image ?? '') }}">
|
||||
<small class="form-text text-muted">{{ __('incentive.image_help') }}</small>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{-- ===== INHALTE: DEUTSCH (Standard) ===== --}}
|
||||
<div class="card mb-4">
|
||||
<div class="card-header bg-primary text-white">
|
||||
<i class="ion ion-md-flag mr-1"></i>
|
||||
<strong>{{ __('incentive.content_lang_de') }}</strong>
|
||||
<span class="badge badge-light ml-1">{{ __('incentive.default_language') }}</span>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
|
||||
<div class="form-group">
|
||||
<label for="subtitle">{{ __('incentive.subtitle') }}</label>
|
||||
<input type="text" class="form-control" id="subtitle" name="subtitle"
|
||||
value="{{ old('subtitle', $incentive->subtitle ?? '') }}"
|
||||
placeholder="{{ __('incentive.subtitle_placeholder') }}">
|
||||
<small class="form-text text-muted">{{ __('incentive.subtitle_help') }}</small>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="description">
|
||||
<i class="ion ion-md-text mr-1"></i>
|
||||
{{ __('incentive.description') }}
|
||||
</label>
|
||||
<textarea class="form-control summernote-small" id="description" name="description" rows="6">{{ old('description', $incentive->description ?? '') }}</textarea>
|
||||
<small class="form-text text-muted">{{ __('incentive.description_help') }}</small>
|
||||
</div>
|
||||
|
||||
<div class="form-group mb-0">
|
||||
<label for="terms">
|
||||
<i class="ion ion-md-document mr-1"></i>
|
||||
{{ __('incentive.terms') }}
|
||||
</label>
|
||||
<textarea class="form-control summernote-small" id="terms" name="terms" rows="8">{{ old('terms', $incentive->terms ?? '') }}</textarea>
|
||||
<small class="form-text text-muted">{{ __('incentive.terms_help') }}</small>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{-- ===== INHALTE: WEITERE SPRACHEN ===== --}}
|
||||
@foreach ($languages as $locale => $localeData)
|
||||
@if ($locale !== 'de')
|
||||
<div class="card mb-4">
|
||||
<div class="card-header">
|
||||
<i class="ion ion-md-flag mr-1"></i>
|
||||
<strong>{{ $localeData['native'] }}</strong>
|
||||
<span class="badge badge-secondary ml-1">{{ strtoupper($locale) }}</span>
|
||||
<small class="text-muted ml-2">{{ __('incentive.lang_fallback_hint') }}</small>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
@php $existingIncentive = $incentive ?? null; @endphp
|
||||
|
||||
<div class="form-group">
|
||||
<label for="trans_name_{{ $locale }}">{{ __('incentive.name') }}</label>
|
||||
<input type="text" class="form-control" id="trans_name_{{ $locale }}"
|
||||
name="trans_name_{{ $locale }}"
|
||||
value="{{ old('trans_name_' . $locale, $existingIncentive ? $existingIncentive->getTrans('name', $locale) : '') }}"
|
||||
placeholder="{{ $existingIncentive->name ?? '' }}">
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="trans_subtitle_{{ $locale }}">{{ __('incentive.subtitle') }}</label>
|
||||
<input type="text" class="form-control" id="trans_subtitle_{{ $locale }}"
|
||||
name="trans_subtitle_{{ $locale }}"
|
||||
value="{{ old('trans_subtitle_' . $locale, $existingIncentive ? $existingIncentive->getTrans('subtitle', $locale) : '') }}"
|
||||
placeholder="{{ $existingIncentive->subtitle ?? __('incentive.subtitle_placeholder') }}">
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="trans_description_{{ $locale }}">
|
||||
<i class="ion ion-md-text mr-1"></i>
|
||||
{{ __('incentive.description') }}
|
||||
</label>
|
||||
<textarea class="form-control summernote-small" id="trans_description_{{ $locale }}"
|
||||
name="trans_description_{{ $locale }}" rows="6">{{ old('trans_description_' . $locale, $existingIncentive ? $existingIncentive->getTrans('description', $locale) : '') }}</textarea>
|
||||
</div>
|
||||
|
||||
<div class="form-group mb-0">
|
||||
<label for="trans_terms_{{ $locale }}">
|
||||
<i class="ion ion-md-document mr-1"></i>
|
||||
{{ __('incentive.terms') }}
|
||||
</label>
|
||||
<textarea class="form-control summernote-small" id="trans_terms_{{ $locale }}" name="trans_terms_{{ $locale }}"
|
||||
rows="8">{{ old('trans_terms_' . $locale, $existingIncentive ? $existingIncentive->getTrans('terms', $locale) : '') }}</textarea>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
@endforeach
|
||||
|
||||
<hr class="mb-3">
|
||||
|
|
@ -0,0 +1,61 @@
|
|||
{{-- Zusammenfassung --}}
|
||||
<div class="row mb-3">
|
||||
<div class="col-md-3">
|
||||
<div class="card text-center bg-light">
|
||||
<div class="card-body py-2">
|
||||
<small class="text-muted">{{ __('incentive.total_points') }}</small>
|
||||
<h4 class="mb-0 font-weight-bold">{{ number_format($participant->total_points, 0, ',', '.') }}</h4>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<div class="card text-center bg-light">
|
||||
<div class="card-body py-2">
|
||||
<small class="text-muted">{{ __('incentive.rank') }}</small>
|
||||
<h4 class="mb-0 font-weight-bold">{{ $participant->rank ?? '-' }}</h4>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<div class="card text-center bg-light">
|
||||
<div class="card-body py-2">
|
||||
<small class="text-muted">{{ __('incentive.partners') }}</small>
|
||||
<h4 class="mb-0 font-weight-bold {{ $participant->qualified_partners >= $incentive->min_direct_partners ? 'text-success' : 'text-danger' }}">
|
||||
{{ $participant->qualified_partners }}/{{ $incentive->min_direct_partners }}
|
||||
</h4>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<div class="card text-center bg-light">
|
||||
<div class="card-body py-2">
|
||||
<small class="text-muted">{{ __('incentive.abos') }}</small>
|
||||
<h4 class="mb-0 font-weight-bold {{ $participant->qualified_abos >= $incentive->min_customer_abos ? 'text-success' : 'text-danger' }}">
|
||||
{{ $participant->qualified_abos }}/{{ $incentive->min_customer_abos }}
|
||||
</h4>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{-- Sektion A: Neupartner-Punkte --}}
|
||||
<h6 class="font-weight-bold">{{ __('incentive.section_partners') }}</h6>
|
||||
<div class="mb-3">
|
||||
@include('partials.incentive._source_table', [
|
||||
'sources' => $partner_sources,
|
||||
'type' => 'partner',
|
||||
'label_header' => __('incentive.new_partner'),
|
||||
'date_header' => __('incentive.entry_date'),
|
||||
'empty_message' => __('incentive.no_partners_yet'),
|
||||
])
|
||||
</div>
|
||||
|
||||
{{-- Sektion B: Kundenabo-Punkte --}}
|
||||
<h6 class="font-weight-bold">{{ __('incentive.section_abos') }}</h6>
|
||||
@include('partials.incentive._source_table', [
|
||||
'sources' => $abo_sources,
|
||||
'type' => 'abo',
|
||||
'label_header' => __('incentive.customer_abo'),
|
||||
'date_header' => __('incentive.abo_date'),
|
||||
'empty_message' => __('incentive.no_abos_yet'),
|
||||
])
|
||||
18
resources/views/admin/incentive/create.blade.php
Normal file
18
resources/views/admin/incentive/create.blade.php
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
@extends('layouts.layout-2')
|
||||
|
||||
@section('content')
|
||||
<h4 class="font-weight-bold py-2 mb-2">
|
||||
{{ __('incentive.create') }}
|
||||
</h4>
|
||||
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<form action="{{ route('admin_incentive_store') }}" method="POST">
|
||||
@csrf
|
||||
@include('admin.incentive._form')
|
||||
<button type="submit" class="btn btn-success">{{ __('incentive.save') }}</button>
|
||||
<a href="{{ route('admin_incentives') }}" class="btn btn-default">{{ __('incentive.cancel') }}</a>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
18
resources/views/admin/incentive/edit.blade.php
Normal file
18
resources/views/admin/incentive/edit.blade.php
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
@extends('layouts.layout-2')
|
||||
|
||||
@section('content')
|
||||
<h4 class="font-weight-bold py-2 mb-2">
|
||||
{{ __('incentive.edit') }}: {{ $incentive->name }}
|
||||
</h4>
|
||||
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<form action="{{ route('admin_incentive_update', [$incentive->id]) }}" method="POST">
|
||||
@csrf
|
||||
@include('admin.incentive._form', ['incentive' => $incentive])
|
||||
<button type="submit" class="btn btn-success">{{ __('incentive.save') }}</button>
|
||||
<a href="{{ route('admin_incentive_show', [$incentive->id]) }}" class="btn btn-default">{{ __('incentive.cancel') }}</a>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
51
resources/views/admin/incentive/index.blade.php
Normal file
51
resources/views/admin/incentive/index.blade.php
Normal file
|
|
@ -0,0 +1,51 @@
|
|||
@extends('layouts.layout-2')
|
||||
|
||||
@section('content')
|
||||
<h4 class="font-weight-bold py-2 mb-2">
|
||||
{{ __('incentive.incentives') }}
|
||||
<a href="{{ route('admin_incentive_create') }}" class="btn btn-sm btn-success float-right">
|
||||
<span class="fa fa-plus"></span> {{ __('incentive.create') }}
|
||||
</a>
|
||||
</h4>
|
||||
<div class="card">
|
||||
<div class="card-datatable table-responsive">
|
||||
<table class="table table-striped table-bordered" id="datatable-incentives">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>#</th>
|
||||
<th>{{ __('incentive.name') }}</th>
|
||||
<th>{{ __('incentive.status') }}</th>
|
||||
<th>{{ __('incentive.period') }}</th>
|
||||
<th>{{ __('incentive.participants') }}</th>
|
||||
<th>{{ __('incentive.actions') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$('#datatable-incentives').DataTable({
|
||||
"processing": true,
|
||||
"serverSide": true,
|
||||
ajax: {
|
||||
url: '{!! route('admin_incentives_datatable') !!}'
|
||||
},
|
||||
"order": [[0, "desc"]],
|
||||
"columns": [
|
||||
{ data: 'id', name: 'id' },
|
||||
{ data: 'name', name: 'name' },
|
||||
{ data: 'status_label', name: 'status_label', searchable: false },
|
||||
{ data: 'period', name: 'period', searchable: false, orderable: false },
|
||||
{ data: 'participants_count', name: 'participants_count', searchable: false, orderable: false },
|
||||
{ data: 'action', name: 'action', searchable: false, orderable: false }
|
||||
],
|
||||
"bLengthChange": false,
|
||||
"iDisplayLength": 50,
|
||||
"language": {
|
||||
"url": "/js/datatables-{{ \App::getLocale() }}.json"
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@endsection
|
||||
191
resources/views/admin/incentive/show.blade.php
Normal file
191
resources/views/admin/incentive/show.blade.php
Normal file
|
|
@ -0,0 +1,191 @@
|
|||
@extends('layouts.layout-2')
|
||||
|
||||
@section('content')
|
||||
<h4 class="font-weight-bold py-2 mb-2">
|
||||
{{ $incentive->name }}
|
||||
<span class="badge badge-{{ $incentive->getStatusColor() }}">{{ $incentive->getStatusType() }}</span>
|
||||
<div class="float-right">
|
||||
<a href="{{ route('admin_incentive_edit', [$incentive->id]) }}" class="btn btn-sm btn-warning">
|
||||
<span class="fa fa-edit"></span> {{ __('incentive.edit') }}
|
||||
</a>
|
||||
{{-- <form action="{{ route('admin_incentive_recalculate', [$incentive->id]) }}" method="POST" class="d-inline">
|
||||
@csrf
|
||||
<button type="submit" class="btn btn-sm btn-info" onclick="return confirm('{{ __('incentive.recalculate_confirm') }}')">
|
||||
<span class="fa fa-sync"></span> {{ __('incentive.recalculate') }}
|
||||
</button>
|
||||
</form>
|
||||
<form action="{{ route('admin_incentive_recalculate', [$incentive->id]) }}" method="POST" class="d-inline">
|
||||
@csrf
|
||||
<input type="hidden" name="force" value="1">
|
||||
<button type="submit" class="btn btn-sm btn-danger" onclick="return confirm('{{ __('incentive.force_recalculate_confirm') }}')">
|
||||
<span class="fa fa-redo"></span> {{ __('incentive.force_recalculate') }}
|
||||
</button>
|
||||
</form> --}}
|
||||
</div>
|
||||
</h4>
|
||||
|
||||
{{-- Konfiguration --}}
|
||||
<div class="card mb-4">
|
||||
<div class="card-header">{{ __('incentive.configuration') }}</div>
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<strong>{{ __('incentive.qualification_start') }}:</strong>
|
||||
{{ $incentive->qualification_start->format('d.m.Y') }}<br>
|
||||
<strong>{{ __('incentive.qualification_end') }}:</strong>
|
||||
{{ $incentive->qualification_end->format('d.m.Y') }}<br>
|
||||
<strong>{{ __('incentive.calculation_end') }}:</strong>
|
||||
{{ $incentive->calculation_end->format('d.m.Y') }}
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<strong>{{ __('incentive.points_partner_onetime') }}:</strong>
|
||||
{{ $incentive->points_partner_onetime }}<br>
|
||||
<strong>{{ __('incentive.points_abo_onetime') }}:</strong> {{ $incentive->points_abo_onetime }}<br>
|
||||
<strong>{{ __('incentive.max_winners') }}:</strong> {{ $incentive->max_winners }}
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<strong>{{ __('incentive.min_direct_partners') }}:</strong> {{ $incentive->min_direct_partners }}<br>
|
||||
<strong>{{ __('incentive.min_customer_abos') }}:</strong> {{ $incentive->min_customer_abos }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{-- Ranking --}}
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
{{ __('incentive.ranking') }} ({{ $participants->count() }} {{ __('incentive.participants') }})
|
||||
</div>
|
||||
<div class="card-body p-0">
|
||||
<table class="table table-striped table-bordered mb-0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{ __('incentive.rank') }}</th>
|
||||
<th>{{ __('incentive.consultant') }}</th>
|
||||
<th>E-Mail</th>
|
||||
<th>{{ __('incentive.admin_terms_accepted') }}</th>
|
||||
<th>{{ __('incentive.total_points') }}</th>
|
||||
<th>{{ __('incentive.partners') }}</th>
|
||||
<th>{{ __('incentive.abos') }}</th>
|
||||
<th>{{ __('incentive.qualified') }}</th>
|
||||
<th>{{ __('incentive.status') }}</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@forelse($participants as $p)
|
||||
@php
|
||||
$isWinner = $p->is_qualified && $p->rank && $p->rank <= $incentive->max_winners;
|
||||
@endphp
|
||||
<tr
|
||||
class="{{ $isWinner ? 'table-success font-weight-bold' : ($p->is_qualified ? 'font-weight-bold' : '') }}">
|
||||
<td>{{ $p->rank ?? '—' }}</td>
|
||||
<td>
|
||||
@if ($p->user && $p->user->account)
|
||||
{{ $p->user->account->first_name }} {{ $p->user->account->last_name }}
|
||||
@else
|
||||
{{ $p->user->email ?? 'N/A' }}
|
||||
@endif
|
||||
</td>
|
||||
<td>{{ $p->user->email ?? '' }}</td>
|
||||
<td>
|
||||
@if ($p->accepted_terms_at)
|
||||
<span class="badge badge-success">{{ __('incentive.yes') }}</span>
|
||||
<span class="text-muted small d-block"
|
||||
title="{{ __('incentive.admin_terms_accepted_at_tooltip') }}">{{ $p->accepted_terms_at->format('d.m.Y H:i') }}</span>
|
||||
@else
|
||||
<span class="badge badge-secondary">{{ __('incentive.admin_terms_pending') }}</span>
|
||||
@endif
|
||||
</td>
|
||||
<td>{{ number_format($p->total_points, 0, ',', '.') }}</td>
|
||||
<td>
|
||||
{{ $p->qualified_partners }}/{{ $incentive->min_direct_partners }}
|
||||
@if ($p->qualified_partners >= $incentive->min_direct_partners)
|
||||
<span class="text-success">✓</span>
|
||||
@endif
|
||||
</td>
|
||||
<td>
|
||||
{{ $p->qualified_abos }}/{{ $incentive->min_customer_abos }}
|
||||
@if ($p->qualified_abos >= $incentive->min_customer_abos)
|
||||
<span class="text-success">✓</span>
|
||||
@endif
|
||||
</td>
|
||||
<td>
|
||||
@if ($p->is_qualified)
|
||||
<span class="badge badge-success">{{ __('incentive.yes') }}</span>
|
||||
@else
|
||||
<span class="badge badge-secondary">{{ __('incentive.no') }}</span>
|
||||
@endif
|
||||
</td>
|
||||
<td>
|
||||
@if ($isWinner)
|
||||
<span class="badge badge-warning">{{ __('incentive.winner') }}</span>
|
||||
@elseif($p->is_qualified)
|
||||
<span class="badge badge-info">{{ __('incentive.qualified') }}</span>
|
||||
@else
|
||||
<span class="badge badge-secondary">{{ __('incentive.open') }}</span>
|
||||
@endif
|
||||
</td>
|
||||
<td>
|
||||
<button type="button" class="btn btn-sm btn-outline-primary btn-participant-details"
|
||||
data-participant-id="{{ $p->id }}"
|
||||
data-participant-name="{{ $p->user && $p->user->account ? $p->user->account->first_name . ' ' . $p->user->account->last_name : ($p->user->email ?? 'N/A') }}">
|
||||
<span class="fa fa-eye"></span>
|
||||
</button>
|
||||
</td>
|
||||
</tr>
|
||||
@empty
|
||||
<tr>
|
||||
<td colspan="10" class="text-center text-muted">{{ __('incentive.no_participants') }}</td>
|
||||
</tr>
|
||||
@endforelse
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
{{-- Modal: Teilnehmer-Details --}}
|
||||
<div class="modal fade" id="participantDetailsModal" tabindex="-1" role="dialog">
|
||||
<div class="modal-dialog modal-xl" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title">{{ __('incentive.calculation_details') }}: <span
|
||||
id="modalParticipantName"></span></h5>
|
||||
<button type="button" class="close" data-dismiss="modal"><span>×</span></button>
|
||||
</div>
|
||||
<div class="modal-body" id="modalParticipantBody">
|
||||
<div class="text-center py-4">
|
||||
<div class="spinner-border text-primary" role="status">
|
||||
<span class="sr-only">Loading...</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary"
|
||||
data-dismiss="modal">{{ __('incentive.close') }}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@section('scripts')
|
||||
<script>
|
||||
$(document).on('click', '.btn-participant-details', function() {
|
||||
var participantId = $(this).data('participant-id');
|
||||
var participantName = $(this).data('participant-name');
|
||||
|
||||
$('#modalParticipantName').text(participantName);
|
||||
$('#modalParticipantBody').html(
|
||||
'<div class="text-center py-4"><div class="spinner-border text-primary" role="status"><span class="sr-only">Loading...</span></div></div>'
|
||||
);
|
||||
$('#participantDetailsModal').modal('show');
|
||||
|
||||
$.get('{{ url('/admin/incentives/participant') }}/' + participantId + '/details', function(html) {
|
||||
$('#modalParticipantBody').html(html);
|
||||
}).fail(function() {
|
||||
$('#modalParticipantBody').html(
|
||||
'<div class="alert alert-danger">Fehler beim Laden der Details.</div>');
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@endsection
|
||||
|
|
@ -1,50 +1,47 @@
|
|||
@extends('layouts.layout-2')
|
||||
|
||||
@section('content')
|
||||
|
||||
<style>
|
||||
.td-entry-table-margin {
|
||||
padding-bottom: 6px;
|
||||
border-bottom: 1px solid rgb(221, 221, 221);
|
||||
margin-bottom: 6px;
|
||||
}
|
||||
</style>
|
||||
<style>
|
||||
.td-entry-table-margin {
|
||||
padding-bottom: 6px;
|
||||
border-bottom: 1px solid rgb(221, 221, 221);
|
||||
margin-bottom: 6px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div class="card">
|
||||
<h5 class="card-header">
|
||||
Guthaben offen
|
||||
<div class="float-right">
|
||||
<button type="button" class="btn btn-sm btn-primary" data-toggle="modal" data-target="#modals-load-content"
|
||||
data-id="new"
|
||||
data-action="add-user-credit"
|
||||
data-back="{{url()->current()}}"
|
||||
data-id="new" data-action="add-user-credit" data-back="{{ url()->current() }}"
|
||||
data-route="{{ route('modal_load') }}"><span class="fa fa-plus-circle"></span> Guthaben hinzufügen
|
||||
</button>
|
||||
</div>
|
||||
</h5>
|
||||
|
||||
@if(isset($add_credit_error) && $add_credit_error)
|
||||
<div class="col-sm-12">
|
||||
<div class="alert alert-danger p-2 mt-2">
|
||||
<ul>
|
||||
<li>{{ $add_credit_error }}</li>
|
||||
</ul>
|
||||
@if (isset($add_credit_error) && $add_credit_error)
|
||||
<div class="col-sm-12">
|
||||
<div class="alert alert-danger p-2 mt-2">
|
||||
<ul>
|
||||
<li>{{ $add_credit_error }}</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<div class="card-datatable table-responsive pt-0">
|
||||
<table class="datatables-style table table-striped table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{__('Account ID')}}</th>
|
||||
<th>{{__('First name')}}</th>
|
||||
<th>{{__('Last name') }}</th>
|
||||
<th>{{__('E-Mail') }}</th>
|
||||
<th>{{__('Betrag') }}</th>
|
||||
<th>{{__('Guthaben')}}</th>
|
||||
<th>{{__('#')}}</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{{ __('Account ID') }}</th>
|
||||
<th>{{ __('First name') }}</th>
|
||||
<th>{{ __('Last name') }}</th>
|
||||
<th>{{ __('E-Mail') }}</th>
|
||||
<th>{{ __('Betrag') }}</th>
|
||||
<th>{{ __('Guthaben') }}</th>
|
||||
<th>{{ __('#') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($user_credit_items as $user_credit_item)
|
||||
|
|
@ -57,28 +54,29 @@
|
|||
<td>
|
||||
@foreach ($user_credit_item['entries'] as $key => $credit)
|
||||
<div class="td-entry-table-margin">
|
||||
<i class="fa fa-plus-circle text-secondary"></i>
|
||||
{!! formatNumber($credit->credit) !!} € |
|
||||
<i class="fa fa-plus-circle text-secondary"></i>
|
||||
{!! formatNumber($credit->credit) !!} € |
|
||||
{{ formatTextWithLineBreaks($credit->message, true) }}
|
||||
/ {{ $credit->created_at->format("d.m.Y") }}
|
||||
@if($deleteTime = $credit->deleteTime())
|
||||
/ <span class="no-line-break">
|
||||
<a class="btn btn-danger btn-xs" href="{{ route('admin_payments_credit_delete', [$credit->id, 'user_credit_item']) }}" onclick="return confirm('Wirklich löschen?');">
|
||||
<i class="ion ion-ios-trash"></i>
|
||||
</a> noch {{ $deleteTime }} min.
|
||||
</span>
|
||||
@endif
|
||||
/ {{ $credit->created_at->format('d.m.Y') }}
|
||||
@if ($deleteTime = $credit->deleteTime())
|
||||
/ <span class="no-line-break">
|
||||
<a class="btn btn-danger btn-xs"
|
||||
href="{{ route('admin_payments_credit_delete', [$credit->id, 'user_credit_item']) }}"
|
||||
onclick="return confirm('Wirklich löschen?');">
|
||||
<i class="ion ion-ios-trash"></i>
|
||||
</a> noch {{ $deleteTime }} min.
|
||||
</span>
|
||||
@endif
|
||||
</div>
|
||||
@endforeach
|
||||
</td>
|
||||
<td>
|
||||
<button type="button" class="btn btn-sm btn-secondary" data-toggle="modal" data-target="#modals-credit"
|
||||
data-userid="{{ $user_credit_item['user_id'] }}"
|
||||
data-email="{{ $user_credit_item['email'] }}"
|
||||
data-back="{{url()->current()}}"
|
||||
<button type="button" class="btn btn-sm btn-secondary" data-toggle="modal"
|
||||
data-target="#modals-credit" data-userid="{{ $user_credit_item['user_id'] }}"
|
||||
data-email="{{ $user_credit_item['email'] }}" data-back="{{ url()->current() }}"
|
||||
data-action="create_credit">
|
||||
<span class="fa fa-dollar-sign"></span> <strong>Guthaben auszahlen</strong>
|
||||
</button>
|
||||
<span class="fa fa-dollar-sign"></span> <strong>Guthaben auszahlen</strong>
|
||||
</button>
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
|
|
@ -88,147 +86,242 @@
|
|||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="card mt-3">
|
||||
|
||||
<div class="card mt-3 mb-3" id="credit-stats-card">
|
||||
<div class="card-body py-3">
|
||||
<div class="row align-items-center">
|
||||
<div class="col-auto text-muted small">
|
||||
<i class="fa fa-chart-bar mr-1"></i> Statistik:
|
||||
<span class="font-weight-bold text-dark" id="stats-credit-period">
|
||||
{{ $filter_months[session('credit_filter_month')] ?? '' }} {{ session('credit_filter_year') }}
|
||||
</span>
|
||||
</div>
|
||||
<div class="col text-right d-flex justify-content-end">
|
||||
<div class="mr-4 text-center">
|
||||
<div class="text-muted" style="font-size:0.75rem;">Anzahl Gutschriften</div>
|
||||
<div class="h5 mb-0 font-weight-bold text-primary" id="stats-credit-count">
|
||||
<i class="fa fa-spinner fa-spin fa-sm"></i>
|
||||
</div>
|
||||
</div>
|
||||
<div class="text-center">
|
||||
<div class="text-muted" style="font-size:0.75rem;">Gesamtsumme</div>
|
||||
<div class="h5 mb-0 font-weight-bold text-success" id="stats-credit-total">
|
||||
<i class="fa fa-spinner fa-spin fa-sm"></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card mt-0">
|
||||
<h5 class="card-header">
|
||||
Gutschriften / Auszahlungen
|
||||
Gutschriften / Auszahlungen
|
||||
</h5>
|
||||
<div class="card-body p-0">
|
||||
{!! Form::open(['action' => route('admin_payments_credit'), 'class' => 'form-horizontal', 'id'=>'form_filter_payment_credits']) !!}
|
||||
{!! Form::open([
|
||||
'action' => route('admin_payments_credit'),
|
||||
'class' => 'form-horizontal',
|
||||
'id' => 'form_filter_payment_credits',
|
||||
]) !!}
|
||||
|
||||
<div class="form-row align-items-center px-4 pb-2 pt-3">
|
||||
<div class="col-12 col-sm-4 col-md-4 col-lg-4 mb-1">
|
||||
<input class="form-control on_keyup_credits" name="credit_filter_name" type="text" value="{{session('credit_filter_name')}}" placeholder="Name">
|
||||
<input class="form-control on_keyup_credits" name="credit_filter_name" type="text"
|
||||
value="{{ session('credit_filter_name') }}" placeholder="Name">
|
||||
</div>
|
||||
|
||||
<div class="col-6 col-sm-4 col-md-4 col-lg-4 mb-1">
|
||||
<select class="custom-select on_change_credits" name="credit_filter_month">
|
||||
@foreach($filter_months as $key=>$value)
|
||||
<option value="{{$key}}" @if(session('credit_filter_month') == $key) selected @endif>{{$value}}</option>
|
||||
|
||||
<div class="col-6 col-sm-4 col-md-4 col-lg-4 mb-1">
|
||||
<select class="custom-select on_change_credits" name="credit_filter_month">
|
||||
@foreach ($filter_months as $key => $value)
|
||||
<option value="{{ $key }}" @if (session('credit_filter_month') == $key) selected @endif>
|
||||
{{ $value }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-6 col-sm-4 col-md-4 col-lg-4 mb-1">
|
||||
<select class="custom-select on_change_credits" name="credit_filter_year">
|
||||
@foreach($filter_years as $key=>$value)
|
||||
<option value="{{$value}}" @if(session('credit_filter_year') == $value) selected @endif>{{$value}}</option>
|
||||
@foreach ($filter_years as $key => $value)
|
||||
<option value="{{ $value }}" @if (session('credit_filter_year') == $value) selected @endif>
|
||||
{{ $value }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
{!! Form::close() !!}
|
||||
|
||||
<div class="card-datatable table-responsive pt-0">
|
||||
<table class="datatables-style table table-striped table-bordered" id="datatable-credit">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>ID</th>
|
||||
<th>{{__('G.Nr.')}}</th>
|
||||
<th>{{__('Gutschrift')}}</th>
|
||||
<th>{{__('First name')}}</th>
|
||||
<th>{{__('Last name') }}</th>
|
||||
<th>{{__('E-Mail') }}</th>
|
||||
<th>{{__('Betrag') }}</th>
|
||||
<th>{{__('Datum') }}</th>
|
||||
<th>{{__('Zahlung')}}</th>
|
||||
<th>{{__('aus Guthaben')}}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="card-datatable table-responsive pt-0">
|
||||
<table class="datatables-style table table-striped table-bordered" id="datatable-credit">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>ID</th>
|
||||
<th>{{ __('G.Nr.') }}</th>
|
||||
<th>{{ __('Gutschrift') }}</th>
|
||||
<th>{{ __('First name') }}</th>
|
||||
<th>{{ __('Last name') }}</th>
|
||||
<th>{{ __('E-Mail') }}</th>
|
||||
<th>{{ __('Betrag') }}</th>
|
||||
<th>{{ __('Datum') }}</th>
|
||||
<th>{{ __('Zahlung') }}</th>
|
||||
<th>{{ __('aus Guthaben') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="modal fade" id="modals-credit">
|
||||
<div class="modal-dialog">
|
||||
<form class="modal-content form-prevent-multiple-submits" action="{{ route('admin_payments_credit_create') }}" method="post">
|
||||
<form class="modal-content form-prevent-multiple-submits" action="{{ route('admin_payments_credit_create') }}"
|
||||
method="post">
|
||||
@csrf
|
||||
<input type="hidden" name="userid" value="">
|
||||
<input type="hidden" name="action" value="create_credit">
|
||||
<input type="hidden" name="back" value="{{url()->current()}}">
|
||||
<input type="hidden" name="back" value="{{ url()->current() }}">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title">{{__('Gutschrift')}}</h5>
|
||||
<h5 class="modal-title">{{ __('Gutschrift') }}</h5>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">×</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="form-group col-sm-12">
|
||||
{{ Form::select('credit_option', ['create'=>'Gutschrift erstellen'], false, array('data-live-search'=>'false', 'class'=>'selectpicker')) }}
|
||||
{{ Form::select('credit_option', ['create' => 'Gutschrift erstellen'], false, ['data-live-search' => 'false', 'class' => 'selectpicker']) }}
|
||||
</div>
|
||||
<div class="form-group col-sm-12">
|
||||
<label class="form-label" for="credit_date">{{ __('Gutschriftsdatum') }}</label>
|
||||
{!! Form::text('credit_date', \Carbon::now()->format("d.m.Y"), ['class'=>'form-control datepicker-base']) !!}
|
||||
{!! Form::text('credit_date', \Carbon::now()->format('d.m.Y'), ['class' => 'form-control datepicker-base']) !!}
|
||||
</div>
|
||||
<div class="form-group col-sm-12">
|
||||
<label class="form-label" for="credit_number">{{ __('Gutschriftsnummer') }}</label>
|
||||
{!! Form::text('credit_number', App\Services\Credit::getCreditNumber(), ['class'=>'form-control', 'disabled']) !!}
|
||||
<em> nächste Gutschriftsnummer <a href="{{ route('admin_settings') }}"><i class="fa fa-edit"></i></a></em>
|
||||
{!! Form::text('credit_number', App\Services\Credit::getCreditNumber(), ['class' => 'form-control', 'disabled']) !!}
|
||||
<em> nächste Gutschriftsnummer <a href="{{ route('admin_settings') }}"><i
|
||||
class="fa fa-edit"></i></a></em>
|
||||
</div>
|
||||
<div class="form-group col-sm-12">
|
||||
<label class="custom-control custom-checkbox">
|
||||
{!! Form::checkbox('credit_send_mail', 1, true, ['class'=>'custom-control-input']) !!}
|
||||
<span class="custom-control-label">Gutschrift an <span id="set_credit_send_mail">mail</span></span>
|
||||
{!! Form::checkbox('credit_send_mail', 1, true, ['class' => 'custom-control-input']) !!}
|
||||
<span class="custom-control-label">Gutschrift an <span
|
||||
id="set_credit_send_mail">mail</span></span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">{{__('close')}}</button>
|
||||
<button type="submit" class="btn btn-primary button-prevent-multiple-submits"><i class="spinner fa fa-spinner fa-spin"></i> {{ __('save')}}</button>
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">{{ __('close') }}</button>
|
||||
<button type="submit" class="btn btn-primary button-prevent-multiple-submits"><i
|
||||
class="spinner fa fa-spinner fa-spin"></i> {{ __('save') }}</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
$( document ).ready(function() {
|
||||
function loadCreditStats() {
|
||||
var month = $('select[name=credit_filter_month]').val();
|
||||
var year = $('select[name=credit_filter_year]').val();
|
||||
var name = $('input[name=credit_filter_name]').val();
|
||||
$.getJSON('{!! route('admin_payments_credit_stats') !!}', {
|
||||
credit_filter_month: month,
|
||||
credit_filter_year: year,
|
||||
credit_filter_name: name
|
||||
}, function(data) {
|
||||
$('#stats-credit-count').text(data.count);
|
||||
$('#stats-credit-total').text(data.total + ' €');
|
||||
var monthName = $('select[name=credit_filter_month] option:selected').text();
|
||||
$('#stats-credit-period').text(monthName + ' ' + year);
|
||||
});
|
||||
}
|
||||
|
||||
$(document).ready(function() {
|
||||
loadCreditStats();
|
||||
|
||||
var oTable = $('#datatable-credit').DataTable({
|
||||
"processing": true,
|
||||
"serverSide": true,
|
||||
ajax: {
|
||||
url: '{!! route( 'admin_payments_credit_datatable') !!}',
|
||||
data: function(d) {
|
||||
d.credit_filter_name = $('input[name=credit_filter_name]').val();
|
||||
d.credit_filter_month = $('select[name=credit_filter_month]').val();
|
||||
d.credit_filter_year = $('select[name=credit_filter_year]').val();
|
||||
}
|
||||
"processing": true,
|
||||
"serverSide": true,
|
||||
ajax: {
|
||||
url: '{!! route('admin_payments_credit_datatable') !!}',
|
||||
data: function(d) {
|
||||
d.credit_filter_name = $('input[name=credit_filter_name]').val();
|
||||
d.credit_filter_month = $('select[name=credit_filter_month]').val();
|
||||
d.credit_filter_year = $('select[name=credit_filter_year]').val();
|
||||
}
|
||||
},
|
||||
"order": [
|
||||
[0, "desc"]
|
||||
],
|
||||
"columns": [{
|
||||
data: 'id',
|
||||
searchable: false
|
||||
},
|
||||
"order": [[0, "desc" ]],
|
||||
"columns": [
|
||||
{ data: 'id', searchable: false },
|
||||
{ data: 'full_number', name: 'full_number' },
|
||||
{ data: 'view', name: 'view' },
|
||||
{ data: 'user.account.first_name', name: 'user.account.first_name', orderable: false },
|
||||
{ data: 'user.account.last_name', name: 'user.account.last_name', orderable: false },
|
||||
{ data: 'user.email', name: 'user.email', orderable: false },
|
||||
{ data: 'total', name: 'total' },
|
||||
{ data: 'date', name: 'date' },
|
||||
{ data: 'status', name: 'status', searchable: false },
|
||||
{ data: 'credits', name: 'credits', orderable: false },
|
||||
],
|
||||
"bLengthChange": false,
|
||||
"iDisplayLength": 100,
|
||||
"language": {
|
||||
"url": "/js/datatables-{{ \App::getLocale() }}.json"
|
||||
}
|
||||
});
|
||||
$('select.on_change_credits').on('change', function(){
|
||||
oTable.draw();
|
||||
});
|
||||
|
||||
$('input.on_keyup_credits').on('keyup', function(){
|
||||
oTable.draw();
|
||||
});
|
||||
$( document ).ready(function() {
|
||||
$('#modals-credit').on('show.bs.modal', function (event) {
|
||||
{
|
||||
data: 'full_number',
|
||||
name: 'full_number'
|
||||
},
|
||||
{
|
||||
data: 'view',
|
||||
name: 'view'
|
||||
},
|
||||
{
|
||||
data: 'user.account.first_name',
|
||||
name: 'user.account.first_name',
|
||||
orderable: false
|
||||
},
|
||||
{
|
||||
data: 'user.account.last_name',
|
||||
name: 'user.account.last_name',
|
||||
orderable: false
|
||||
},
|
||||
{
|
||||
data: 'user.email',
|
||||
name: 'user.email',
|
||||
orderable: false
|
||||
},
|
||||
{
|
||||
data: 'total',
|
||||
name: 'total'
|
||||
},
|
||||
{
|
||||
data: 'date',
|
||||
name: 'date'
|
||||
},
|
||||
{
|
||||
data: 'status',
|
||||
name: 'status',
|
||||
searchable: false
|
||||
},
|
||||
{
|
||||
data: 'credits',
|
||||
name: 'credits',
|
||||
orderable: false
|
||||
},
|
||||
],
|
||||
"bLengthChange": false,
|
||||
"iDisplayLength": 100,
|
||||
"language": {
|
||||
"url": "/js/datatables-{{ \App::getLocale() }}.json"
|
||||
}
|
||||
});
|
||||
$('select.on_change_credits').on('change', function() {
|
||||
oTable.draw();
|
||||
loadCreditStats();
|
||||
});
|
||||
|
||||
$('input.on_keyup_credits').on('keyup', function() {
|
||||
oTable.draw();
|
||||
loadCreditStats();
|
||||
});
|
||||
$(document).ready(function() {
|
||||
$('#modals-credit').on('show.bs.modal', function(event) {
|
||||
var button = $(event.relatedTarget);
|
||||
if(event.relatedTarget){
|
||||
$(this).find(".modal-content input[name='userid']").val(button.data('userid'));
|
||||
$(this).find(".modal-body #set_credit_send_mail").html(button.data('email'));
|
||||
if (event.relatedTarget) {
|
||||
$(this).find(".modal-content input[name='userid']").val(button.data(
|
||||
'userid'));
|
||||
$(this).find(".modal-body #set_credit_send_mail").html(button.data(
|
||||
'email'));
|
||||
}
|
||||
|
||||
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
@endsection
|
||||
|
|
|
|||
|
|
@ -1,50 +1,84 @@
|
|||
@extends('layouts.layout-2')
|
||||
|
||||
@section('content')
|
||||
<div class="card mb-3" id="invoice-stats-card">
|
||||
<div class="card-body py-3">
|
||||
<div class="row align-items-center">
|
||||
<div class="col-auto text-muted small">
|
||||
<i class="fa fa-chart-bar mr-1"></i> Statistik:
|
||||
<span class="font-weight-bold text-dark" id="stats-invoice-period">
|
||||
{{ $filter_months[session('invoice_filter_month')] ?? '' }} {{ session('invoice_filter_year') }}
|
||||
</span>
|
||||
</div>
|
||||
<div class="col text-right d-flex justify-content-end">
|
||||
<div class="mr-4 text-center">
|
||||
<div class="text-muted" style="font-size:0.75rem;">Anzahl Rechnungen</div>
|
||||
<div class="h5 mb-0 font-weight-bold text-primary" id="stats-invoice-count">
|
||||
<i class="fa fa-spinner fa-spin fa-sm"></i>
|
||||
</div>
|
||||
</div>
|
||||
<div class="text-center">
|
||||
<div class="text-muted" style="font-size:0.75rem;">Gesamtsumme</div>
|
||||
<div class="h5 mb-0 font-weight-bold text-success" id="stats-invoice-total">
|
||||
<i class="fa fa-spinner fa-spin fa-sm"></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card">
|
||||
<h5 class="card-header">
|
||||
Finanzen / Rechnungen
|
||||
</h5>
|
||||
<div class="card-body p-0">
|
||||
{!! Form::open(['action' => route('admin_payments_invoice'), 'class' => 'form-horizontal', 'id'=>'form_filter_payment_invoices']) !!}
|
||||
{!! Form::open([
|
||||
'action' => route('admin_payments_invoice'),
|
||||
'class' => 'form-horizontal',
|
||||
'id' => 'form_filter_payment_invoices',
|
||||
]) !!}
|
||||
|
||||
<div class="form-row align-items-center px-4 pb-2 pt-3">
|
||||
<div class="col-12 col-sm-4 col-md-4 col-lg-4 mb-1">
|
||||
<input class="form-control on_keyup_invoice" name="invoice_filter_name" type="text" value="{{session('invoice_filter_name')}}" placeholder="Name">
|
||||
</div>
|
||||
|
||||
<div class="col-6 col-sm-4 col-md-4 col-lg-4 mb-1">
|
||||
<select class="custom-select on_change_invoice" name="invoice_filter_month">
|
||||
@foreach($filter_months as $key=>$value)
|
||||
<option value="{{$key}}" @if(session('invoice_filter_month') == $key) selected @endif>{{$value}}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-6 col-sm-4 col-md-4 col-lg-4 mb-1">
|
||||
<select class="custom-select on_change_invoice" name="invoice_filter_year">
|
||||
@foreach($filter_years as $key=>$value)
|
||||
<option value="{{$value}}" @if(session('invoice_filter_year') == $value) selected @endif>{{$value}}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-row align-items-center px-4 pb-2 pt-3">
|
||||
<div class="col-12 col-sm-4 col-md-4 col-lg-4 mb-1">
|
||||
<input class="form-control on_keyup_invoice" name="invoice_filter_name" type="text"
|
||||
value="{{ session('invoice_filter_name') }}" placeholder="Name">
|
||||
</div>
|
||||
{!! Form::close() !!}
|
||||
|
||||
<div class="col-6 col-sm-4 col-md-4 col-lg-4 mb-1">
|
||||
<select class="custom-select on_change_invoice" name="invoice_filter_month">
|
||||
@foreach ($filter_months as $key => $value)
|
||||
<option value="{{ $key }}" @if (session('invoice_filter_month') == $key) selected @endif>
|
||||
{{ $value }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-6 col-sm-4 col-md-4 col-lg-4 mb-1">
|
||||
<select class="custom-select on_change_invoice" name="invoice_filter_year">
|
||||
@foreach ($filter_years as $key => $value)
|
||||
<option value="{{ $value }}" @if (session('invoice_filter_year') == $value) selected @endif>
|
||||
{{ $value }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
{!! Form::close() !!}
|
||||
|
||||
<div class="card-datatable table-responsive pt-0">
|
||||
<table class="datatables-style table table-striped table-bordered" id="datatable-invoice">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>#</th>
|
||||
<th>{{__('tables.in_no')}}</th>
|
||||
<th>{{__('tables.invoice')}}</th>
|
||||
<th>{{__('tables.amount') }}</th>
|
||||
<th>{{__('tables.status')}}</th>
|
||||
<th>{{__('First name')}}</th>
|
||||
<th>{{__('Last name') }}</th>
|
||||
<th>{{__('E-Mail') }}</th>
|
||||
<th>{{__('tables.date') }}</th>
|
||||
<th>{{__('tables.art')}}</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>#</th>
|
||||
<th>{{ __('tables.in_no') }}</th>
|
||||
<th>{{ __('tables.invoice') }}</th>
|
||||
<th>{{ __('tables.amount') }}</th>
|
||||
<th>{{ __('tables.status') }}</th>
|
||||
<th>{{ __('First name') }}</th>
|
||||
<th>{{ __('Last name') }}</th>
|
||||
<th>{{ __('E-Mail') }}</th>
|
||||
<th>{{ __('tables.date') }}</th>
|
||||
<th>{{ __('tables.art') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
</tbody>
|
||||
|
|
@ -54,45 +88,106 @@
|
|||
</div>
|
||||
|
||||
<script>
|
||||
$( document ).ready(function() {
|
||||
function loadInvoiceStats() {
|
||||
var month = $('select[name=invoice_filter_month]').val();
|
||||
var year = $('select[name=invoice_filter_year]').val();
|
||||
var name = $('input[name=invoice_filter_name]').val();
|
||||
$.getJSON('{!! route('admin_payments_invoice_stats') !!}', {
|
||||
invoice_filter_month: month,
|
||||
invoice_filter_year: year,
|
||||
invoice_filter_name: name
|
||||
}, function(data) {
|
||||
$('#stats-invoice-count').text(data.count);
|
||||
$('#stats-invoice-total').text(data.total + ' €');
|
||||
var monthName = $('select[name=invoice_filter_month] option:selected').text();
|
||||
$('#stats-invoice-period').text(monthName + ' ' + year);
|
||||
});
|
||||
}
|
||||
|
||||
$(document).ready(function() {
|
||||
loadInvoiceStats();
|
||||
|
||||
var oTable = $('#datatable-invoice').DataTable({
|
||||
"processing": true,
|
||||
"serverSide": true,
|
||||
"stateSave": true,
|
||||
"searching": false,
|
||||
ajax: {
|
||||
url: '{!! route('admin_payments_invoice_datatable') !!}',
|
||||
data: function(d) {
|
||||
d.invoice_filter_name = $('input[name=invoice_filter_name]').val();
|
||||
d.invoice_filter_month = $('select[name=invoice_filter_month]').val();
|
||||
d.invoice_filter_year = $('select[name=invoice_filter_year]').val();
|
||||
}
|
||||
},
|
||||
"order": [[0, "desc" ]],
|
||||
"columns": [
|
||||
{ data: 'id', searchable: false },
|
||||
{ data: 'full_number', name: 'full_number' },
|
||||
{ data: 'invoice', name: 'invoice', orderable: false, searchable: false },
|
||||
{ data: 'total_shipping', name: 'total_shipping', orderable: false, searchable: false },
|
||||
{ data: 'txaction', name: 'txaction', orderable: false, searchable: false },
|
||||
{ data: 'shopping_order.shopping_user.billing_firstname', name: 'shopping_order.shopping_user.billing_firstname', orderable: false },
|
||||
{ data: 'shopping_order.shopping_user.billing_lastname', name: 'shopping_order.shopping_user.billing_lastname', orderable: false },
|
||||
{ data: 'shopping_order.shopping_user.billing_email', name: 'shopping_order.shopping_user.billing_email', orderable: false },
|
||||
{ data: 'created_at', name: 'created_at' },
|
||||
{ data: 'status', name: 'status', searchable: false },
|
||||
],
|
||||
"bLengthChange": false,
|
||||
"iDisplayLength": 100,
|
||||
"language": {
|
||||
"url": "/js/datatables-{{ \App::getLocale() }}.json"
|
||||
"processing": true,
|
||||
"serverSide": true,
|
||||
"stateSave": true,
|
||||
"searching": false,
|
||||
ajax: {
|
||||
url: '{!! route('admin_payments_invoice_datatable') !!}',
|
||||
data: function(d) {
|
||||
d.invoice_filter_name = $('input[name=invoice_filter_name]').val();
|
||||
d.invoice_filter_month = $('select[name=invoice_filter_month]').val();
|
||||
d.invoice_filter_year = $('select[name=invoice_filter_year]').val();
|
||||
}
|
||||
});
|
||||
$('select.on_change_invoice').on('change', function(){
|
||||
},
|
||||
"order": [
|
||||
[0, "desc"]
|
||||
],
|
||||
"columns": [{
|
||||
data: 'id',
|
||||
searchable: false
|
||||
},
|
||||
{
|
||||
data: 'full_number',
|
||||
name: 'full_number'
|
||||
},
|
||||
{
|
||||
data: 'invoice',
|
||||
name: 'invoice',
|
||||
orderable: false,
|
||||
searchable: false
|
||||
},
|
||||
{
|
||||
data: 'total_shipping',
|
||||
name: 'total_shipping',
|
||||
orderable: false,
|
||||
searchable: false
|
||||
},
|
||||
{
|
||||
data: 'txaction',
|
||||
name: 'txaction',
|
||||
orderable: false,
|
||||
searchable: false
|
||||
},
|
||||
{
|
||||
data: 'shopping_order.shopping_user.billing_firstname',
|
||||
name: 'shopping_order.shopping_user.billing_firstname',
|
||||
orderable: false
|
||||
},
|
||||
{
|
||||
data: 'shopping_order.shopping_user.billing_lastname',
|
||||
name: 'shopping_order.shopping_user.billing_lastname',
|
||||
orderable: false
|
||||
},
|
||||
{
|
||||
data: 'shopping_order.shopping_user.billing_email',
|
||||
name: 'shopping_order.shopping_user.billing_email',
|
||||
orderable: false
|
||||
},
|
||||
{
|
||||
data: 'created_at',
|
||||
name: 'created_at'
|
||||
},
|
||||
{
|
||||
data: 'status',
|
||||
name: 'status',
|
||||
searchable: false
|
||||
},
|
||||
],
|
||||
"bLengthChange": false,
|
||||
"iDisplayLength": 100,
|
||||
"language": {
|
||||
"url": "/js/datatables-{{ \App::getLocale() }}.json"
|
||||
}
|
||||
});
|
||||
$('select.on_change_invoice').on('change', function() {
|
||||
oTable.draw();
|
||||
loadInvoiceStats();
|
||||
});
|
||||
|
||||
$('input.on_keyup_invoice').on('keyup', function(){
|
||||
$('input.on_keyup_invoice').on('keyup', function() {
|
||||
oTable.draw();
|
||||
loadInvoiceStats();
|
||||
});
|
||||
});
|
||||
/*$('#filter_sales_year').on('change', function(){
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue