Guthaben aufladen, löschen, Ansichten

This commit is contained in:
Kevin Adametz 2021-04-26 16:07:03 +02:00
parent 6ac9fcc4d2
commit 3754f1c571
27 changed files with 603 additions and 89 deletions

View file

@ -0,0 +1,45 @@
{!! Form::open(['url' => route('admin_payments_paycredit'), 'class' => 'modal-content', 'enctype' => 'multipart/form-data']) !!}
<div class="modal-header">
<h5 class="modal-title">
{{ __('Guthaben') }}
<span class="font-weight-light">aufladen</span>
</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">×</button>
</div>
<div class="modal-body">
<input type="hidden" name="action" value="{{$data['action']}}">
<input type="hidden" name="id" value="{{$data['id']}}">
<div class="form-row">
<div class="form-group col-12">
<label for="member_id" class="form-label">{{ __('Vertriebspartner auswählen') }}*</label>
<select class="selectpicker" name="member_id" data-style="btn-light" data-live-search="true" required>
{!! HTMLHelper::getMembersOptions(0, true) !!}
</select>
</div>
<div class="form-group col-12">
<label class="form-label" for="credit">{{ __('Betrag') }}</label>
{{ Form::text('credit', '', array('placeholder'=>__('in Euro'), 'class'=>'form-control', 'required'=>true)) }}
</div>
<div class="form-group col-12">
<label class="form-label" for="message">{{ __('Mitteilung') }}</label>
{{ Form::textarea('message', '' , array('placeholder'=>__('Mitteilung'), 'class'=>'form-control', 'rows'=>4, 'required'=>true)) }}
</div>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">schließen</button>
<button type="submit" class="btn btn-primary">{{__('Guthaben aufladen')}}</button>
</div>
{!! Form::close() !!}
<script type="text/javascript">
$( document ).ready(function() {
});
</script>

View file

@ -1,7 +1,7 @@
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title">
{{ __('Staffelprovision') }} <strong>{{$user->user_level->name}}
{{ __('Staffelprovision') }} <strong>{{$user->user_level->name}}</strong>
</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">×</button>
</div>

View file

@ -0,0 +1,72 @@
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title">
{{ __('Zahlungen / Guthaben') }}
<strong>
@if($user->account)
{{ $user->account->first_name }}
{{ $user->account->last_name }}
@endif
</strong>
</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">×</button>
</div>
<div class="modal-body">
<input type="hidden" name="action" value="{{$data['action']}}">
<input type="hidden" name="id" value="{{$data['id']}}">
<input type="hidden" name="view" value="{{$data['view']}}">
<table class="table table-striped" style="border-top: 0">
<thead>
<tr>
<th style="width: 55%">Mitteilung</th>
<th>Betrag</th>
<th>altes Guthaben</th>
<th>neues Guthaben</th>
<th>Datum</th>
<th>Aktion</th>
</tr>
</thead>
<tbody>
@if($user && $user->user_pay_credits)
@foreach($user->user_pay_credits as $user_pay_credit)
<tr>
@if($user_pay_credit->status === 3)
<th scope="row"> {!! nl2br($user_pay_credit->message) !!}</th>
@else
<th scope="row">{{ trans('payment.'.$user_pay_credit->message) }}</th>
@endif
<td><div class="no-line-break">{{ formatNumber($user_pay_credit->credit) }} </div></td>
<td><div class="no-line-break">{{ formatNumber($user_pay_credit->old_credit_total) }} </div></td>
<td><div class="no-line-break">{{ formatNumber($user_pay_credit->new_credit_total) }} </div></td>
<td><div class="no-line-break">{{ formatDate($user_pay_credit->created_at) }}</div></td>
@if($user_pay_credit->shopping_order_id)
<td><a class="btn btn-secondary btn-xs" href="{{ route('admin_sales_users_detail', [$user_pay_credit->shopping_order_id]) }}"><i class="ion ion-ios-redo"></i></a></td>
@else
@if($user_pay_credit->status === 3 && $deleteTime = $user_pay_credit->deleteTime())
<td><div class="no-line-break"><a class="btn btn-danger btn-xs" href="{{ route('admin_payments_paycredit_delete', [$user_pay_credit->id]) }}"><i class="ion ion-ios-trash"></i></a> noch {{ $deleteTime }} min.</div>
</td>
@else
<td>-</td>
@endif
@endif
</tr>
@endforeach
@endif
</tbody>
</table>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">schließen</button>
</div>
</div>
<script type="text/javascript">
$( document ).ready(function() {
});
</script>

View file

@ -4,6 +4,15 @@
<div class="card">
<h6 class="card-header">
Zahlungen / Guthaben
<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-pay-credit"
data-back="{{url()->current()}}"
data-route="{{ route('modal_load') }}"><span class="far fa-plus-circle"></span> Guthaben aufladen
</button>
</div>
</h6>
{{-- <div class="col-sm-6 mb-0 mt-2">
{!! Form::open(['url' => route('admin_payments_paycredit'), 'class' => 'form-horizontal', 'id'=>'form_filter_user_status']) !!}
@ -17,8 +26,18 @@
</div>
--}}
<div class="card-datatable table-responsive pt-0">
@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>
@endif
<div class="card-datatable table-responsive pt-2">
<table class="datatables-style table table-striped table-bordered" id="datatable-pay-credit">
<thead>
<tr>
@ -39,7 +58,6 @@
</div>
<script>
$( document ).ready(function() {
var oTable = $('#datatable-pay-credit').DataTable({
"processing": true,