23-01-2026
This commit is contained in:
parent
a939cd51ef
commit
a8b395e20d
248 changed files with 29342 additions and 4805 deletions
|
|
@ -30,7 +30,7 @@
|
|||
</div>
|
||||
<div class="col-md-3 mb-3">
|
||||
<div class="text-muted small">{{ __('tables.abo_delivery') }}</div>
|
||||
{{ $user_abo->getCountOrders() }}
|
||||
{{ $user_abo->getCountPaidOrders() }} / {{ \App\Models\Setting::getContentBySlug('abo-min-duration') }}
|
||||
|
||||
</div>
|
||||
|
||||
|
|
@ -83,11 +83,13 @@
|
|||
<div class="card-body pb-1">
|
||||
<div class="row">
|
||||
<div class="col-md-6 mb-3">
|
||||
@if(App\Services\AboHelper::canEditAbo($user_abo, $view))
|
||||
<button type="button" class="btn btn-sm btn-secondary" data-toggle="modal" data-target="#modals-load-content"
|
||||
data-id="{{ $user_abo->id }}"
|
||||
data-action="abo_update_settings"
|
||||
data-view="{{ $view }}"
|
||||
data-route="{{ route('modal_load') }}"><span class="fa fa-edit"></span>{{ __('abo.abo_settings') }}</button>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
<div class="col-md-3 mb-3">
|
||||
|
|
|
|||
24
resources/views/admin/abo/_detail_abo_info.blade.php
Normal file
24
resources/views/admin/abo/_detail_abo_info.blade.php
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
|
||||
<div class="card-body pb-1">
|
||||
<h5 class="font-weight-semibold">
|
||||
{{ __('abo.abo_info') }}
|
||||
</h5>
|
||||
<div class="row">
|
||||
<div class="col-md-12 mb-3">
|
||||
<div class="">
|
||||
<h6 class="card-header bg-light text-primary px-2 py-2">
|
||||
<a href="#" class="" data-toggle="collapse" data-target="#collapseFilter" aria-expanded="false" aria-controls="collapseFilter">
|
||||
<i class="fa fa-caret-expand"></i> {{ __('abo.pros_hl') }}
|
||||
</a>
|
||||
</h6>
|
||||
<div class="collapse" id="collapseFilter">
|
||||
<div class="form-row pb-1 pt-1">
|
||||
<ul class="list-padding-top">
|
||||
{!! __('abo.pros_list', ['abo-min-duration' => \App\Models\Setting::getContentBySlug('abo-min-duration')]) !!}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -31,7 +31,9 @@
|
|||
<th>{{__('tables.status')}}</th>
|
||||
<th>{{__('tables.shipping')}}</th>
|
||||
<th>{{__('tables.art')}}</th>
|
||||
@if(!isset($only_show_products) || !$only_show_products)
|
||||
<th>{{__('tables.invoice')}}</th>
|
||||
@endif
|
||||
<th>{{__('tables.firstname')}}</th>
|
||||
<th>{{__('tables.lastname')}}</th>
|
||||
<th>{{__('tables.email')}}</th>
|
||||
|
|
@ -53,10 +55,19 @@
|
|||
@endif
|
||||
@else
|
||||
@if($user_abo->is_for === 'me')
|
||||
@if(!isset($only_show_products) || !$only_show_products)
|
||||
{!! '<a href="' . route('user_order_detail', [$user_abo_order->shopping_order_id]) . '" class="btn btn-xs btn-primary">'.$user_abo_order->shopping_order_id.'</a>' !!}
|
||||
|
||||
@else
|
||||
{{ $user_abo_order->shopping_order_id }}
|
||||
@endif
|
||||
@endif
|
||||
@if($user_abo->is_for === 'ot')
|
||||
@if(!isset($only_show_products) || !$only_show_products)
|
||||
{!! '<a href="' . route('user_shop_order_detail', [$user_abo_order->shopping_order_id]) . '" class="btn btn-xs btn-secondary">'.$user_abo_order->shopping_order_id.'</a>' !!}
|
||||
@else
|
||||
{{ $user_abo_order->shopping_order_id }}
|
||||
@endif
|
||||
@endif
|
||||
@endif
|
||||
</td>
|
||||
|
|
@ -78,12 +89,14 @@
|
|||
<td>
|
||||
{!! '<span class="badge badge-pill badge-'.$user_abo_order->shopping_order->getPaymentForColor().'">'.$user_abo_order->shopping_order->getPaymentForType().'</span>' !!}
|
||||
</td>
|
||||
@if(!isset($only_show_products) || !$only_show_products)
|
||||
<td>
|
||||
@if($user_abo_order->shopping_order->isInvoice())
|
||||
{!! '<span class="no-line-break"><a href="'.route('storage_file', [$user_abo_order->shopping_order->id, 'invoice', 'download']).'" class="btn btn-primary btn-xs"><i class="fa fa-download"></i></a>
|
||||
<a href="'.route('storage_file', [$user_abo_order->shopping_order->id, 'invoice', 'stream']).'" target="_blank" class="btn btn-warning btn-xs"><i class="fa fa-eye"></i></a></span>' !!}
|
||||
@endif
|
||||
</td>
|
||||
@endif
|
||||
<td>
|
||||
{{ $user_abo_order->shopping_order->shopping_user->shipping_firstname }}
|
||||
</td>
|
||||
|
|
|
|||
|
|
@ -107,17 +107,22 @@
|
|||
<h5 class=" font-weight-semibold mb-2">
|
||||
{{ __('abo.abo_order_hl') }}
|
||||
</h5>
|
||||
<p>{{ __('abo.abo_order_info_2') }}</p>
|
||||
@if(isset($only_show_products) && $only_show_products === true)
|
||||
<p>{!! __('abo.abo_order_info_block', ['abo-min-duration' => \App\Models\Setting::getContentBySlug('abo-min-duration')]) !!}</p>
|
||||
@else
|
||||
<p>{{ __('abo.abo_order_info_2') }}</p>
|
||||
@endif
|
||||
<hr>
|
||||
@include('user.abo.vat_info')
|
||||
|
||||
@if(!isset($only_show_products) || !$only_show_products)
|
||||
<button type="button" class="btn btn-sm btn-secondary btn-block mt-2" data-toggle="modal" data-target="#modals-load-content"
|
||||
data-id="{{ $user_abo->id }}"
|
||||
data-action="abo-add-product"
|
||||
data-route="{{ route('modal_load') }}"><i class="fa fa-plus-circle"></i> {{ __('abo.add_product') }}</button>
|
||||
|
||||
@endif
|
||||
<div class="" id="insert_show_products_order" data-cart-order-id="{{ $user_abo->id }}">
|
||||
@include('admin.abo._order_abo_show')
|
||||
@php $only_show_products = isset($only_show_products) ? $only_show_products : false; @endphp
|
||||
@include('admin.abo._order_abo_show', ['only_show_products' => $only_show_products])
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
@ -28,11 +28,14 @@
|
|||
<div>{{ __('order.content') }}: {{ $abo_item->product->contents }}</div>
|
||||
<div>{{ __('order.art_no') }}: {{ $abo_item->product->number }}</div>
|
||||
</div>
|
||||
@if(!isset($only_show_products) || !$only_show_products)
|
||||
<div class="options">
|
||||
<a href="#" class="auto-delete-product remove_item_form_cart product-tooltip" data-order-item-id="{{$abo_item->id}}" data-product-id="{{ $abo_item->product->id }}"><i class="fa fa-times"></i> {{ __('order.article_remove') }}</a>
|
||||
</div>
|
||||
@endif
|
||||
</td>
|
||||
<td>
|
||||
@if(!isset($only_show_products) || !$only_show_products)
|
||||
<div class="no-line-break input-group-min-w">
|
||||
<div class="input-group d-inline-flex w-auto">
|
||||
<span class="input-group-prepend">
|
||||
|
|
@ -44,6 +47,9 @@
|
|||
</span>
|
||||
</div>
|
||||
</div>
|
||||
@else
|
||||
<div class="no-line-break"> {{ $abo_item->qty }}</div>
|
||||
@endif
|
||||
</td>
|
||||
<td class="text-right font-weight-semibold align-top px-3 py-2" style="width: 100px;">
|
||||
<div class="no-line-break"> {{ $abo_item->getFormattedTotalPrice() }} €</div>
|
||||
|
|
|
|||
|
|
@ -20,6 +20,9 @@
|
|||
<div class="card">
|
||||
@include('admin.abo._detail')
|
||||
</div>
|
||||
<div class="card mt-3">
|
||||
@include('admin.abo._detail_abo_info')
|
||||
</div>
|
||||
<div class="card mt-3">
|
||||
@include('admin.customer._customer_detail', ['shopping_user' => $customer_detail])
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -10,26 +10,27 @@
|
|||
<input type="hidden" name="id" value="{{$data['id']}}">
|
||||
<input type="hidden" name="view" value="{{$data['view']}}">
|
||||
|
||||
@if($data['view'] !== 'admin' && ($user_abo->user_id != \Auth::user()->id && $user_abo->member_id != \Auth::user()->id))
|
||||
@if(!App\Services\AboHelper::canEditAbo($user_abo, $data['view']))
|
||||
<div class="alert alert-danger">
|
||||
Unauthorized action. Is not my abo
|
||||
</div>
|
||||
@else
|
||||
|
||||
<div class="form-row">
|
||||
<div class="col-sm-6">
|
||||
<label for="abo_interval" class="form-label">{{ __('tables.abo_delivery_day') }}*</label>
|
||||
<select class="custom-select" name="abo_interval" id="abo_interval" required>
|
||||
{!! HTMLHelper::getAboDeliveryOptions($user_abo->abo_interval) !!}
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-sm-12 mt-1">
|
||||
<i class="text-muted">{{ __('abo.abo_copy_abo_interval') }}</i>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
{{--
|
||||
<div class="form-row">
|
||||
<div class="col-sm-6">
|
||||
<label for="abo_interval" class="form-label">{{ __('tables.abo_delivery_day') }}*</label>
|
||||
<select class="custom-select" name="abo_interval" id="abo_interval" required>
|
||||
{!! HTMLHelper::getAboDeliveryOptions($user_abo->abo_interval) !!}
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-sm-12 mt-1">
|
||||
<i class="text-muted">{{ __('abo.abo_copy_abo_interval') }}</i>
|
||||
</div>
|
||||
</div>
|
||||
<hr>
|
||||
|
||||
{{-- <div class="form-row">
|
||||
<div class="col-sm-6">
|
||||
<label for="next_date" class="form-label">{{ __('tables.next_date') }} ({{ $user_abo->next_date }})</label>
|
||||
{!! Form::text('next_date', $user_abo->next_date, ['class'=>'form-control datepicker-base']) !!}
|
||||
|
|
@ -40,23 +41,44 @@
|
|||
</div>
|
||||
<hr>
|
||||
--}}
|
||||
|
||||
@php
|
||||
$canCancel = App\Services\AboHelper::canCancelAbo($user_abo, $data['view']);
|
||||
@endphp
|
||||
<hr>
|
||||
@if($canCancel || $data['view'] == 'admin')
|
||||
|
||||
<div class="form-row">
|
||||
<div class="col-sm-12">
|
||||
<label class="switcher switcher-primary">
|
||||
<input type="checkbox" class="switcher-input" name="abo_is_active" value="true" @if($user_abo->active) checked @endif>
|
||||
<span class="switcher-indicator">
|
||||
<span class="switcher-yes"></span>
|
||||
<span class="switcher-no"></span>
|
||||
</span>
|
||||
<span class="switcher-label">{{ __('abo.abo_is_active') }}</span>
|
||||
</label>
|
||||
</div>
|
||||
<div class="col-sm-12 mt-1">
|
||||
<i class="text-muted">{{ __('abo.abo_copy_active') }}</i>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-row">
|
||||
<div class="col-sm-12">
|
||||
<label class="switcher switcher-primary">
|
||||
<input type="checkbox" class="switcher-input" name="abo_is_active" value="true" @if($user_abo->active) checked @endif>
|
||||
<span class="switcher-indicator">
|
||||
<span class="switcher-yes"></span>
|
||||
<span class="switcher-no"></span>
|
||||
</span>
|
||||
<span class="switcher-label">{{ __('abo.abo_is_active') }}</span>
|
||||
</label>
|
||||
@if($data['view'] !== 'admin')
|
||||
<div class="col-sm-12 mt-3">
|
||||
<button type="submit" name="abo_cancel" value="true" class="btn btn-danger btn-sm" onclick="return confirm('{{ __('abo.confirm_cancel') }}')">
|
||||
<i class="ion ion-ios-trash"></i> {{ __('abo.cancel_abo') }}
|
||||
</button>
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
<div class="col-sm-12 mt-1">
|
||||
<i class="text-muted">{{ __('abo.abo_copy_active') }}</i>
|
||||
</div>
|
||||
</div>
|
||||
@else
|
||||
<input type="hidden" name="abo_is_active" value="{{ $user_abo->active }}">
|
||||
<div class="mt-1">
|
||||
<div class="alert alert-warning">
|
||||
{{ __('abo.info_min_duration_orders_left', ['count' => App\Services\AboHelper::getAboMinDuration() - $user_abo->getCountPaidOrders()]) }}
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
@endif
|
||||
</div>
|
||||
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@
|
|||
<td>{{ __('team.career_level') }}:</td>
|
||||
<td>
|
||||
{{ \App\Services\TranslationHelper::transUserLevelName($TreeCalcBot->business_user->user_level_name) }}
|
||||
<span class="badge badge-outline-success"> {{ __('team.KU') }} {{ $TreeCalcBot->business_user->qual_kp }} / {{ __('team.PP') }} {{ formatNumber($TreeCalcBot->business_user->qual_pp, 0) }}</span>
|
||||
<span class="badge badge-outline-success"> {{ __('team.KU') }} {{ $TreeCalcBot->business_user->qual_kp }} / {{ __('team.PP') }} {{ formatNumber($TreeCalcBot->business_user->qual_pp) }}</span>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
|
|
@ -71,8 +71,8 @@
|
|||
<tr>
|
||||
<td>{{ __('team.customer_points') }}:</td>
|
||||
<td>
|
||||
<strong>{{ formatNumber($TreeCalcBot->business_user->sales_volume_points_KP_sum, 0) }} {{ __('team.KU') }}</strong>
|
||||
({{ __('team.own') }}: {{ formatNumber($TreeCalcBot->business_user->sales_volume_KP_points, 0) }} | {{ __('team.shop') }}: {{ formatNumber($TreeCalcBot->business_user->sales_volume_points_shop, 0) }})
|
||||
<strong>{{ formatNumber($TreeCalcBot->business_user->sales_volume_points_KP_sum) }} {{ __('team.KU') }}</strong>
|
||||
({{ __('team.own') }}: {{ formatNumber($TreeCalcBot->business_user->sales_volume_KP_points) }} | {{ __('team.shop') }}: {{ formatNumber($TreeCalcBot->business_user->sales_volume_points_shop) }})
|
||||
<span class="badge {{ $TreeCalcBot->business_user->isQualKP() ? 'badge-outline-success' : 'badge-outline-warning-dark' }}"> {{ __('team.KU') }} {{ $TreeCalcBot->business_user->qual_kp }}</span>
|
||||
|
||||
</td>
|
||||
|
|
@ -81,7 +81,7 @@
|
|||
<tr>
|
||||
<td>{{ __('team.qualification_points') }}:</td>
|
||||
<td>
|
||||
<strong>{{ formatNumber($TreeCalcBot->business_user->total_qual_pp, 0) }} {{ __('team.TP') }}</strong> (+ {{ __('team.volume_KU') }})
|
||||
<strong>{{ formatNumber($TreeCalcBot->business_user->total_qual_pp) }} {{ __('team.TP') }}</strong> (+ {{ __('team.volume_KU') }})
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
|
@ -89,10 +89,10 @@
|
|||
<td>
|
||||
@if($TreeCalcBot->business_user->isQualLevel())
|
||||
<span class="badge {{ $TreeCalcBot->business_user->isQualEqualLevel() ? 'badge-outline-success' : 'badge-outline-info' }}">
|
||||
{{ __('team.KP') }} {{ formatNumber($TreeCalcBot->business_user->sales_volume_points_KP_sum, 0) }} /
|
||||
<strong>{{ formatNumber($TreeCalcBot->business_user->qual_user_level['qual_kp'], 0) }}</strong> |
|
||||
{{ __('team.TP') }} {{ formatNumber($TreeCalcBot->business_user->total_qual_pp, 0) }} /
|
||||
<strong>{{ formatNumber($TreeCalcBot->business_user->qual_user_level['qual_pp'], 0) }}</strong>
|
||||
{{ __('team.KP') }} {{ formatNumber($TreeCalcBot->business_user->sales_volume_points_KP_sum) }} /
|
||||
<strong>{{ formatNumber($TreeCalcBot->business_user->qual_user_level['qual_kp']) }}</strong> |
|
||||
{{ __('team.TP') }} {{ formatNumber($TreeCalcBot->business_user->total_qual_pp) }} /
|
||||
<strong>{{ formatNumber($TreeCalcBot->business_user->qual_user_level['qual_pp']) }}</strong>
|
||||
| {{ $TreeCalcBot->business_user->qual_user_level['name'] }}</span>
|
||||
@endif
|
||||
</td>
|
||||
|
|
@ -103,14 +103,14 @@
|
|||
<tr>
|
||||
<td>{{ __('team.payline_points') }}:</td>
|
||||
<td>
|
||||
<strong>{{ formatNumber($TreeCalcBot->business_user->payline_points, 0) }} {{ __('team.PP') }}</strong>
|
||||
<strong>{{ formatNumber($TreeCalcBot->business_user->payline_points) }} {{ __('team.PP') }}</strong>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>{{ __('team.qualification_points') }} :</td>
|
||||
<td>
|
||||
<strong>{{ formatNumber($TreeCalcBot->business_user->payline_points_qual_kp, 0) }} {{ __('team.PP') }}</strong> (+ {{ __('team.volume_KU') }})
|
||||
<strong>{{ formatNumber($TreeCalcBot->business_user->payline_points_qual_kp) }} {{ __('team.PP') }}</strong> (+ {{ __('team.volume_KU') }})
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
|
@ -118,10 +118,10 @@
|
|||
<td>
|
||||
@if($TreeCalcBot->business_user->isQualLevel())
|
||||
<span class="badge {{ $TreeCalcBot->business_user->isQualEqualLevel() ? 'badge-outline-success' : 'badge-outline-info' }}">
|
||||
{{ __('team.KU') }} {{ formatNumber($TreeCalcBot->business_user->sales_volume_points_KP_sum, 0) }} /
|
||||
<strong>{{ formatNumber($TreeCalcBot->business_user->qual_user_level['qual_kp'], 0) }}</strong> |
|
||||
{{ __('team.PP') }} {{ formatNumber($TreeCalcBot->business_user->payline_points_qual_kp, 0) }} /
|
||||
<strong>{{ formatNumber($TreeCalcBot->business_user->qual_user_level['qual_pp'], 0) }}</strong>
|
||||
{{ __('team.KU') }} {{ formatNumber($TreeCalcBot->business_user->calc_qual_kp) }} /
|
||||
<strong>{{ formatNumber($TreeCalcBot->business_user->qual_user_level['qual_kp']) }}</strong> |
|
||||
{{ __('team.PP') }} {{ formatNumber($TreeCalcBot->business_user->payline_points_qual_kp) }} /
|
||||
<strong>{{ formatNumber($TreeCalcBot->business_user->qual_user_level['qual_pp']) }}</strong>
|
||||
| {{ \App\Services\TranslationHelper::transUserLevelName($TreeCalcBot->business_user->qual_user_level['name']) }}</span>
|
||||
@endif
|
||||
</td>
|
||||
|
|
@ -131,10 +131,10 @@
|
|||
<td>{{ __('team.next_commission_level') }}:</td>
|
||||
<td>
|
||||
<span class="badge badge-outline-warning-dark">
|
||||
{{ __('team.KU') }} {{ formatNumber($TreeCalcBot->business_user->sales_volume_points_KP_sum, 0) }} /
|
||||
<strong>{{ formatNumber($TreeCalcBot->business_user->qual_user_level_next['qual_kp'], 0) }}</strong> |
|
||||
{{ __('team.PP') }} {{ formatNumber($TreeCalcBot->business_user->payline_points_qual_kp, 0) }} /
|
||||
<strong>{{ formatNumber($TreeCalcBot->business_user->qual_user_level_next['qual_pp'], 0) }}</strong>
|
||||
{{ __('team.KU') }} {{ formatNumber($TreeCalcBot->business_user->qual_user_level_next['_calculated_qual_kp']) }} /
|
||||
<strong>{{ formatNumber($TreeCalcBot->business_user->qual_user_level_next['qual_kp']) }}</strong> |
|
||||
{{ __('team.PP') }} {{ formatNumber($TreeCalcBot->business_user->qual_user_level_next['_calculated_payline_points_qual_kp']) }} /
|
||||
<strong>{{ formatNumber($TreeCalcBot->business_user->qual_user_level_next['qual_pp']) }}</strong>
|
||||
| {{ \App\Services\TranslationHelper::transUserLevelName($TreeCalcBot->business_user->qual_user_level_next['name']) }}</span>
|
||||
</td>
|
||||
</tr>
|
||||
|
|
@ -146,17 +146,17 @@
|
|||
<td>
|
||||
@if($TreeCalcBot->business_user->next_qual_user_level)
|
||||
<span class="badge badge-outline-success">
|
||||
{{ __('team.KU') }} {{ formatNumber($TreeCalcBot->business_user->sales_volume_points_KP_sum, 0) }} /
|
||||
<strong>{{ formatNumber($TreeCalcBot->business_user->next_qual_user_level['qual_kp'], 0) }}</strong> |
|
||||
{{ __('team.TP') }} {{ formatNumber($TreeCalcBot->business_user->payline_points_qual_kp, 0) }} /
|
||||
<strong>{{ formatNumber($TreeCalcBot->business_user->next_qual_user_level['qual_pp'], 0) }}</strong>
|
||||
{{ __('team.KU') }} {{ formatNumber($TreeCalcBot->business_user->next_qual_user_level['_calculated_qual_kp']) }} /
|
||||
<strong>{{ formatNumber($TreeCalcBot->business_user->next_qual_user_level['qual_kp']) }}</strong> |
|
||||
{{ __('team.TP') }} {{ formatNumber($TreeCalcBot->business_user->next_qual_user_level['_calculated_payline_points_qual_kp']) }} /
|
||||
<strong>{{ formatNumber($TreeCalcBot->business_user->next_qual_user_level['qual_pp']) }}</strong>
|
||||
| {{ \App\Services\TranslationHelper::transUserLevelName($TreeCalcBot->business_user->next_qual_user_level['name']) }}</span>
|
||||
@elseif($TreeCalcBot->business_user->next_can_user_level)
|
||||
<span class="badge badge-outline-warning-dark">
|
||||
{{ __('team.KU') }} {{ formatNumber($TreeCalcBot->business_user->sales_volume_points_KP_sum, 0) }} /
|
||||
<strong>{{ formatNumber($TreeCalcBot->business_user->next_can_user_level['qual_kp'], 0) }}</strong> |
|
||||
{{ __('team.TP') }} {{ formatNumber($TreeCalcBot->business_user->payline_points_qual_kp, 0) }} /
|
||||
<strong>{{ formatNumber($TreeCalcBot->business_user->next_can_user_level['qual_pp'], 0) }}</strong>
|
||||
{{ __('team.KU') }} {{ formatNumber($TreeCalcBot->business_user->next_can_user_level['_calculated_qual_kp']) }} /
|
||||
<strong>{{ formatNumber($TreeCalcBot->business_user->next_can_user_level['qual_kp']) }}</strong> |
|
||||
{{ __('team.TP') }} {{ formatNumber($TreeCalcBot->business_user->next_can_user_level['_calculated_payline_points_qual_kp']) }} /
|
||||
<strong>{{ formatNumber($TreeCalcBot->business_user->next_can_user_level['qual_pp']) }}</strong>
|
||||
| {{ \App\Services\TranslationHelper::transUserLevelName($TreeCalcBot->business_user->next_can_user_level['name']) }}</span>
|
||||
@else
|
||||
<span class="badge badge-outline-warning"><i class="fa fa-times"></i></span>
|
||||
|
|
@ -204,13 +204,13 @@
|
|||
{{-- <tr>
|
||||
<td>Team Points:</td>
|
||||
<td>
|
||||
<strong>{{ formatNumber($TreeCalcBot->business_user->total_pp, 0) }} TP</strong>
|
||||
<strong>{{ formatNumber($TreeCalcBot->business_user->total_pp) }} TP</strong>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Qualifikation Team Points:</td>
|
||||
<td>
|
||||
<strong>{{ formatNumber($TreeCalcBot->business_user->payline_points_qual_kp, 0) }} TP</strong> (+ Volumen KP)
|
||||
<strong>{{ formatNumber($TreeCalcBot->business_user->payline_points_qual_kp) }} TP</strong> (+ Volumen KP)
|
||||
</td>
|
||||
</tr>
|
||||
--}}
|
||||
|
|
@ -241,7 +241,7 @@
|
|||
<div class="font-weight-bolder line-height-1 my-2 text-dark badge badge-outline-dark">{{ $line }}.</div>
|
||||
@endif
|
||||
</td>
|
||||
<td>{{ formatNumber($TreeCalcBot->getKeybyLine($line, 'points'), 0) }}</td>
|
||||
<td>{{ formatNumber($TreeCalcBot->getKeybyLine($line, 'points')) }}</td>
|
||||
<td>{{ formatNumber($TreeCalcBot->getKeybyLine($line, 'margin'), 1) }} %</td>
|
||||
<td>{{ formatNumber($TreeCalcBot->getKeybyLine($line, 'commission'), 2) }} €</td>
|
||||
</tr>
|
||||
|
|
@ -250,7 +250,7 @@
|
|||
<tfoot>
|
||||
<tr>
|
||||
<td>{{__('tables.total')}}</td>
|
||||
<td>{{ formatNumber($TreeCalcBot->business_user->total_pp, 0) }}</td>
|
||||
<td>{{ formatNumber($TreeCalcBot->business_user->total_pp) }}</td>
|
||||
<td></td>
|
||||
<td><strong>{{ formatNumber($TreeCalcBot->business_user->commission_pp_total, 2) }} €</strong></td>
|
||||
</tr>
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@
|
|||
@if($userSalesVolume)
|
||||
<tr>
|
||||
<td>{{ $userSalesVolume->date }}</td>
|
||||
<td>{{ $userSalesVolume->points }}</td>
|
||||
<td>{{ $userSalesVolume->getFormattedPoints() }}</td>
|
||||
<td>{{ formatNumber($userSalesVolume->total_net) }} €</td>
|
||||
<td>{{ $userSalesVolume->getStatusType() }}</td>
|
||||
<td>@if($userSalesVolume->user)
|
||||
|
|
@ -57,7 +57,7 @@
|
|||
<div class="form-row">
|
||||
<div class="form-group col-sm-4">
|
||||
<label for="points" class="form-label">{{__('Points')}}</label>
|
||||
{{ Form::text('points', $userSalesVolume->points, array('class'=>'form-control', 'id'=>'points')) }}
|
||||
{{ Form::text('points', $userSalesVolume->getFormattedPoints(), array('class'=>'form-control', 'id'=>'points')) }}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -6,12 +6,23 @@
|
|||
Business Points
|
||||
|
||||
<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_sales_volume"
|
||||
data-back="{{url()->current()}}"
|
||||
data-route="{{ route('modal_load') }}"><span class="fa fa-plus-circle"></span> Points hinzufügen
|
||||
</button>
|
||||
<div class="d-flex">
|
||||
<form action="{{ route('admin_business_points_recalculate') }}" method="POST" style="display: none;" id="recalculate-form" onsubmit="return confirmRecalculate();" class="inline-block">
|
||||
@csrf
|
||||
<input type="hidden" name="points_filter_member_id" id="recalc_member_id" value="">
|
||||
<input type="hidden" name="points_filter_month" id="recalc_month" value="">
|
||||
<input type="hidden" name="points_filter_year" id="recalc_year" value="">
|
||||
<button type="submit" class="btn btn-sm btn-warning">
|
||||
<span class="fa fa-refresh"></span> Punkte neu berechnen
|
||||
</button>
|
||||
</form>
|
||||
<button type="button" class="btn btn-sm btn-primary" data-toggle="modal" data-target="#modals-load-content"
|
||||
data-id="new"
|
||||
data-action="add_user_sales_volume"
|
||||
data-back="{{url()->current()}}"
|
||||
data-route="{{ route('modal_load') }}"><span class="fa fa-plus-circle"></span> Points hinzufügen
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</h5>
|
||||
|
||||
|
|
@ -65,6 +76,25 @@
|
|||
</div>
|
||||
{!! Form::close() !!}
|
||||
|
||||
<!-- Summen-Anzeige -->
|
||||
<div id="points-summary" style="display: none;" class="alert alert-info mx-4 mb-3">
|
||||
<h6 class="mb-3"><strong>Monatssummen für ausgewählten Berater</strong></h6>
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<strong>KP-Punkte (Eigene):</strong> <span id="sum-kp-points">0</span><br>
|
||||
<small class="text-muted">Eigenumsatz: <span id="sum-kp-net">0</span> €</small>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<strong>TP-Punkte (Team):</strong> <span id="sum-tp-points">0</span><br>
|
||||
<small class="text-muted">Shop: <span id="sum-shop-points">0</span> Punkte</small>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<strong>Gesamtumsatz:</strong> <span id="sum-total-net">0</span> €<br>
|
||||
<small class="text-muted">Shop-Umsatz: <span id="sum-shop-net">0</span> €</small>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card-datatable table-responsive pt-0">
|
||||
<table class="datatables-style table table-striped table-bordered" id="datatable-invoice">
|
||||
<thead>
|
||||
|
|
@ -94,6 +124,68 @@
|
|||
</div>
|
||||
|
||||
<script>
|
||||
function toggleRecalculateButton() {
|
||||
var memberId = $('select[name=points_filter_member_id]').val();
|
||||
var month = $('select[name=points_filter_month]').val();
|
||||
var year = $('select[name=points_filter_year]').val();
|
||||
|
||||
if (memberId && month && year) {
|
||||
$('#recalc_member_id').val(memberId);
|
||||
$('#recalc_month').val(month);
|
||||
$('#recalc_year').val(year);
|
||||
$('#recalculate-form').show();
|
||||
loadSummary();
|
||||
} else {
|
||||
$('#recalculate-form').hide();
|
||||
$('#points-summary').hide();
|
||||
}
|
||||
}
|
||||
|
||||
function loadSummary() {
|
||||
var memberId = $('select[name=points_filter_member_id]').val();
|
||||
var month = $('select[name=points_filter_month]').val();
|
||||
var year = $('select[name=points_filter_year]').val();
|
||||
|
||||
if (!memberId || !month || !year) {
|
||||
$('#points-summary').hide();
|
||||
return;
|
||||
}
|
||||
|
||||
$.ajax({
|
||||
url: '{!! route('admin_business_points_summary') !!}',
|
||||
type: 'GET',
|
||||
data: {
|
||||
points_filter_member_id: memberId,
|
||||
points_filter_month: month,
|
||||
points_filter_year: year
|
||||
},
|
||||
success: function(response) {
|
||||
if (response.success && response.data) {
|
||||
var data = response.data;
|
||||
$('#sum-kp-points').text(data.total_KP_points.toLocaleString('de-DE'));
|
||||
$('#sum-tp-points').text(data.total_TP_points.toLocaleString('de-DE'));
|
||||
$('#sum-shop-points').text(data.month_shop_points.toLocaleString('de-DE'));
|
||||
$('#sum-kp-net').text(data.month_total_net.toLocaleString('de-DE', {minimumFractionDigits: 2, maximumFractionDigits: 2}));
|
||||
$('#sum-shop-net').text(data.month_shop_total_net.toLocaleString('de-DE', {minimumFractionDigits: 2, maximumFractionDigits: 2}));
|
||||
$('#sum-total-net').text(data.total_net.toLocaleString('de-DE', {minimumFractionDigits: 2, maximumFractionDigits: 2}));
|
||||
$('#points-summary').show();
|
||||
} else {
|
||||
$('#points-summary').hide();
|
||||
}
|
||||
},
|
||||
error: function() {
|
||||
$('#points-summary').hide();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function confirmRecalculate() {
|
||||
var month = $('#recalc_month').val();
|
||||
var year = $('#recalc_year').val();
|
||||
var monthPadded = month.toString().padStart(2, '0');
|
||||
return confirm('Möchten Sie die Punkte für den ausgewählten Berater im Monat ' + monthPadded + '/' + year + ' wirklich neu berechnen?');
|
||||
}
|
||||
|
||||
$( document ).ready(function() {
|
||||
var oTable = $('#datatable-invoice').DataTable({
|
||||
"processing": true,
|
||||
|
|
@ -132,13 +224,27 @@
|
|||
"url": "/js/datatables-{{ \App::getLocale() }}.json"
|
||||
}
|
||||
});
|
||||
|
||||
// Toggle button on filter change
|
||||
$('select.on_change_select').on('change', function(){
|
||||
toggleRecalculateButton();
|
||||
oTable.draw();
|
||||
});
|
||||
|
||||
$('input.on_keyup_input').on('keyup', function(){
|
||||
oTable.draw();
|
||||
});
|
||||
|
||||
// Initial toggle on page load
|
||||
toggleRecalculateButton();
|
||||
|
||||
// Reload summary after table draw completes
|
||||
oTable.on('draw', function() {
|
||||
var memberId = $('select[name=points_filter_member_id]').val();
|
||||
if (memberId) {
|
||||
loadSummary();
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@endsection
|
||||
|
|
|
|||
|
|
@ -0,0 +1,277 @@
|
|||
<table class="table user-view-table m-0">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>{{ __('team.account') }}:</td>
|
||||
<td>
|
||||
@if($TreeCalcBot->__get('business_user')->active_account)
|
||||
<span class="badge badge-outline-success">{{ __('team.active') }}</span>
|
||||
@else
|
||||
<span class="badge badge-outline-danger">{{ __('team.not_active') }}</span>
|
||||
@endif
|
||||
@if($TreeCalcBot->__get('business_user')->payment_account_date)
|
||||
{{ __('team.until') }}: {{ formatDate($TreeCalcBot->__get('business_user')->payment_account_date) }}
|
||||
@endif
|
||||
(ID: {{ $TreeCalcBot->__get('business_user')->m_account }}) <span class="badge badge-outline-default">v2</span>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>{{ __('team.date') }}:</td>
|
||||
<td>
|
||||
<strong>{{ HTMLHelper::getMonth($data['month']) }} {{ $data['year'] }}</strong> |
|
||||
@if($TreeCalcBot->__get('business_user')->isSave())
|
||||
{{ __('team.completed') }}:
|
||||
<span class="badge badge-outline-success"><i class="fa fa-check-circle"></i></span>
|
||||
{{-- @if(Auth::user()->isSySAdmin())
|
||||
<a target="_blank" class="btn btn-outline-secondary btn-xs" href="{{ route('admin_business_optimized_user_detail', [$user->id, 'force_live' => true]) }}">
|
||||
<i class="fa fa-redo"></i> {{ __('Live Berechnung') }}
|
||||
</a>
|
||||
@endif --}}
|
||||
@else
|
||||
{{ __('team.open') }}:
|
||||
<span class="badge badge-outline-warning-dark"><i class="fa fa-history"></i></span>
|
||||
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{ __('team.career_level') }}:</td>
|
||||
<td>
|
||||
{{ \App\Services\TranslationHelper::transUserLevelName($TreeCalcBot->__get('business_user')->user_level_name) }}
|
||||
<span class="badge badge-outline-success"> {{ __('team.KU') }} {{ $TreeCalcBot->__get('business_user')->qual_kp }} / {{ __('team.PP') }} {{ formatNumber($TreeCalcBot->__get('business_user')->qual_pp, 0) }}</span>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{ __('team.sponsor') }}:</td>
|
||||
<td>
|
||||
@if($TreeCalcBot->__get('business_user')->sponsor && $TreeCalcBot->__get('business_user')->sponsor->is_sponsor)
|
||||
{{ $TreeCalcBot->__get('business_user')->sponsor->first_name }} {{ $TreeCalcBot->__get('business_user')->sponsor->last_name }} |
|
||||
{{ $TreeCalcBot->__get('business_user')->sponsor->email }} |
|
||||
{{ $TreeCalcBot->__get('business_user')->sponsor->m_account }}
|
||||
@else
|
||||
-
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{ __('team.consultant_margin') }}:</td>
|
||||
<td>
|
||||
{{ $TreeCalcBot->__get('business_user')->margin }} %
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{ __('team.shop_commission') }}:</td>
|
||||
<td>
|
||||
{{ $TreeCalcBot->__get('business_user')->margin_shop }} %
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>{{ __('team.net_turnover') }}:</td>
|
||||
<td>
|
||||
<strong>{{ formatNumber($TreeCalcBot->__get('business_user')->sales_volume_total_sum) }} €</strong>
|
||||
({{ __('team.own') }}: {{ formatNumber($TreeCalcBot->__get('business_user')->sales_volume_total) }} € | {{ __('team.shop') }}: {{ formatNumber($TreeCalcBot->__get('business_user')->sales_volume_total_shop) }} €)
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{ __('team.customer_points') }}:</td>
|
||||
<td>
|
||||
<strong>{{ formatNumber($TreeCalcBot->__get('business_user')->sales_volume_points_KP_sum, 0) }} {{ __('team.KU') }}</strong>
|
||||
({{ __('team.own') }}: {{ formatNumber($TreeCalcBot->__get('business_user')->sales_volume_KP_points, 0) }} | {{ __('team.shop') }}: {{ formatNumber($TreeCalcBot->__get('business_user')->sales_volume_points_shop, 0) }})
|
||||
<span class="badge {{ $TreeCalcBot->__get('business_user')->isQualKP() ? 'badge-outline-success' : 'badge-outline-warning-dark' }}"> {{ __('team.KU') }} {{ $TreeCalcBot->__get('business_user')->qual_kp }}</span>
|
||||
@if($TreeCalcBot->__get('business_user')->getRestQualKP() > 0)
|
||||
<span class="badge badge-outline-info" title="Überschüssige KU-Punkte werden als Bonus zu den TP hinzugefügt">
|
||||
Rest-KU: {{ formatNumber($TreeCalcBot->__get('business_user')->getRestQualKP(), 0) }}
|
||||
</span>
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
@if($TreeCalcBot->__get('business_user')->version == 1)
|
||||
<tr>
|
||||
<td>{{ __('team.qualification_points') }}:</td>
|
||||
<td>
|
||||
<strong>{{ formatNumber($TreeCalcBot->__get('business_user')->total_qual_pp, 0) }} {{ __('team.TP') }}</strong> (+ {{ __('team.volume_KU') }})
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{ __('team.qualification_commission') }}:</td>
|
||||
<td>
|
||||
@if($TreeCalcBot->__get('business_user')->isQualLevel())
|
||||
<span class="badge {{ $TreeCalcBot->__get('business_user')->isQualEqualLevel() ? 'badge-outline-success' : 'badge-outline-info' }}">
|
||||
{{ __('team.KP') }} {{ formatNumber($TreeCalcBot->__get('business_user')->sales_volume_points_KP_sum, 0) }} /
|
||||
<strong>{{ formatNumber($TreeCalcBot->__get('business_user')->qual_user_level['qual_kp'], 0) }}</strong> |
|
||||
{{ __('team.TP') }} {{ formatNumber($TreeCalcBot->__get('business_user')->total_qual_pp, 0) }} /
|
||||
<strong>{{ formatNumber($TreeCalcBot->__get('business_user')->qual_user_level['qual_pp'], 0) }}</strong>
|
||||
| {{ $TreeCalcBot->__get('business_user')->qual_user_level['name'] }}</span>
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
@endif
|
||||
|
||||
@if($TreeCalcBot->__get('business_user')->version == 2)
|
||||
<tr>
|
||||
<td>{{ __('team.payline_points') }}:</td>
|
||||
<td>
|
||||
<strong>{{ formatNumber($TreeCalcBot->__get('business_user')->payline_points, 0) }} {{ __('team.PP') }}</strong>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>{{ __('team.qualification_points') }}:</td>
|
||||
<td>
|
||||
<strong>{{ formatNumber($TreeCalcBot->__get('business_user')->payline_points_qual_kp, 0) }} {{ __('team.PP') }}</strong>
|
||||
<small class="text-muted">
|
||||
({{ formatNumber($TreeCalcBot->__get('business_user')->payline_points ?? 0, 0) }} Payline
|
||||
@if($TreeCalcBot->__get('business_user')->getRestQualKP() > 0)
|
||||
+ {{ formatNumber($TreeCalcBot->__get('business_user')->getRestQualKP(), 0) }} Rest-KU
|
||||
@endif
|
||||
)
|
||||
</small>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{ __('team.current_commission_level') }}:</td>
|
||||
<td>
|
||||
@if($TreeCalcBot->__get('business_user')->isQualLevel())
|
||||
<span class="badge {{ $TreeCalcBot->__get('business_user')->isQualEqualLevel() ? 'badge-outline-success' : 'badge-outline-info' }}">
|
||||
{{ __('team.KU') }} {{ formatNumber($TreeCalcBot->__get('business_user')->calc_qual_kp, 0) }} /
|
||||
<strong>{{ formatNumber($TreeCalcBot->__get('business_user')->qual_user_level['qual_kp'], 0) }}</strong> |
|
||||
{{ __('team.PP') }} {{ formatNumber($TreeCalcBot->__get('business_user')->payline_points_qual_kp, 0) }} /
|
||||
<strong>{{ formatNumber($TreeCalcBot->__get('business_user')->qual_user_level['qual_pp'], 0) }}</strong>
|
||||
| {{ \App\Services\TranslationHelper::transUserLevelName($TreeCalcBot->__get('business_user')->qual_user_level['name']) }}</span>
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
@if($TreeCalcBot->__get('business_user')->qual_user_level_next)
|
||||
<tr>
|
||||
<td>{{ __('team.next_commission_level') }}:</td>
|
||||
<td>
|
||||
<span class="badge badge-outline-warning-dark">
|
||||
{{ __('team.KU') }} {{ formatNumber($TreeCalcBot->__get('business_user')->qual_user_level_next['_calculated_qual_kp'], 0) }} /
|
||||
<strong>{{ formatNumber($TreeCalcBot->__get('business_user')->qual_user_level_next['qual_kp'], 0) }}</strong> |
|
||||
{{ __('team.PP') }} {{ formatNumber($TreeCalcBot->__get('business_user')->qual_user_level_next['_calculated_payline_points_qual_kp'], 0) }} /
|
||||
<strong>{{ formatNumber($TreeCalcBot->__get('business_user')->qual_user_level_next['qual_pp'], 0) }}</strong>
|
||||
| {{ \App\Services\TranslationHelper::transUserLevelName($TreeCalcBot->__get('business_user')->qual_user_level_next['name']) }}</span>
|
||||
</td>
|
||||
</tr>
|
||||
@endif
|
||||
@endif
|
||||
|
||||
<tr>
|
||||
<td>@if($TreeCalcBot->__get('business_user')->next_qual_user_level) {{ __('team.qualification') }}<br> @endif {{ __('team.next_career_level') }}:</td>
|
||||
<td>
|
||||
@if($TreeCalcBot->__get('business_user')->next_qual_user_level)
|
||||
<span class="badge badge-outline-success">
|
||||
{{ __('team.KU') }} {{ formatNumber($TreeCalcBot->__get('business_user')->next_qual_user_level['_calculated_qual_kp'], 0) }} /
|
||||
<strong>{{ formatNumber($TreeCalcBot->__get('business_user')->next_qual_user_level['qual_kp'], 0) }}</strong> |
|
||||
{{ __('team.TP') }} {{ formatNumber($TreeCalcBot->__get('business_user')->next_qual_user_level['_calculated_payline_points_qual_kp'], 0) }} /
|
||||
<strong>{{ formatNumber($TreeCalcBot->__get('business_user')->next_qual_user_level['qual_pp'], 0) }}</strong>
|
||||
| {{ \App\Services\TranslationHelper::transUserLevelName($TreeCalcBot->__get('business_user')->next_qual_user_level['name']) }}</span>
|
||||
@elseif($TreeCalcBot->__get('business_user')->next_can_user_level)
|
||||
<span class="badge badge-outline-warning-dark">
|
||||
{{ __('team.KU') }} {{ formatNumber($TreeCalcBot->__get('business_user')->next_can_user_level['_calculated_qual_kp'], 0) }} /
|
||||
<strong>{{ formatNumber($TreeCalcBot->__get('business_user')->next_can_user_level['qual_kp'], 0) }}</strong> |
|
||||
{{ __('team.TP') }} {{ formatNumber($TreeCalcBot->__get('business_user')->next_can_user_level['_calculated_payline_points_qual_kp'], 0) }} /
|
||||
<strong>{{ formatNumber($TreeCalcBot->__get('business_user')->next_can_user_level['qual_pp'], 0) }}</strong>
|
||||
| {{ \App\Services\TranslationHelper::transUserLevelName($TreeCalcBot->__get('business_user')->next_can_user_level['name']) }}</span>
|
||||
@else
|
||||
<span class="badge badge-outline-warning"><i class="fa fa-times"></i></span>
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>{{ __('team.commission_shop') }}:</strong></td>
|
||||
<td>
|
||||
<span class="badge badge-primary" style="font-size: 1em;"><strong>{{ formatNumber($TreeCalcBot->__get('business_user')->commission_shop_sales) }} €</strong></span>
|
||||
|
||||
({{ __('team.sales_store_net') }}: {{ formatNumber($TreeCalcBot->__get('business_user')->sales_volume_total_shop) }} € / {{ $TreeCalcBot->__get('business_user')->margin_shop }} %)
|
||||
</td>
|
||||
</tr>
|
||||
@if($TreeCalcBot->__get('business_user')->version == 1)
|
||||
<tr>
|
||||
<td><strong>{{ __('team.commission_team') }}:</strong></td>
|
||||
<td>
|
||||
<span class="badge badge-primary" style="font-size: 1em;"><strong>{{ formatNumber($TreeCalcBot->__get('business_user')->commission_pp_total) }} €</strong></span>
|
||||
</td>
|
||||
</tr>
|
||||
@endif
|
||||
@if($TreeCalcBot->__get('business_user')->version == 2)
|
||||
<tr>
|
||||
<td><strong>{{ __('team.commission_payline') }}:</strong></td>
|
||||
<td>
|
||||
<span class="badge badge-primary" style="font-size: 1em;"><strong>{{ formatNumber($TreeCalcBot->__get('business_user')->commission_pp_total) }} €</strong></span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>{{ __('team.commission_WB') }}:</strong></td>
|
||||
<td>
|
||||
<span class="badge badge-primary" style="font-size: 1em;"><strong>{{ formatNumber($TreeCalcBot->__get('business_user')->commission_growth_total) }} €</strong></span>
|
||||
</td>
|
||||
</tr>
|
||||
@endif
|
||||
<tr>
|
||||
<td><strong>{{ __('team.commission_total') }}:</strong></td>
|
||||
<td>
|
||||
<span class="badge badge-secondary" style="font-size: 1em;"><strong>{{ formatNumber($TreeCalcBot->__get('business_user')->getCommissionTotal()) }} €</strong></span>
|
||||
</td>
|
||||
</tr>
|
||||
@if($TreeCalcBot->__get('business_user')->version == 2)
|
||||
|
||||
{{-- <tr>
|
||||
<td>Team Points:</td>
|
||||
<td>
|
||||
<strong>{{ formatNumber($TreeCalcBot->__get('business_user')->total_pp, 0) }} TP</strong>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Qualifikation Team Points:</td>
|
||||
<td>
|
||||
<strong>{{ formatNumber($TreeCalcBot->__get('business_user')->payline_points_qual_kp, 0) }} TP</strong> (+ Volumen KP)
|
||||
</td>
|
||||
</tr>
|
||||
--}}
|
||||
@endif
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
<hr class="border-light m-0 mb-2">
|
||||
<div class="table-responsive">
|
||||
<table class="table card-table m-0">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>{{__('tables.line')}}</th>
|
||||
<th>{{__('tables.points')}}</th>
|
||||
<th>{{__('tables.commission')}} %</th>
|
||||
<th>{{__('tables.commission')}} €</th>
|
||||
</tr>
|
||||
|
||||
@foreach (array_reverse($TreeCalcBot->__get('business_user')->business_lines->toArray(), true) as $line => $object)
|
||||
<tr>
|
||||
<td>
|
||||
|
||||
@if($line <= $TreeCalcBot->__get('business_user')->getQualLevelPaylines())
|
||||
<div class="font-weight-bolder line-height-1 my-2 text-dark badge badge-outline-success">{{ $line }}. {{ __('team.PP') }}</div>
|
||||
@elseif($TreeCalcBot->__get('business_user')->isQualLevelGrowth($line))
|
||||
<div class="font-weight-bolder line-height-1 my-2 text-dark badge badge-outline-warning-dark">{{ $line }}. {{ __('team.WB') }}</div>
|
||||
@else
|
||||
<div class="font-weight-bolder line-height-1 my-2 text-dark badge badge-outline-dark">{{ $line }}.</div>
|
||||
@endif
|
||||
</td>
|
||||
<td>{{ formatNumber($TreeCalcBot->getKeybyLine($line, 'points'), 0) }}</td>
|
||||
<td>{{ formatNumber($TreeCalcBot->getKeybyLine($line, 'margin'), 2) }} %</td>
|
||||
<td>{{ formatNumber($TreeCalcBot->getKeybyLine($line, 'commission'), 2) }} €</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td>{{__('tables.total')}}</td>
|
||||
<td>{{ formatNumber($TreeCalcBot->__get('business_user')->total_pp, 0) }}</td>
|
||||
<td></td>
|
||||
<td><strong>{{ formatNumber($TreeCalcBot->__get('business_user')->commission_pp_total, 2) }} €</strong></td>
|
||||
</tr>
|
||||
|
||||
</tfoot>
|
||||
</table>
|
||||
</div>
|
||||
|
|
@ -38,7 +38,7 @@
|
|||
<td>{{ __('team.career_level') }}:</td>
|
||||
<td>
|
||||
{{ \App\Services\TranslationHelper::transUserLevelName($TreeCalcBot->__get('business_user')->user_level_name) }}
|
||||
<span class="badge badge-outline-success"> {{ __('team.KU') }} {{ $TreeCalcBot->__get('business_user')->qual_kp }} / {{ __('team.PP') }} {{ formatNumber($TreeCalcBot->__get('business_user')->qual_pp, 0) }}</span>
|
||||
<span class="badge badge-outline-success"> {{ __('team.KU') }} {{ $TreeCalcBot->__get('business_user')->qual_kp }} / {{ __('team.PP') }} {{ formatNumber($TreeCalcBot->__get('business_user')->qual_pp) }}</span>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
|
|
@ -77,12 +77,12 @@
|
|||
<tr>
|
||||
<td>{{ __('team.customer_points') }}:</td>
|
||||
<td>
|
||||
<strong>{{ formatNumber($TreeCalcBot->__get('business_user')->sales_volume_points_KP_sum, 0) }} {{ __('team.KU') }}</strong>
|
||||
({{ __('team.own') }}: {{ formatNumber($TreeCalcBot->__get('business_user')->sales_volume_KP_points, 0) }} | {{ __('team.shop') }}: {{ formatNumber($TreeCalcBot->__get('business_user')->sales_volume_points_shop, 0) }})
|
||||
<strong>{{ formatNumber($TreeCalcBot->__get('business_user')->sales_volume_points_KP_sum) }} {{ __('team.KU') }}</strong>
|
||||
({{ __('team.own') }}: {{ formatNumber($TreeCalcBot->__get('business_user')->sales_volume_KP_points) }} | {{ __('team.shop') }}: {{ formatNumber($TreeCalcBot->__get('business_user')->sales_volume_points_shop) }})
|
||||
<span class="badge {{ $TreeCalcBot->__get('business_user')->isQualKP() ? 'badge-outline-success' : 'badge-outline-warning-dark' }}"> {{ __('team.KU') }} {{ $TreeCalcBot->__get('business_user')->qual_kp }}</span>
|
||||
@if($TreeCalcBot->__get('business_user')->getRestQualKP() > 0)
|
||||
<span class="badge badge-outline-info" title="Überschüssige KU-Punkte werden als Bonus zu den TP hinzugefügt">
|
||||
Rest-KU: {{ formatNumber($TreeCalcBot->__get('business_user')->getRestQualKP(), 0) }}
|
||||
Rest-KU: {{ formatNumber($TreeCalcBot->__get('business_user')->getRestQualKP()) }}
|
||||
</span>
|
||||
@endif
|
||||
</td>
|
||||
|
|
@ -91,7 +91,7 @@
|
|||
<tr>
|
||||
<td>{{ __('team.qualification_points') }}:</td>
|
||||
<td>
|
||||
<strong>{{ formatNumber($TreeCalcBot->__get('business_user')->total_qual_pp, 0) }} {{ __('team.TP') }}</strong> (+ {{ __('team.volume_KU') }})
|
||||
<strong>{{ formatNumber($TreeCalcBot->__get('business_user')->total_qual_pp) }} {{ __('team.TP') }}</strong> (+ {{ __('team.volume_KU') }})
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
|
@ -99,10 +99,10 @@
|
|||
<td>
|
||||
@if($TreeCalcBot->__get('business_user')->isQualLevel())
|
||||
<span class="badge {{ $TreeCalcBot->__get('business_user')->isQualEqualLevel() ? 'badge-outline-success' : 'badge-outline-info' }}">
|
||||
{{ __('team.KP') }} {{ formatNumber($TreeCalcBot->__get('business_user')->sales_volume_points_KP_sum, 0) }} /
|
||||
<strong>{{ formatNumber($TreeCalcBot->__get('business_user')->qual_user_level['qual_kp'], 0) }}</strong> |
|
||||
{{ __('team.TP') }} {{ formatNumber($TreeCalcBot->__get('business_user')->total_qual_pp, 0) }} /
|
||||
<strong>{{ formatNumber($TreeCalcBot->__get('business_user')->qual_user_level['qual_pp'], 0) }}</strong>
|
||||
{{ __('team.KP') }} {{ formatNumber($TreeCalcBot->__get('business_user')->sales_volume_points_KP_sum) }} /
|
||||
<strong>{{ formatNumber($TreeCalcBot->__get('business_user')->qual_user_level['qual_kp']) }}</strong> |
|
||||
{{ __('team.TP') }} {{ formatNumber($TreeCalcBot->__get('business_user')->total_qual_pp) }} /
|
||||
<strong>{{ formatNumber($TreeCalcBot->__get('business_user')->qual_user_level['qual_pp']) }}</strong>
|
||||
| {{ $TreeCalcBot->__get('business_user')->qual_user_level['name'] }}</span>
|
||||
@endif
|
||||
</td>
|
||||
|
|
@ -113,18 +113,18 @@
|
|||
<tr>
|
||||
<td>{{ __('team.payline_points') }}:</td>
|
||||
<td>
|
||||
<strong>{{ formatNumber($TreeCalcBot->__get('business_user')->payline_points, 0) }} {{ __('team.PP') }}</strong>
|
||||
<strong>{{ formatNumber($TreeCalcBot->__get('business_user')->payline_points) }} {{ __('team.PP') }}</strong>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>{{ __('team.qualification_points') }}:</td>
|
||||
<td>
|
||||
<strong>{{ formatNumber($TreeCalcBot->__get('business_user')->payline_points_qual_kp, 0) }} {{ __('team.PP') }}</strong>
|
||||
<strong>{{ formatNumber($TreeCalcBot->__get('business_user')->payline_points_qual_kp) }} {{ __('team.PP') }}</strong>
|
||||
<small class="text-muted">
|
||||
({{ formatNumber($TreeCalcBot->__get('business_user')->payline_points ?? 0, 0) }} Payline
|
||||
({{ formatNumber($TreeCalcBot->__get('business_user')->payline_points ?? 0) }} Payline
|
||||
@if($TreeCalcBot->__get('business_user')->getRestQualKP() > 0)
|
||||
+ {{ formatNumber($TreeCalcBot->__get('business_user')->getRestQualKP(), 0) }} Rest-KU
|
||||
+ {{ formatNumber($TreeCalcBot->__get('business_user')->getRestQualKP()) }} Rest-KU
|
||||
@endif
|
||||
)
|
||||
</small>
|
||||
|
|
@ -135,10 +135,10 @@
|
|||
<td>
|
||||
@if($TreeCalcBot->__get('business_user')->isQualLevel())
|
||||
<span class="badge {{ $TreeCalcBot->__get('business_user')->isQualEqualLevel() ? 'badge-outline-success' : 'badge-outline-info' }}">
|
||||
{{ __('team.KU') }} {{ formatNumber($TreeCalcBot->__get('business_user')->sales_volume_points_KP_sum, 0) }} /
|
||||
<strong>{{ formatNumber($TreeCalcBot->__get('business_user')->qual_user_level['qual_kp'], 0) }}</strong> |
|
||||
{{ __('team.PP') }} {{ formatNumber($TreeCalcBot->__get('business_user')->payline_points_qual_kp, 0) }} /
|
||||
<strong>{{ formatNumber($TreeCalcBot->__get('business_user')->qual_user_level['qual_pp'], 0) }}</strong>
|
||||
{{ __('team.KU') }} {{ formatNumber($TreeCalcBot->__get('business_user')->calc_qual_kp) }} /
|
||||
<strong>{{ formatNumber($TreeCalcBot->__get('business_user')->qual_user_level['qual_kp']) }}</strong> |
|
||||
{{ __('team.PP') }} {{ formatNumber($TreeCalcBot->__get('business_user')->payline_points_qual_kp) }} /
|
||||
<strong>{{ formatNumber($TreeCalcBot->__get('business_user')->qual_user_level['qual_pp']) }}</strong>
|
||||
| {{ \App\Services\TranslationHelper::transUserLevelName($TreeCalcBot->__get('business_user')->qual_user_level['name']) }}</span>
|
||||
@endif
|
||||
</td>
|
||||
|
|
@ -148,32 +148,32 @@
|
|||
<td>{{ __('team.next_commission_level') }}:</td>
|
||||
<td>
|
||||
<span class="badge badge-outline-warning-dark">
|
||||
{{ __('team.KU') }} {{ formatNumber($TreeCalcBot->__get('business_user')->sales_volume_points_KP_sum, 0) }} /
|
||||
<strong>{{ formatNumber($TreeCalcBot->__get('business_user')->qual_user_level_next['qual_kp'], 0) }}</strong> |
|
||||
{{ __('team.PP') }} {{ formatNumber($TreeCalcBot->__get('business_user')->payline_points_qual_kp, 0) }} /
|
||||
<strong>{{ formatNumber($TreeCalcBot->__get('business_user')->qual_user_level_next['qual_pp'], 0) }}</strong>
|
||||
{{ __('team.KU') }} {{ formatNumber($TreeCalcBot->__get('business_user')->qual_user_level_next['_calculated_qual_kp']) }} /
|
||||
<strong>{{ formatNumber($TreeCalcBot->__get('business_user')->qual_user_level_next['qual_kp']) }}</strong> |
|
||||
{{ __('team.PP') }} {{ formatNumber($TreeCalcBot->__get('business_user')->qual_user_level_next['_calculated_payline_points_qual_kp']) }} /
|
||||
<strong>{{ formatNumber($TreeCalcBot->__get('business_user')->qual_user_level_next['qual_pp']) }}</strong>
|
||||
| {{ \App\Services\TranslationHelper::transUserLevelName($TreeCalcBot->__get('business_user')->qual_user_level_next['name']) }}</span>
|
||||
</td>
|
||||
</tr>
|
||||
@endif
|
||||
@endif
|
||||
|
||||
|
||||
<tr>
|
||||
<td>@if($TreeCalcBot->__get('business_user')->next_qual_user_level) {{ __('team.qualification') }}<br> @endif {{ __('team.next_career_level') }}:</td>
|
||||
<td>
|
||||
@if($TreeCalcBot->__get('business_user')->next_qual_user_level)
|
||||
<span class="badge badge-outline-success">
|
||||
{{ __('team.KU') }} {{ formatNumber($TreeCalcBot->__get('business_user')->sales_volume_points_KP_sum, 0) }} /
|
||||
<strong>{{ formatNumber($TreeCalcBot->__get('business_user')->next_qual_user_level['qual_kp'], 0) }}</strong> |
|
||||
{{ __('team.TP') }} {{ formatNumber($TreeCalcBot->__get('business_user')->payline_points_qual_kp, 0) }} /
|
||||
<strong>{{ formatNumber($TreeCalcBot->__get('business_user')->next_qual_user_level['qual_pp'], 0) }}</strong>
|
||||
{{ __('team.KU') }} {{ formatNumber($TreeCalcBot->__get('business_user')->next_qual_user_level['_calculated_qual_kp']) }} /
|
||||
<strong>{{ formatNumber($TreeCalcBot->__get('business_user')->next_qual_user_level['qual_kp']) }}</strong> |
|
||||
{{ __('team.TP') }} {{ formatNumber($TreeCalcBot->__get('business_user')->next_qual_user_level['_calculated_payline_points_qual_kp']) }} /
|
||||
<strong>{{ formatNumber($TreeCalcBot->__get('business_user')->next_qual_user_level['qual_pp']) }}</strong>
|
||||
| {{ \App\Services\TranslationHelper::transUserLevelName($TreeCalcBot->__get('business_user')->next_qual_user_level['name']) }}</span>
|
||||
@elseif($TreeCalcBot->__get('business_user')->next_can_user_level)
|
||||
<span class="badge badge-outline-warning-dark">
|
||||
{{ __('team.KU') }} {{ formatNumber($TreeCalcBot->__get('business_user')->sales_volume_points_KP_sum, 0) }} /
|
||||
<strong>{{ formatNumber($TreeCalcBot->__get('business_user')->next_can_user_level['qual_kp'], 0) }}</strong> |
|
||||
{{ __('team.TP') }} {{ formatNumber($TreeCalcBot->__get('business_user')->payline_points_qual_kp, 0) }} /
|
||||
<strong>{{ formatNumber($TreeCalcBot->__get('business_user')->next_can_user_level['qual_pp'], 0) }}</strong>
|
||||
{{ __('team.KU') }} {{ formatNumber($TreeCalcBot->__get('business_user')->next_can_user_level['_calculated_qual_kp']) }} /
|
||||
<strong>{{ formatNumber($TreeCalcBot->__get('business_user')->next_can_user_level['qual_kp']) }}</strong> |
|
||||
{{ __('team.TP') }} {{ formatNumber($TreeCalcBot->__get('business_user')->next_can_user_level['_calculated_payline_points_qual_kp']) }} /
|
||||
<strong>{{ formatNumber($TreeCalcBot->__get('business_user')->next_can_user_level['qual_pp']) }}</strong>
|
||||
| {{ \App\Services\TranslationHelper::transUserLevelName($TreeCalcBot->__get('business_user')->next_can_user_level['name']) }}</span>
|
||||
@else
|
||||
<span class="badge badge-outline-warning"><i class="fa fa-times"></i></span>
|
||||
|
|
@ -221,13 +221,13 @@
|
|||
{{-- <tr>
|
||||
<td>Team Points:</td>
|
||||
<td>
|
||||
<strong>{{ formatNumber($TreeCalcBot->__get('business_user')->total_pp, 0) }} TP</strong>
|
||||
<strong>{{ formatNumber($TreeCalcBot->__get('business_user')->total_pp) }} TP</strong>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Qualifikation Team Points:</td>
|
||||
<td>
|
||||
<strong>{{ formatNumber($TreeCalcBot->__get('business_user')->payline_points_qual_kp, 0) }} TP</strong> (+ Volumen KP)
|
||||
<strong>{{ formatNumber($TreeCalcBot->__get('business_user')->payline_points_qual_kp) }} TP</strong> (+ Volumen KP)
|
||||
</td>
|
||||
</tr>
|
||||
--}}
|
||||
|
|
@ -258,8 +258,8 @@
|
|||
<div class="font-weight-bolder line-height-1 my-2 text-dark badge badge-outline-dark">{{ $line }}.</div>
|
||||
@endif
|
||||
</td>
|
||||
<td>{{ formatNumber($TreeCalcBot->getKeybyLine($line, 'points'), 0) }}</td>
|
||||
<td>{{ formatNumber($TreeCalcBot->getKeybyLine($line, 'margin'), 1) }} %</td>
|
||||
<td>{{ formatNumber($TreeCalcBot->getKeybyLine($line, 'points')) }}</td>
|
||||
<td>{{ formatNumber($TreeCalcBot->getKeybyLine($line, 'margin'), 2) }} %</td>
|
||||
<td>{{ formatNumber($TreeCalcBot->getKeybyLine($line, 'commission'), 2) }} €</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
|
|
@ -267,11 +267,85 @@
|
|||
<tfoot>
|
||||
<tr>
|
||||
<td>{{__('tables.total')}}</td>
|
||||
<td>{{ formatNumber($TreeCalcBot->__get('business_user')->total_pp, 0) }}</td>
|
||||
<td>{{ formatNumber($TreeCalcBot->__get('business_user')->total_pp) }}</td>
|
||||
<td></td>
|
||||
<td><strong>{{ formatNumber($TreeCalcBot->__get('business_user')->commission_pp_total, 2) }} €</strong></td>
|
||||
</tr>
|
||||
|
||||
</tfoot>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@if(!empty($matrix = $TreeCalcBot->__get('business_user')->getGrowthBonusMatrix()))
|
||||
@php
|
||||
// Maximale Tiefe für Spalten ermitteln (für Matrix-Header)
|
||||
$maxLevel = 0;
|
||||
foreach($matrix as $leg) {
|
||||
if(!empty($leg['levels'])) {
|
||||
$maxKey = max(array_keys($leg['levels']));
|
||||
if($maxKey > $maxLevel) $maxLevel = $maxKey;
|
||||
}
|
||||
}
|
||||
// Begrenze Anzeige auf sinnvolle Breite (z.B. 20 Ebenen)
|
||||
$maxLevel = min($maxLevel, 20);
|
||||
@endphp
|
||||
|
||||
<div class="table-responsive mt-4">
|
||||
<h5 class="font-weight-bold mb-2">{{ __('team.commission_WB') ?? '(Tiefenbonus)' }}</h5>
|
||||
<table class="table card-table m-0 table-bordered table-sm text-center">
|
||||
<thead class="thead-light">
|
||||
<tr>
|
||||
<th style="width: 200px" class="text-left align-middle">Partner</th>
|
||||
@for($i = 1; $i <= $maxLevel; $i++)
|
||||
<th style="min-width: 80px">L{{ $i }}</th>
|
||||
@endfor
|
||||
<th class="text-right align-middle" style="width: 100px; border-left: 2px solid #dee2e6">Total</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($matrix as $leg)
|
||||
<tr>
|
||||
<td class="text-left align-middle">
|
||||
<div class="font-weight-bold text-truncate" style="max-width: 180px;" title="{{ $leg['user']['name'] }}">
|
||||
{{ $leg['user']['name'] }}
|
||||
</div>
|
||||
<div class="small text-muted">
|
||||
ID: {{ $leg['user']['id'] }} | {{ $leg['user']['level'] }}
|
||||
</div>
|
||||
</td>
|
||||
@for($i = 1; $i <= $maxLevel; $i++)
|
||||
@php $levelData = $leg['levels'][$i] ?? null; @endphp
|
||||
<td class="align-middle position-relative">
|
||||
@if($levelData)
|
||||
@if($levelData['commission'] > 0)
|
||||
<div class="font-weight-bold text-success" style="font-size: 0.9em">
|
||||
{{ formatNumber($levelData['commission'], 2) }}€
|
||||
</div>
|
||||
@else
|
||||
<div class="text-danger" style="font-size: 0.8em">0 €</div>
|
||||
@endif
|
||||
<div class="small text-muted" style="font-size: 0.75em">
|
||||
{{ formatNumber($levelData['volume']) }} / <span class="text-danger">{{ $levelData['details'][0]['pct'] ?? 0 }}%</span>
|
||||
</div>
|
||||
@if(!empty($levelData['has_blocker']))
|
||||
<div class="position-absolute" style="top: 0; right: 0; font-size: 0.6em;" title="Blocker: {{ $levelData['blocker_name'] }}">
|
||||
<i class="fa fa-shield-alt text-warning"></i>
|
||||
</div>
|
||||
@endif
|
||||
@else
|
||||
<span class="text-muted">-</span>
|
||||
@endif
|
||||
</td>
|
||||
@endfor
|
||||
<td class="text-right align-middle font-weight-bold" style="border-left: 2px solid #dee2e6">
|
||||
{{ formatNumber($leg['total_commission'], 2) }} €
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="small text-muted mt-1">
|
||||
{{ __('team.growth_bonus_details_description') }}
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
|
@ -27,6 +27,10 @@
|
|||
</div>
|
||||
|
||||
<div class="form-row">
|
||||
<div class="form-group col-sm-8">
|
||||
<label class="form-label" for="slug">{{ __('URL') }}</label>
|
||||
{{ Form::text('slug', $category->slug, array('placeholder'=>__('URL'), 'class'=>'form-control', 'id'=>'slug')) }}
|
||||
</div>
|
||||
{{--<div class="form-group col-8">
|
||||
<label for="parent_id" class="form-label">{{__('Hauptkategorie')}}</label>
|
||||
<select class="selectpicker" data-style="btn-default" name="">
|
||||
|
|
@ -39,6 +43,9 @@
|
|||
{{ Form::text('pos', $category->pos, array('placeholder'=>__('pos'), 'class'=>'form-control', 'id'=>'pos')) }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-row ml-1">
|
||||
URL: <a href="https://mivita.shop/produkte/{{ ($category->slug) }}" target="_blank">https://mivita.shop/produkte/{{ ($category->slug) }}</a>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -11,9 +11,9 @@
|
|||
<tr>
|
||||
<th style="max-width: 60px;"> </th>
|
||||
<th>{{__('Pos')}}</th>
|
||||
<th>{{__('Name')}}</th>
|
||||
<th>{{__('Kategorie')}}</th>
|
||||
{{--<th>{{__('Kategorie')}}</th>--}}
|
||||
<th>{{__('Headline')}}</th>
|
||||
<th>{{__('URL')}}</th>
|
||||
<th>{{__('tables.products')}}</th>
|
||||
<th>{{ __('activ') }}</th>
|
||||
|
||||
|
|
@ -34,6 +34,7 @@
|
|||
<td>@if($value->parent) {{ $value->parent->name }} @else {{ $value->name }} @endif</td>
|
||||
{{-- <td>@if($value->parent) {{ $value->name }} @else - @endif</td>--}}
|
||||
<td>{{ $value->headline }}</td>
|
||||
<td>{{ $value->slug }}</td>
|
||||
<td>{{ $value->product_categories->count() }}</td>
|
||||
<td>{{ $value->productCategoriesCountActive() }}</td>
|
||||
|
||||
|
|
|
|||
|
|
@ -109,6 +109,13 @@
|
|||
<div class="text-muted small">{{ __('Phone') }}</div>
|
||||
{{ $shopping_user->shipping_phone }}
|
||||
</div>
|
||||
@if($shopping_user->shipping_postnumber)
|
||||
<div class="col-md-3 mb-3">
|
||||
<div class="text-muted small">{{ __('payment.dhl_postnumber') }}</div>
|
||||
<span class="badge badge-info">{{ $shopping_user->shipping_postnumber }}</span>
|
||||
<small class="d-block text-muted">{{ __('payment.packstation_info') }}</small>
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
|
|
@ -21,6 +21,7 @@
|
|||
</div>
|
||||
<div class="col-md-3 mb-3">
|
||||
<a class="btn btn-sm btn-secondary mt-2" href="{{route('admin_customer_edit', [$shopping_user->id])}}">{{ __('customer.edit_customer_data') }}</a>
|
||||
<a class="btn btn-sm btn-danger mt-2" href="{{route('admin_customer_delete', [$shopping_user->id])}}" onclick="return confirm('{{ __('customer.delete_customer_confirm') }}')">{{ __('customer.delete_customer') }}</a>
|
||||
</div>
|
||||
</div>
|
||||
@else
|
||||
|
|
@ -201,7 +202,7 @@
|
|||
<small>
|
||||
<span class="text-muted">{{ __('order.content') }}: </span> {{ $shopping_order_item->product->contents }}<br>
|
||||
<span class="text-muted">{{ __('order.weight') }}: </span> {{ $shopping_order_item->product->weight }} g<br>
|
||||
<span class="text-muted">{{ __('order.points') }}: </span> {{ $shopping_order_item->product->points }}
|
||||
<span class="text-muted">{{ __('order.points') }}: </span> {{ $shopping_order_item->product->getFormattedPoints() }}
|
||||
</small>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -310,10 +311,17 @@
|
|||
@forelse($shopping_user->getAllOrdersByMember() as $shopping_order)
|
||||
<tr>
|
||||
<td>
|
||||
@if($isAdmin)
|
||||
<a href="{{ route('admin_sales_customers_detail', $shopping_order->id) }}"
|
||||
class="btn icon-btn btn-sm btn-primary">
|
||||
<span class="fa fa-edit"></span>
|
||||
</a>
|
||||
@else
|
||||
<a href="{{ route('user_shop_order_detail', $shopping_order->id) }}"
|
||||
class="btn icon-btn btn-sm btn-primary">
|
||||
<span class="fa fa-edit"></span>
|
||||
</a>
|
||||
@endif
|
||||
</td>
|
||||
<td>{{ $shopping_order->created_at->format('d.m.Y') }}</td>
|
||||
<td>
|
||||
|
|
|
|||
|
|
@ -219,6 +219,30 @@
|
|||
{{ Form::text('shipping_phone', $shopping_user->shipping_phone, array('placeholder'=>__('Phone'), 'class'=>'form-control', 'id'=>'shipping_phone', 'tabindex' => 26)) }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<div class="form-group col-md-12">
|
||||
<label class="form-label" for="shipping_postnumber">{{ __('payment.dhl_postnumber') }} <small class="text-muted">({{ __('optional') }})</small></label>
|
||||
{{ Form::text('shipping_postnumber', $shopping_user->shipping_postnumber, array('placeholder'=>'12345678', 'class'=>'form-control', 'id'=>'shipping_postnumber', 'maxlength'=>'20', 'tabindex' => 27)) }}
|
||||
<small class="form-text text-muted">{{ __('payment.packstation_info') }}</small>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{-- Alert-Box für Packstation-Hinweis --}}
|
||||
<div class="alert alert-warning alert-dismissible fade show" id="packstation-alert" style="display: @if($shopping_user->shipping_postnumber) block @else none @endif;">
|
||||
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
<h6 class="alert-heading"><i class="fa fa-exclamation-triangle"></i> <strong>{{ __('payment.packstation_alert_title') }}</strong></h6>
|
||||
<hr>
|
||||
<p class="mb-2"><strong>{{ __('payment.packstation_alert_intro') }}</strong></p>
|
||||
<ul class="mb-2 pl-3">
|
||||
<li><strong>{{ __('Street') }} / {{ __('House number') }}:</strong> {{ __('payment.packstation_alert_street') }} <em>({{ __('payment.packstation_alert_street_example') }})</em></li>
|
||||
<li><strong>{{ __('Postcode') }} / {{ __('City') }}:</strong> {{ __('payment.packstation_alert_location') }} <em>({{ __('payment.packstation_alert_not_home') }})</em></li>
|
||||
</ul>
|
||||
<p class="mb-0 small text-muted">
|
||||
<i class="fa fa-info-circle"></i> {{ __('payment.packstation_alert_footer') }}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="custom-control custom-checkbox m-0">
|
||||
|
|
@ -355,6 +379,24 @@
|
|||
});
|
||||
});
|
||||
|
||||
// Packstation Alert show|hide
|
||||
function togglePackstationAlert() {
|
||||
var postnumber = $('#shipping_postnumber').val();
|
||||
if (postnumber && postnumber.trim() !== '') {
|
||||
$('#packstation-alert').slideDown(300);
|
||||
} else {
|
||||
$('#packstation-alert').slideUp(300);
|
||||
}
|
||||
}
|
||||
|
||||
// Bei Eingabe im Postnummer-Feld
|
||||
$('#shipping_postnumber').on('input', function() {
|
||||
togglePackstationAlert();
|
||||
});
|
||||
|
||||
// Bei Seitenladen prüfen
|
||||
togglePackstationAlert();
|
||||
|
||||
$.extend( $.validator.messages, {
|
||||
required: "{{__('account.validator_required')}}",
|
||||
maxlength: $.validator.format( "{{__('account.validator_maxlength')}}" ),
|
||||
|
|
|
|||
|
|
@ -205,6 +205,16 @@
|
|||
@endsection
|
||||
|
||||
@section('scripts')
|
||||
<style>
|
||||
/* Highlight return shipments */
|
||||
#dhl-shipments-table tbody tr.return-shipment {
|
||||
background-color: rgba(255, 193, 7, 0.08) !important;
|
||||
border-left: 3px solid #ffc107;
|
||||
}
|
||||
#dhl-shipments-table tbody tr.return-shipment:hover {
|
||||
background-color: rgba(255, 193, 7, 0.15) !important;
|
||||
}
|
||||
</style>
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
// DataTable initialization
|
||||
|
|
@ -245,6 +255,7 @@ $(document).ready(function() {
|
|||
// Re-initialize tooltips on each table draw
|
||||
drawCallback: function () {
|
||||
$('[data-toggle="tooltip"]').tooltip();
|
||||
// Row classes are now added automatically by DataTables via DT_RowClass
|
||||
}
|
||||
});
|
||||
|
||||
|
|
@ -414,11 +425,15 @@ $(document).ready(function() {
|
|||
|
||||
$('#dhl-shipments-table').on('click', '.create-return-btn', function() {
|
||||
var shipmentId = $(this).data('shipment-id');
|
||||
var btn = $(this);
|
||||
|
||||
if (!confirm('Möchten Sie ein Retourenlabel für diese Sendung erstellen?')) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Disable button to prevent double-click
|
||||
btn.prop('disabled', true).html('<i class="fas fa-spinner fa-spin"></i>');
|
||||
|
||||
$.ajax({
|
||||
url: `/admin/dhl/shipment/${shipmentId}/return-label`,
|
||||
method: 'POST',
|
||||
|
|
@ -428,20 +443,25 @@ $(document).ready(function() {
|
|||
success: function(response) {
|
||||
if (response.success) {
|
||||
showAlert('success', response.message);
|
||||
location.reload();
|
||||
setTimeout(function() {
|
||||
location.reload();
|
||||
}, 1500);
|
||||
} else {
|
||||
showAlert('error', response.message);
|
||||
btn.prop('disabled', false).html('<i class="fas fa-undo"></i>');
|
||||
}
|
||||
},
|
||||
error: function(xhr) {
|
||||
showAlert('error', 'Fehler beim Erstellen des Retourenlabels.');
|
||||
var errorMsg = xhr.responseJSON ? xhr.responseJSON.message : 'Fehler beim Erstellen des Retourenlabels.';
|
||||
showAlert('error', errorMsg);
|
||||
btn.prop('disabled', false).html('<i class="fas fa-undo"></i>');
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$('#dhl-shipments-table').on('click', '.update-tracking-btn', function() {
|
||||
var shipmentId = $(this).data('shipment-id');
|
||||
|
||||
|
||||
$.ajax({
|
||||
url: `/admin/dhl/shipment/${shipmentId}/update-tracking`,
|
||||
method: 'POST',
|
||||
|
|
@ -463,6 +483,114 @@ $(document).ready(function() {
|
|||
}
|
||||
});
|
||||
});
|
||||
|
||||
// Send tracking email button
|
||||
$('#dhl-shipments-table').on('click', '.send-tracking-email-btn', function() {
|
||||
var shipmentId = $(this).data('shipment-id');
|
||||
var btn = $(this);
|
||||
|
||||
if (!confirm('Möchten Sie die Tracking-E-Mail an den Kunden senden?')) {
|
||||
return;
|
||||
}
|
||||
|
||||
btn.prop('disabled', true).html('<i class="fas fa-spinner fa-spin"></i>');
|
||||
|
||||
$.ajax({
|
||||
url: `/admin/dhl/shipment/${shipmentId}/send-tracking-email`,
|
||||
method: 'POST',
|
||||
data: {
|
||||
_token: '{{ csrf_token() }}'
|
||||
},
|
||||
success: function(response) {
|
||||
if (response.success) {
|
||||
showAlert('success', response.message);
|
||||
btn.removeClass('btn-outline-info').addClass('btn-success');
|
||||
btn.html('<i class="fas fa-envelope"></i>');
|
||||
btn.attr('title', 'E-Mail gesendet: ' + response.sent_at);
|
||||
} else {
|
||||
showAlert('error', response.message);
|
||||
btn.prop('disabled', false).html('<i class="fas fa-envelope"></i>');
|
||||
}
|
||||
},
|
||||
error: function(xhr) {
|
||||
var errorMsg = xhr.responseJSON ? xhr.responseJSON.message : 'Fehler beim Senden der E-Mail.';
|
||||
showAlert('error', errorMsg);
|
||||
btn.prop('disabled', false).html('<i class="fas fa-envelope"></i>');
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
// Cancel shipment button
|
||||
$('#dhl-shipments-table').on('click', '.cancel-shipment-btn', function() {
|
||||
var shipmentId = $(this).data('shipment-id');
|
||||
var btn = $(this);
|
||||
|
||||
if (!confirm('Möchten Sie diese Sendung wirklich stornieren?\n\nDas Label wird bei DHL ungültig und kann nicht mehr verwendet werden.')) {
|
||||
return;
|
||||
}
|
||||
|
||||
btn.prop('disabled', true).html('<i class="fas fa-spinner fa-spin"></i>');
|
||||
|
||||
$.ajax({
|
||||
url: `/admin/dhl/shipment/${shipmentId}/cancel`,
|
||||
method: 'DELETE',
|
||||
data: {
|
||||
_token: '{{ csrf_token() }}'
|
||||
},
|
||||
success: function(response) {
|
||||
if (response.success) {
|
||||
showAlert('success', response.message || 'Sendung wird storniert...');
|
||||
setTimeout(function() {
|
||||
table.ajax.reload();
|
||||
}, 2000);
|
||||
} else {
|
||||
showAlert('error', response.message);
|
||||
btn.prop('disabled', false).html('<i class="fas fa-ban"></i>');
|
||||
}
|
||||
},
|
||||
error: function(xhr) {
|
||||
var errorMsg = xhr.responseJSON ? xhr.responseJSON.message : 'Fehler beim Stornieren der Sendung.';
|
||||
showAlert('error', errorMsg);
|
||||
btn.prop('disabled', false).html('<i class="fas fa-ban"></i>');
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
// Create return label button
|
||||
$('#dhl-shipments-table').on('click', '.create-return-btn', function() {
|
||||
var shipmentId = $(this).data('shipment-id');
|
||||
var btn = $(this);
|
||||
|
||||
if (!confirm('Möchten Sie ein Retourenlabel für diese Sendung erstellen?')) {
|
||||
return;
|
||||
}
|
||||
|
||||
btn.prop('disabled', true).html('<i class="fas fa-spinner fa-spin"></i>');
|
||||
|
||||
$.ajax({
|
||||
url: `/admin/dhl/shipment/${shipmentId}/return-label`,
|
||||
method: 'POST',
|
||||
data: {
|
||||
_token: '{{ csrf_token() }}'
|
||||
},
|
||||
success: function(response) {
|
||||
if (response.success) {
|
||||
showAlert('success', response.message || 'Retourenlabel wird erstellt...');
|
||||
setTimeout(function() {
|
||||
table.ajax.reload();
|
||||
}, 2000);
|
||||
} else {
|
||||
showAlert('error', response.message);
|
||||
btn.prop('disabled', false).html('<i class="fas fa-undo"></i>');
|
||||
}
|
||||
},
|
||||
error: function(xhr) {
|
||||
var errorMsg = xhr.responseJSON ? xhr.responseJSON.message : 'Fehler beim Erstellen des Retourenlabels.';
|
||||
showAlert('error', errorMsg);
|
||||
btn.prop('disabled', false).html('<i class="fas fa-undo"></i>');
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
// Remove old auto-submit logic
|
||||
/*
|
||||
|
|
@ -474,6 +602,9 @@ $(document).ready(function() {
|
|||
|
||||
// Alert helper function
|
||||
function showAlert(type, message) {
|
||||
// Remove any existing alerts first to prevent duplicates
|
||||
$('.alert.alert-dismissible').remove();
|
||||
|
||||
var alertClass = type === 'success' ? 'alert-success' : 'alert-danger';
|
||||
var alertHtml = `
|
||||
<div class="alert ${alertClass} alert-dismissible fade show" role="alert">
|
||||
|
|
|
|||
|
|
@ -190,6 +190,41 @@
|
|||
value="{{ $shippingAddress['phone'] ?? '' }}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label for="shipping_email">E-Mail <span class="text-danger">*</span></label>
|
||||
<input type="email"
|
||||
class="form-control {{ empty($shippingAddress['email']) ? 'border-warning' : '' }}"
|
||||
name="shipping_email"
|
||||
id="shipping_email"
|
||||
value="{{ $shippingAddress['email'] ?? $order->shopping_user->email ?? '' }}"
|
||||
required>
|
||||
<small class="form-text text-muted">
|
||||
Wird für DHL Benachrichtigungen und Tracking-E-Mails verwendet.
|
||||
</small>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{-- DHL Packstation/Paketbox --}}
|
||||
<div class="col-md-12 mt-2">
|
||||
<hr>
|
||||
<h6 class="text-muted mb-2">
|
||||
<i class="fas fa-cube"></i>
|
||||
Packstation / Paketbox
|
||||
<small class="text-muted">(nur wenn zutreffend)</small>
|
||||
</h6>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label for="shipping_postnumber">DHL Postnummer <small class="text-muted">(optional)</small></label>
|
||||
<input type="text" class="form-control" name="shipping_postnumber" id="shipping_postnumber"
|
||||
value="{{ $shippingAddress['postnumber'] ?? '' }}" maxlength="20"
|
||||
placeholder="z.B. 12345678">
|
||||
<small class="form-text text-muted">
|
||||
Nur bei Lieferung an Packstation/Paketbox. Im Feld "Straße" dann "Packstation XXX" eintragen.
|
||||
</small>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -147,6 +147,14 @@
|
|||
</a>
|
||||
@endif
|
||||
|
||||
@if($shipment['can_send_email'] ?? false)
|
||||
<button type="button"
|
||||
class="btn btn-info btn-sm mb-2 send-tracking-email-modal-btn"
|
||||
data-shipment-id="{{ $shipment['id'] }}">
|
||||
<i class="fas fa-envelope"></i> Tracking-E-Mail senden
|
||||
</button>
|
||||
@endif
|
||||
|
||||
<a href="{{ route('admin.dhl.show', $shipment['id']) }}"
|
||||
class="btn btn-outline-primary btn-sm mb-2" target="_blank">
|
||||
<i class="fas fa-eye"></i> Details anzeigen
|
||||
|
|
@ -302,5 +310,42 @@ window.showAlert = function(type, message) {
|
|||
// Initialize modal
|
||||
$(document).ready(function() {
|
||||
// Modal is ready for interaction
|
||||
|
||||
// Tracking E-Mail senden Button
|
||||
$(document).on('click', '.send-tracking-email-modal-btn', function() {
|
||||
var shipmentId = $(this).data('shipment-id');
|
||||
var btn = $(this);
|
||||
|
||||
if (!confirm('Tracking-E-Mail an den Kunden senden?')) {
|
||||
return;
|
||||
}
|
||||
|
||||
btn.prop('disabled', true).html('<i class="fas fa-spinner fa-spin"></i> Wird gesendet...');
|
||||
|
||||
$.ajax({
|
||||
url: `/admin/dhl/shipment/${shipmentId}/send-tracking-email`,
|
||||
method: 'POST',
|
||||
data: {
|
||||
_token: '{{ csrf_token() }}'
|
||||
},
|
||||
success: function(response) {
|
||||
if (response.success) {
|
||||
showAlert('success', response.message);
|
||||
btn.removeClass('btn-info').addClass('btn-success')
|
||||
.html('<i class="fas fa-check"></i> E-Mail gesendet');
|
||||
|
||||
|
||||
} else {
|
||||
showAlert('error', response.message);
|
||||
btn.prop('disabled', false).html('<i class="fas fa-envelope"></i> Tracking-E-Mail senden');
|
||||
}
|
||||
},
|
||||
error: function(xhr) {
|
||||
var errorMsg = xhr.responseJSON ? xhr.responseJSON.message : 'Fehler beim Senden der E-Mail.';
|
||||
showAlert('error', errorMsg);
|
||||
btn.prop('disabled', false).html('<i class="fas fa-envelope"></i> Tracking-E-Mail senden');
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -4,11 +4,11 @@
|
|||
|
||||
<div class="d-flex justify-content-between align-items-center py-2 mb-4">
|
||||
<h4 class="font-weight-bold mb-0">
|
||||
<i class="fas fa-box text-primary"></i>
|
||||
<i class="fas fa-box {{ $shipment->type == 'return' ? 'text-warning' : 'text-primary' }}"></i>
|
||||
DHL Sendung #{{ $shipment->id }}
|
||||
@if($shipment->type == 'return')
|
||||
<span class="badge badge-info ml-2">
|
||||
<i class="fas fa-undo"></i> Retoure
|
||||
<span class="badge badge-warning ml-2" style="font-size: 1rem; font-weight: 700; padding: 0.5rem 1rem;">
|
||||
<i class="fas fa-undo"></i> RETOURE
|
||||
</span>
|
||||
@endif
|
||||
</h4>
|
||||
|
|
@ -157,17 +157,8 @@
|
|||
<i class="fas fa-download"></i> Label herunterladen
|
||||
</a>
|
||||
@endif
|
||||
{{-- Todo: Add tracking button
|
||||
@if($shipment->canCancel())
|
||||
<button type="button"
|
||||
class="btn btn-warning mr-2"
|
||||
id="cancel-shipment-btn"
|
||||
data-shipment-id="{{ $shipment->id }}">
|
||||
<i class="fas fa-ban"></i> Sendung stornieren
|
||||
</button>
|
||||
@endif
|
||||
|
||||
@if($shipment->type == 'outbound' && !$shipment->relatedShipment)
|
||||
@if($shipment->type == 'outbound' && !$shipment->returns->count())
|
||||
<button type="button"
|
||||
class="btn btn-info mr-2"
|
||||
id="create-return-btn"
|
||||
|
|
@ -175,14 +166,23 @@
|
|||
<i class="fas fa-undo"></i> Retourenlabel erstellen
|
||||
</button>
|
||||
@endif
|
||||
--}}
|
||||
@if($shipment->dhl_shipment_no)
|
||||
<button type="button"
|
||||
class="btn btn-secondary mr-2"
|
||||
<button type="button"
|
||||
class="btn btn-secondary mr-2"
|
||||
id="update-tracking-btn"
|
||||
data-shipment-id="{{ $shipment->id }}">
|
||||
<i class="fas fa-sync"></i> Tracking aktualisieren
|
||||
</button>
|
||||
|
||||
@if($shipment->canSendTrackingEmail())
|
||||
<button type="button"
|
||||
class="btn {{ $shipment->wasTrackingEmailSent() ? 'btn-success' : 'btn-info' }} mr-2"
|
||||
id="send-tracking-email-btn"
|
||||
data-shipment-id="{{ $shipment->id }}">
|
||||
<i class="fas fa-envelope"></i>
|
||||
{{ $shipment->wasTrackingEmailSent() ? 'Tracking-E-Mail erneut senden' : 'Tracking-E-Mail senden' }}
|
||||
</button>
|
||||
@endif
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -345,6 +345,14 @@
|
|||
</td>
|
||||
</tr>
|
||||
@endif
|
||||
@if($shipment->recipient && isset($shipment->recipient['street']))
|
||||
<tr>
|
||||
<td class="font-weight-semibold">Straße:</td>
|
||||
<td>
|
||||
{{ $shipment->recipient['street'] }}
|
||||
</td>
|
||||
</tr>
|
||||
@endif
|
||||
<tr>
|
||||
<td class="font-weight-semibold">Straße:</td>
|
||||
<td>
|
||||
|
|
@ -492,6 +500,42 @@
|
|||
<div class="col-lg-4">
|
||||
|
||||
|
||||
<!-- Email Status -->
|
||||
@if($shipment->dhl_shipment_no)
|
||||
<div class="card mb-4">
|
||||
<div class="card-header">
|
||||
<h5 class="mb-0">
|
||||
<i class="fas fa-envelope text-{{ $shipment->wasTrackingEmailSent() ? 'success' : 'secondary' }}"></i>
|
||||
Tracking-E-Mail Status
|
||||
</h5>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
@if($shipment->wasTrackingEmailSent())
|
||||
<div class="alert alert-success mb-0">
|
||||
<i class="fas fa-check-circle"></i>
|
||||
<strong>E-Mail gesendet</strong><br>
|
||||
<small>
|
||||
Am {{ $shipment->tracking_email_sent_at->format('d.m.Y \u\m H:i') }} Uhr
|
||||
({{ $shipment->tracking_email_type === 'auto' ? 'automatisch' : 'manuell' }})
|
||||
</small>
|
||||
</div>
|
||||
@else
|
||||
<div class="alert alert-secondary mb-0">
|
||||
<i class="fas fa-clock"></i>
|
||||
<strong>Noch nicht gesendet</strong><br>
|
||||
<small>
|
||||
@if($shipment->canSendTrackingEmail())
|
||||
Klicken Sie auf "Tracking-E-Mail senden" um den Kunden zu benachrichtigen.
|
||||
@else
|
||||
E-Mail kann nicht gesendet werden (keine Empfänger-E-Mail verfügbar).
|
||||
@endif
|
||||
</small>
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<!-- Tracking Information -->
|
||||
@if($shipment->tracking_status || $shipment->dhl_shipment_no)
|
||||
<div class="card mb-4">
|
||||
|
|
@ -709,6 +753,42 @@ $(document).ready(function() {
|
|||
});
|
||||
});
|
||||
|
||||
// Send tracking email
|
||||
$('#send-tracking-email-btn').click(function() {
|
||||
var shipmentId = $(this).data('shipment-id');
|
||||
var btn = $(this);
|
||||
|
||||
if (!confirm('Tracking-E-Mail an den Kunden senden?')) {
|
||||
return;
|
||||
}
|
||||
|
||||
btn.prop('disabled', true).html('<i class="fas fa-spinner fa-spin"></i> Wird gesendet...');
|
||||
|
||||
$.ajax({
|
||||
url: `/admin/dhl/shipment/${shipmentId}/send-tracking-email`,
|
||||
method: 'POST',
|
||||
data: {
|
||||
_token: '{{ csrf_token() }}'
|
||||
},
|
||||
success: function(response) {
|
||||
if (response.success) {
|
||||
showAlert('success', response.message);
|
||||
setTimeout(function() {
|
||||
location.reload();
|
||||
}, 2000);
|
||||
} else {
|
||||
showAlert('error', response.message);
|
||||
resetButton(btn, '<i class="fas fa-envelope"></i> Tracking-E-Mail senden');
|
||||
}
|
||||
},
|
||||
error: function(xhr) {
|
||||
var errorMsg = xhr.responseJSON ? xhr.responseJSON.message : 'Fehler beim Senden der Tracking-E-Mail.';
|
||||
showAlert('error', errorMsg);
|
||||
resetButton(btn, '<i class="fas fa-envelope"></i> Tracking-E-Mail senden');
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
// Helper functions
|
||||
function resetButton(btn, originalText) {
|
||||
btn.prop('disabled', false).html(originalText);
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@
|
|||
@if($value->user_sales_volume)
|
||||
<tr>
|
||||
<td>{{ $value->user_sales_volume->date }}</td>
|
||||
<td>{{ $value->user_sales_volume->points }}</td>
|
||||
<td>{{ $value->user_sales_volume->getFormattedPoints() }}</td>
|
||||
<td>{{ formatNumber($value->user_sales_volume->total_net) }} €</td>
|
||||
<td>{{ $value->user_sales_volume->getStatusType() }}</td>
|
||||
<td>@if($value->user_sales_volume->user)
|
||||
|
|
|
|||
|
|
@ -67,6 +67,9 @@
|
|||
@else
|
||||
<br>
|
||||
@endif
|
||||
@if($current->shipping_postnumber)
|
||||
<strong>DHL {{ __('payment.dhl_postnumber') }}: {{ $current->shipping_postnumber }}</strong><br>
|
||||
@endif
|
||||
{{ $current->shipping_zipcode }}
|
||||
{{ $current->shipping_city }}<br>
|
||||
{{ $current->shipping_email }}<br>
|
||||
|
|
@ -183,6 +186,9 @@
|
|||
@else
|
||||
<br>
|
||||
@endif
|
||||
@if($possible->shipping_postnumber)
|
||||
<strong>DHL {{ __('payment.dhl_postnumber') }}: {{ $possible->shipping_postnumber }}</strong><br>
|
||||
@endif
|
||||
{{ $possible->shipping_zipcode }}
|
||||
{{ $possible->shipping_city }}<br>
|
||||
{{ $possible->shipping_email }}<br>
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@
|
|||
<tbody>
|
||||
<tr>
|
||||
<td class="border-0 text-muted align-middle" style="width: 110px">{{ __('order.points') }}:</td>
|
||||
<td class="border-0">{{ $product->points }}</td>
|
||||
<td class="border-0">{{ $product->getFormattedPoints() }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="border-0 text-muted align-middle" style="width: 110px">{{ __('order.content') }}:</td>
|
||||
|
|
|
|||
|
|
@ -51,8 +51,8 @@
|
|||
</div>
|
||||
|
||||
<div class="form-group col-sm-12">
|
||||
<label for="growth_bonus" class="form-label">{{__('Wachstumsbonus in %')}} </label>
|
||||
{{ Form::text('growth_bonus', $value->getFormattedGrowthBonus(), array('placeholder'=>__('Wachstumsbonus in %'), 'class'=>'form-control', 'id'=>'growth_bonus')) }}
|
||||
<label for="growth_bonus" class="form-label">{{__('Tiefenbonus in %')}} </label>
|
||||
{{ Form::text('growth_bonus', $value->getFormattedGrowthBonus(), array('placeholder'=>__('Tiefenbonus in %'), 'class'=>'form-control', 'id'=>'growth_bonus')) }}
|
||||
</div>
|
||||
</div>
|
||||
<hr>
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@
|
|||
<div class="td-entry-table-margin">
|
||||
<i class="fa fa-plus-circle text-secondary"></i>
|
||||
{!! formatNumber($credit->credit) !!} € |
|
||||
{!! nl2br($credit->message) !!}
|
||||
{{ formatTextWithLineBreaks($credit->message, true) }}
|
||||
/ {{ $credit->created_at->format("d.m.Y") }}
|
||||
@if($deleteTime = $credit->deleteTime())
|
||||
/ <span class="no-line-break">
|
||||
|
|
|
|||
|
|
@ -274,7 +274,7 @@
|
|||
@foreach ($cr->user_sales_volumes as $user_sales_volume)
|
||||
<tr>
|
||||
<td>{{ $user_sales_volume->date }}</td>
|
||||
<td>{{ $user_sales_volume->points }}</td>
|
||||
<td>{{ $user_sales_volume->getFormattedPoints() }}</td>
|
||||
<td>{{ $user_sales_volume->info }}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
|
|
@ -294,7 +294,7 @@
|
|||
--}}
|
||||
@if (isset($cbot))
|
||||
|
||||
{{-- Payline Points / Provision / Wachstumsbonus
|
||||
{{-- Payline Points / Provision / Tiefenbonus
|
||||
<div class="card-header">
|
||||
<table class="table user-view-table m-0">
|
||||
<tbody>
|
||||
|
|
@ -324,7 +324,7 @@
|
|||
</div>
|
||||
--}}
|
||||
|
||||
{{-- Payline Points / Provision / Wachstumsbonus
|
||||
{{-- Payline Points / Provision / Tiefenbonus
|
||||
<hr>
|
||||
<div class="card-header">
|
||||
<table class="table user-view-table m-0">
|
||||
|
|
@ -374,7 +374,7 @@
|
|||
</div>
|
||||
--}}
|
||||
|
||||
{{-- Table Payline Points / Provision / Wachstumsbonus
|
||||
{{-- Table Payline Points / Provision / Tiefenbonus
|
||||
<div class="card-body table-responsive pt-0 pb-0">
|
||||
<table class="datatables-style table table-striped ">
|
||||
<thead>
|
||||
|
|
|
|||
|
|
@ -137,7 +137,7 @@
|
|||
<td>{{ $user_sales_volume->date }}</td>
|
||||
<td>{{ $user_sales_volume->getStatusType() }}</td>
|
||||
<td>{{ formatNumber($user_sales_volume->total_net) }} €</td>
|
||||
<td>{{ $user_sales_volume->points }}</td>
|
||||
<td>{{ $user_sales_volume->getFormattedPoints() }}</td>
|
||||
<td>{{ $user_sales_volume->getStatusPointsType() }}</td>
|
||||
<td>{{ $user_sales_volume->getStatusTurnoverType() }}</td>
|
||||
<td>
|
||||
|
|
@ -232,7 +232,7 @@
|
|||
<td>{{ $user_sales_volume->date }}</td>
|
||||
<td>{{ $user_sales_volume->getStatusType() }}</td>
|
||||
<td>{{ formatNumber($user_sales_volume->total_net) }} €</td>
|
||||
<td>{{ $user_sales_volume->points }}</td>
|
||||
<td>{{ $user_sales_volume->getFormattedPoints() }}</td>
|
||||
<td>{{ $user_sales_volume->getStatusPointsType() }}</td>
|
||||
<td>{{ $user_sales_volume->getStatusTurnoverType() }}</td>
|
||||
<td>
|
||||
|
|
@ -292,7 +292,7 @@
|
|||
<td>{{ $user_sales_volume->id }}</td>
|
||||
<td>{{ $user_sales_volume->date }}</td>
|
||||
<td>{{ $user_sales_volume->getStatusType() }}</td>
|
||||
<td>{{ $user_sales_volume->points }}</td>
|
||||
<td>{{ $user_sales_volume->getFormattedPoints() }}</td>
|
||||
<td>{{ $user_sales_volume->getStatusPointsType() }}</td>
|
||||
<td>{{ $user_sales_volume->getStatusTurnoverType() }}</td>
|
||||
<td>{{ $user_sales_volume->info }}</td>
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
|
||||
<div class="card mb-2">
|
||||
|
||||
<h5 class="card-header">
|
||||
<h5 class="card-header bg-primary text-white">
|
||||
{{ __('Product') }}
|
||||
|
||||
</h5>
|
||||
|
|
@ -60,7 +60,7 @@
|
|||
</div>
|
||||
|
||||
<div class="card mb-2">
|
||||
<h5 class="card-header">
|
||||
<h5 class="card-header bg-primary text-white">
|
||||
{{ __('Preise in EUR') }}
|
||||
</h5>
|
||||
<div class="card-body">
|
||||
|
|
@ -93,7 +93,7 @@
|
|||
</div>
|
||||
<div class="form-group col-sm-4">
|
||||
<label class="form-label" for="points">{{ __('Points pro Produkt') }}</label>
|
||||
{{ Form::text('points', $product->points, array('placeholder'=>__('Points pro Produkt'), 'class'=>'form-control', 'id'=>'points')) }}
|
||||
{{ Form::text('points', $product->getFormattedPoints(), array('placeholder'=>__('Points pro Produkt'), 'class'=>'form-control', 'id'=>'points')) }}
|
||||
</div>
|
||||
<div class="form-group col-sm-4">
|
||||
<label class="form-label" for="amount">{{ __('Anzahl/Verfügbarkeit') }}</label>
|
||||
|
|
@ -147,7 +147,7 @@
|
|||
</div>
|
||||
|
||||
<div class="card mb-2">
|
||||
<h5 class="card-header">
|
||||
<h5 class="card-header bg-primary text-white">
|
||||
Landesspezifische Preise
|
||||
</h5>
|
||||
|
||||
|
|
@ -239,7 +239,7 @@
|
|||
|
||||
|
||||
<div class="card mb-2">
|
||||
<h5 class="card-header">
|
||||
<h5 class="card-header bg-primary text-white">
|
||||
{{ __('Details') }}
|
||||
</h5>
|
||||
<div class="card-body">
|
||||
|
|
@ -299,7 +299,7 @@
|
|||
</div>
|
||||
|
||||
<div class="card mb-2">
|
||||
<h5 class="card-header">
|
||||
<h5 class="card-header bg-primary text-white">
|
||||
{{ __('order.contents') }}
|
||||
</h5>
|
||||
<div class="card-body">
|
||||
|
|
@ -340,9 +340,80 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card mb-2">
|
||||
<h5 class="card-header bg-primary text-white">
|
||||
{{ __('Set/Kit Inhalte') }}
|
||||
@if($product->bundleItems->count() > 0)
|
||||
<span class="badge badge-primary ml-2">{{ $product->bundleItems->count() }} Produkt(e)</span>
|
||||
@endif
|
||||
</h5>
|
||||
<div class="card-body">
|
||||
<p class="text-muted small mb-3">
|
||||
<i class="fa fa-info-circle"></i>
|
||||
Hier können Sie Produkte definieren, die in diesem Set/Kit enthalten sind.
|
||||
Diese werden auf Rechnungen und Lieferscheinen unter dem Hauptprodukt aufgelistet.
|
||||
</p>
|
||||
@if($product->bundleItems->count() > 0)
|
||||
<div class="card-datatable table-responsive pt-0">
|
||||
<table class="datatables-style table table-striped table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="width: 80px">{{__('Art.-Nr.')}}</th>
|
||||
<th>{{__('Produktname')}}</th>
|
||||
<th style="width: 100px" class="text-center">{{__('Menge')}}</th>
|
||||
<th style="width: 100px" class="text-right">{{__('Preis VK')}}</th>
|
||||
<th style="width: 80px" class="text-center">{{__('Punkte')}}</th>
|
||||
<th style="width: 50px"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($product->bundleItems as $bundleItem)
|
||||
<tr>
|
||||
<td>{{ $bundleItem->number }}</td>
|
||||
<td>{{ $bundleItem->name }}</td>
|
||||
<td class="text-center">
|
||||
<input type="hidden" name="bundle_quantities[{{ $bundleItem->id }}][id]" value="{{ $bundleItem->id }}">
|
||||
<input type="number" name="bundle_quantities[{{ $bundleItem->id }}][qty]"
|
||||
value="{{ $bundleItem->pivot->quantity }}"
|
||||
min="1" max="999"
|
||||
class="form-control form-control-sm text-center"
|
||||
style="width: 70px; display: inline-block;">
|
||||
</td>
|
||||
<td class="text-right">{{ $bundleItem->getFormattedPrice() }} €</td>
|
||||
<td class="text-center">{{ $bundleItem->getFormattedPoints() }}</td>
|
||||
<td class="text-center">
|
||||
<a class="text-danger" href="{{ route('admin_product_delete', [$product->id, 'bundle', $bundleItem->id]) }}" onclick="return confirm('{{__('Produkt aus Set entfernen?')}}');">
|
||||
<i class="fa fa-trash-alt"></i>
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
@else
|
||||
<div class="alert alert-light border mb-3">
|
||||
<i class="fa fa-box-open text-muted"></i>
|
||||
Dieses Produkt enthält noch keine Bundle-Produkte.
|
||||
</div>
|
||||
@endif
|
||||
<div class="form-row">
|
||||
<div class="form-group col-sm-10">
|
||||
<label class="form-label">{{ __('Produkte zum Set hinzufügen (Mehrfachauswahl)') }}</label>
|
||||
<select class="selectpicker" name="product_bundles[]" id="product_bundles" data-style="btn-light" data-live-search="true" multiple>
|
||||
{!! HTMLHelper::getProductBundleOptions($product->bundleItems()->pluck('bundle_product_id')->toArray(), $product->id) !!}
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group col-sm-2">
|
||||
<button type="submit" class="btn btn-submit mt-0 mt-sm-4">{{ __('save') }}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@if(Auth::user()->isSuperAdmin())
|
||||
<div class="card mb-2">
|
||||
<h5 class="card-header">
|
||||
<h5 class="card-header bg-secondary">
|
||||
{{ __('SuperAdmin Einstellungen') }}
|
||||
</h5>
|
||||
<div class="card-body">
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
<div class="card mb-2">
|
||||
|
||||
<h5 class="card-header">
|
||||
<h5 class="card-header bg-secondary">
|
||||
{{ __('Bilder') }}
|
||||
|
||||
</h5>
|
||||
|
|
|
|||
|
|
@ -58,7 +58,7 @@
|
|||
</td>
|
||||
<td>{{ $value->getFormattedPrice() }}</td>
|
||||
<td>{{ $value->getFormattedTax() }}</td>
|
||||
<td>{{ $value->points }}</td>
|
||||
<td>{{ $value->getFormattedPoints() }}</td>
|
||||
<td>{{ $value->contents_total }}</td>
|
||||
<td>{{ $value->getUnitType() }}</td>
|
||||
<td>{{ $value->getBasePriceFormatted() }}</td>
|
||||
|
|
|
|||
|
|
@ -114,7 +114,7 @@
|
|||
</div>
|
||||
<div class="col-md-3 mb-3">
|
||||
<div class="text-muted small">{{ __('order.points_total') }}</div>
|
||||
{{ $shopping_order->points }}
|
||||
{{ $shopping_order->getFormattedPoints() }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -205,6 +205,64 @@
|
|||
<!-- / Member -->
|
||||
@endif
|
||||
|
||||
{{-- Vorkasse Hinweis mit TXID bei unbezahlten Bestellungen --}}
|
||||
@php
|
||||
$vorPayment = $shopping_order->shopping_payments->where('clearingtype', 'vor')->first();
|
||||
$isVorUnpaid = $vorPayment && !in_array($shopping_order->txaction, ['paid', 'completed']);
|
||||
@endphp
|
||||
@if($isVorUnpaid)
|
||||
@php
|
||||
$payTrans = $vorPayment->payment_transactions->first();
|
||||
$txid = $payTrans->txid ?? ($payTrans->transmitted_data['txid'] ?? null);
|
||||
@endphp
|
||||
<!-- Billing -->
|
||||
<div class="card-body">
|
||||
<div class="alert alert-warning border-warning mb-3" style="border-left: 4px solid #ffc107 !important;">
|
||||
<h5 class="mb-3"><i class="fa fa-university"></i> {{ __('payment.prepayment_bank_details') }}:</h5>
|
||||
<div style="background: #fff; border-radius: 8px; padding: 15px;">
|
||||
@if($payTrans && isset($payTrans->transmitted_data))
|
||||
<table style="width: 100%;">
|
||||
<tr>
|
||||
<td style="padding: 5px 10px 5px 0; width: 140px;"><strong>{{ __('payment.account_holder') }}:</strong></td>
|
||||
<td style="padding: 5px 0;">{{ $payTrans->transmitted_data['clearing_bankaccountholder'] }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="padding: 5px 10px 5px 0;"><strong>{{ __('payment.IBAN') }}:</strong></td>
|
||||
<td style="padding: 5px 0; font-family: monospace; letter-spacing: 1px;">{{ $payTrans->transmitted_data['clearing_bankiban'] }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="padding: 5px 10px 5px 0;"><strong>{{ __('payment.BIC') }}:</strong></td>
|
||||
<td style="padding: 5px 0; font-family: monospace;">{{ $payTrans->transmitted_data['clearing_bankbic'] }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="padding: 5px 10px 5px 0;"><strong>{{ __('payment.bank') }}:</strong></td>
|
||||
<td style="padding: 5px 0;">{{ $payTrans->transmitted_data['clearing_bankname'] }}</td>
|
||||
</tr>
|
||||
<tr style="border-top: 1px solid #ffc107;">
|
||||
<td style="padding: 10px 10px 5px 0;"><strong>{{ __('payment.total_amount') }}:</strong></td>
|
||||
<td style="padding: 10px 0 5px 0; font-size: 18px; font-weight: bold; color: #d35400;">{{ number_format( floatval($payTrans->shopping_payment->amount/100), 2, ",", ".") }} EUR</td>
|
||||
</tr>
|
||||
</table>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
<hr style="border-color: #ffc107;">
|
||||
|
||||
<p>{{ __('payment.prepayment_reference_notice') }}</p>
|
||||
|
||||
@if(isset($payTrans->transmitted_data['txid']))
|
||||
<div class="text-center p-4 my-3" style="background: #fff; border: 3px dashed #ffc107; border-radius: 8px;">
|
||||
<strong style="font-size: 16px;">{{ __('payment.prepayment_txid') }}:</strong><br>
|
||||
<span style="font-size: 32px; font-weight: bold; color: #d35400; letter-spacing: 3px;">{{ $payTrans->transmitted_data['txid'] }}</span>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<p><strong>{{ __('payment.prepayment_reference_only') }}</strong></p>
|
||||
<p class="mt-3 mb-0 text-muted"><em>{{ __('payment.prepayment_waiting_payment') }}</em></p>
|
||||
</div>
|
||||
</div>
|
||||
<hr class="m-0">
|
||||
@endif
|
||||
<!-- Billing -->
|
||||
<div class="card-body">
|
||||
|
||||
|
|
@ -343,6 +401,13 @@
|
|||
<div class="text-muted small">{{ __('Phone') }}</div>
|
||||
{{ $shopping_order->shopping_user->shipping_phone }}
|
||||
</div>
|
||||
@if($shopping_order->shopping_user->shipping_postnumber)
|
||||
<div class="col-md-3 mb-3">
|
||||
<div class="text-muted small">{{ __('payment.dhl_postnumber') }}</div>
|
||||
<span class="badge badge-info">{{ $shopping_order->shopping_user->shipping_postnumber }}</span>
|
||||
<small class="d-block text-muted">{{ __('payment.packstation_delivery') }}</small>
|
||||
</div>
|
||||
@endif
|
||||
<div class="col-md-3 mb-3">
|
||||
<div class="text-muted small">{{ __('Country') }}</div>
|
||||
{{ $shopping_order->shopping_user->shipping_country->getLocated() }}
|
||||
|
|
@ -354,6 +419,10 @@
|
|||
<hr class="m-0">
|
||||
<!-- / Shipping -->
|
||||
|
||||
<!-- DHL Sendungen -->
|
||||
@include('admin.sales._detail_dhl_shipments')
|
||||
<!-- / DHL Sendungen -->
|
||||
|
||||
<!-- Items -->
|
||||
<div class="card-body">
|
||||
<h6 class="small font-weight-semibold">
|
||||
|
|
@ -446,6 +515,9 @@
|
|||
<h6 class="small font-weight-semibold">
|
||||
{{ __('tables.payment') }}
|
||||
</h6>
|
||||
|
||||
|
||||
|
||||
@if ($shopping_order->txaction !== 'extern')
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered table-striped">
|
||||
|
|
|
|||
275
resources/views/admin/sales/_detail_dhl_shipments.blade.php
Normal file
275
resources/views/admin/sales/_detail_dhl_shipments.blade.php
Normal file
|
|
@ -0,0 +1,275 @@
|
|||
{{-- DHL Sendungen Block für Order Detail --}}
|
||||
@if($shopping_order->dhlShipments && $shopping_order->dhlShipments->count() > 0)
|
||||
<div class="card mb-4">
|
||||
<div class="card-header bg-warning text-dark">
|
||||
<h5 class="mb-0">
|
||||
<i class="fas fa-shipping-fast"></i>
|
||||
DHL Sendungen ({{ $shopping_order->dhlShipments->count() }})
|
||||
</h5>
|
||||
</div>
|
||||
<div class="card-body p-0">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-hover mb-0">
|
||||
<thead class="thead-light">
|
||||
<tr>
|
||||
<th style="width: 80px;">#</th>
|
||||
<th>Sendungsnummer</th>
|
||||
<th>Status</th>
|
||||
<th>Tracking</th>
|
||||
<th>E-Mail</th>
|
||||
@if (isset($isAdmin) && $isAdmin)
|
||||
<th style="width: 150px;">Aktionen</th>
|
||||
@endif
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($shopping_order->dhlShipments as $shipment)
|
||||
<tr class="{{ $shipment->type === 'return' ? 'bg-warning bg-opacity-10' : '' }}" style="{{ $shipment->type === 'return' ? 'background-color: rgba(255, 193, 7, 0.1);' : '' }}">
|
||||
<td>
|
||||
<a href="{{ route('admin.dhl.show', $shipment) }}" class="font-weight-bold {{ $shipment->type === 'return' ? 'text-warning' : 'text-primary' }}">
|
||||
@if($shipment->type === 'return')<i class="fas fa-undo mr-1"></i>@endif#{{ $shipment->id }}
|
||||
</a>
|
||||
@if($shipment->type === 'return')
|
||||
<br><span class="badge badge-warning badge-sm" style="font-weight: 600;">RETOURE</span>
|
||||
@endif
|
||||
</td>
|
||||
<td>
|
||||
@if($shipment->dhl_shipment_no)
|
||||
<code class="text-success">{{ $shipment->dhl_shipment_no }}</code>
|
||||
<br>
|
||||
<a href="{{ $shipment->getTrackingUrl() }}" target="_blank" class="small text-muted">
|
||||
<i class="fas fa-external-link-alt"></i> Bei DHL verfolgen
|
||||
</a>
|
||||
@else
|
||||
<span class="text-muted">-</span>
|
||||
@endif
|
||||
</td>
|
||||
<td>
|
||||
<span class="badge badge-{{ $shipment->getStatusBadgeClass() }}">
|
||||
{{ $shipment->status }}
|
||||
</span>
|
||||
@if($shipment->tracking_status)
|
||||
<br><small class="text-muted">{{ $shipment->tracking_status }}</small>
|
||||
@endif
|
||||
</td>
|
||||
<td>
|
||||
@if($shipment->last_tracked_at)
|
||||
<small class="text-muted">
|
||||
{{ $shipment->last_tracked_at->format('d.m.Y H:i') }}
|
||||
</small>
|
||||
@else
|
||||
<span class="text-muted">-</span>
|
||||
@endif
|
||||
</td>
|
||||
<td>
|
||||
@if($shipment->wasTrackingEmailSent())
|
||||
<span class="badge badge-success" title="Gesendet am {{ $shipment->tracking_email_sent_at->format('d.m.Y H:i') }} ({{ $shipment->tracking_email_type === 'auto' ? 'automatisch' : 'manuell' }})">
|
||||
<i class="fas fa-check"></i> {{ $shipment->tracking_email_sent_at->format('d.m.Y') }}
|
||||
</span>
|
||||
<br>
|
||||
<small class="text-muted">
|
||||
@if($shipment->tracking_email_type === 'auto')
|
||||
<i class="fas fa-robot"></i> Automatisch
|
||||
@else
|
||||
<i class="fas fa-user"></i> Manuell
|
||||
@endif
|
||||
</small>
|
||||
@else
|
||||
<span class="badge badge-secondary">Nicht gesendet</span>
|
||||
@endif
|
||||
</td>
|
||||
@if (isset($isAdmin) && $isAdmin)
|
||||
<td>
|
||||
<div class="btn-group btn-group-sm" role="group">
|
||||
<a href="{{ route('admin.dhl.show', $shipment) }}" class="btn btn-outline-primary" title="Details">
|
||||
<i class="fas fa-eye"></i>
|
||||
</a>
|
||||
@if($shipment->label_path)
|
||||
<a href="{{ route('admin.dhl.download-label', $shipment) }}" class="btn btn-outline-success" title="Label herunterladen">
|
||||
<i class="fas fa-download"></i>
|
||||
</a>
|
||||
@endif
|
||||
@if($shipment->dhl_shipment_no)
|
||||
<button type="button"
|
||||
class="btn btn-outline-secondary dhl-update-tracking-btn"
|
||||
data-shipment-id="{{ $shipment->id }}"
|
||||
title="Tracking aktualisieren">
|
||||
<i class="fas fa-sync"></i>
|
||||
</button>
|
||||
@if($shipment->canSendTrackingEmail())
|
||||
<button type="button"
|
||||
class="btn {{ $shipment->wasTrackingEmailSent() ? 'btn-success' : 'btn-outline-info' }} dhl-send-email-btn"
|
||||
data-shipment-id="{{ $shipment->id }}"
|
||||
title="{{ $shipment->wasTrackingEmailSent() ? 'E-Mail erneut senden' : 'Tracking-E-Mail senden' }}">
|
||||
<i class="fas fa-envelope"></i>
|
||||
</button>
|
||||
@endif
|
||||
@endif
|
||||
@if($shipment->type === 'outbound' && !$shipment->returns->count())
|
||||
<button type="button"
|
||||
class="btn btn-outline-info dhl-create-return-btn"
|
||||
data-shipment-id="{{ $shipment->id }}"
|
||||
title="Retourenlabel erstellen">
|
||||
<i class="fas fa-undo"></i>
|
||||
</button>
|
||||
@endif
|
||||
@if($shipment->canCancel())
|
||||
<button type="button"
|
||||
class="btn btn-outline-danger dhl-cancel-shipment-btn"
|
||||
data-shipment-id="{{ $shipment->id }}"
|
||||
title="Sendung stornieren">
|
||||
<i class="fas fa-ban"></i>
|
||||
</button>
|
||||
@endif
|
||||
</div>
|
||||
</td>
|
||||
@endif
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
// Update tracking button
|
||||
$('.dhl-update-tracking-btn').click(function() {
|
||||
var shipmentId = $(this).data('shipment-id');
|
||||
var btn = $(this);
|
||||
|
||||
btn.prop('disabled', true).html('<i class="fas fa-spinner fa-spin"></i>');
|
||||
|
||||
$.ajax({
|
||||
url: `/admin/dhl/shipment/${shipmentId}/update-tracking`,
|
||||
method: 'POST',
|
||||
data: {
|
||||
_token: '{{ csrf_token() }}'
|
||||
},
|
||||
success: function(response) {
|
||||
if (response.success) {
|
||||
location.reload();
|
||||
} else {
|
||||
alert('Fehler: ' + response.message);
|
||||
btn.prop('disabled', false).html('<i class="fas fa-sync"></i>');
|
||||
}
|
||||
},
|
||||
error: function() {
|
||||
alert('Fehler beim Aktualisieren des Trackings.');
|
||||
btn.prop('disabled', false).html('<i class="fas fa-sync"></i>');
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
// Send email button
|
||||
$('.dhl-send-email-btn').click(function() {
|
||||
var shipmentId = $(this).data('shipment-id');
|
||||
var btn = $(this);
|
||||
|
||||
if (!confirm('Tracking-E-Mail an den Kunden senden?')) {
|
||||
return;
|
||||
}
|
||||
|
||||
btn.prop('disabled', true).html('<i class="fas fa-spinner fa-spin"></i>');
|
||||
|
||||
$.ajax({
|
||||
url: `/admin/dhl/shipment/${shipmentId}/send-tracking-email`,
|
||||
method: 'POST',
|
||||
data: {
|
||||
_token: '{{ csrf_token() }}'
|
||||
},
|
||||
success: function(response) {
|
||||
if (response.success) {
|
||||
alert(response.message);
|
||||
location.reload();
|
||||
} else {
|
||||
alert('Fehler: ' + response.message);
|
||||
btn.prop('disabled', false).html('<i class="fas fa-envelope"></i>');
|
||||
}
|
||||
},
|
||||
error: function(xhr) {
|
||||
var errorMsg = xhr.responseJSON ? xhr.responseJSON.message : 'Fehler beim Senden der E-Mail.';
|
||||
alert(errorMsg);
|
||||
btn.prop('disabled', false).html('<i class="fas fa-envelope"></i>');
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
// Create return label button
|
||||
$('.dhl-create-return-btn').click(function() {
|
||||
var shipmentId = $(this).data('shipment-id');
|
||||
var btn = $(this);
|
||||
|
||||
// Check if already processing
|
||||
if (btn.prop('disabled')) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!confirm('Möchten Sie ein Retourenlabel für diese Sendung erstellen?')) {
|
||||
return;
|
||||
}
|
||||
|
||||
btn.prop('disabled', true).html('<i class="fas fa-spinner fa-spin"></i>');
|
||||
|
||||
$.ajax({
|
||||
url: `/admin/dhl/shipment/${shipmentId}/return-label`,
|
||||
method: 'POST',
|
||||
data: {
|
||||
_token: '{{ csrf_token() }}'
|
||||
},
|
||||
success: function(response) {
|
||||
if (response.success) {
|
||||
alert(response.message || 'Retourenlabel wurde erstellt!');
|
||||
setTimeout(function() {
|
||||
location.reload();
|
||||
}, 1500);
|
||||
} else {
|
||||
alert('Fehler: ' + response.message);
|
||||
btn.prop('disabled', false).html('<i class="fas fa-undo"></i>');
|
||||
}
|
||||
},
|
||||
error: function(xhr) {
|
||||
var errorMsg = xhr.responseJSON ? xhr.responseJSON.message : 'Fehler beim Erstellen des Retourenlabels.';
|
||||
alert(errorMsg);
|
||||
btn.prop('disabled', false).html('<i class="fas fa-undo"></i>');
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
// Cancel shipment button
|
||||
$('.dhl-cancel-shipment-btn').click(function() {
|
||||
var shipmentId = $(this).data('shipment-id');
|
||||
var btn = $(this);
|
||||
|
||||
if (!confirm('Möchten Sie diese Sendung wirklich stornieren?\n\nDas Label wird bei DHL ungültig und kann nicht mehr verwendet werden.')) {
|
||||
return;
|
||||
}
|
||||
|
||||
btn.prop('disabled', true).html('<i class="fas fa-spinner fa-spin"></i>');
|
||||
|
||||
$.ajax({
|
||||
url: `/admin/dhl/shipment/${shipmentId}/cancel`,
|
||||
method: 'DELETE',
|
||||
data: {
|
||||
_token: '{{ csrf_token() }}'
|
||||
},
|
||||
success: function(response) {
|
||||
if (response.success) {
|
||||
alert(response.message || 'Sendung wird storniert...');
|
||||
location.reload();
|
||||
} else {
|
||||
alert('Fehler: ' + response.message);
|
||||
btn.prop('disabled', false).html('<i class="fas fa-ban"></i>');
|
||||
}
|
||||
},
|
||||
error: function(xhr) {
|
||||
var errorMsg = xhr.responseJSON ? xhr.responseJSON.message : 'Fehler beim Stornieren der Sendung.';
|
||||
alert(errorMsg);
|
||||
btn.prop('disabled', false).html('<i class="fas fa-ban"></i>');
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@endif
|
||||
|
|
@ -232,6 +232,13 @@
|
|||
<div class="text-muted small">{{ __('Phone') }}</div>
|
||||
{{ $homeparty_guest->shipping_phone }}
|
||||
</div>
|
||||
@if($homeparty_guest->shipping_postnumber)
|
||||
<div class="col-md-3 mb-3">
|
||||
<div class="text-muted small">{{ __('payment.dhl_postnumber') }}</div>
|
||||
<span class="badge badge-info">{{ $homeparty_guest->shipping_postnumber }}</span>
|
||||
<small class="d-block text-muted">{{ __('payment.packstation_delivery') }}</small>
|
||||
</div>
|
||||
@endif
|
||||
<div class="col-md-3 mb-3">
|
||||
<div class="text-muted small">{{ __('Country') }}</div>
|
||||
{{ $homeparty_guest->shipping_country->getLocated() }}
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@
|
|||
<small>
|
||||
<span class="text-muted">{{ __('order.content') }}: </span> {{ $shopping_order_item->product->contents }}<br>
|
||||
<span class="text-muted">{{ __('order.weight') }}: </span> {{ $shopping_order_item->product->weight }} g<br>
|
||||
<span class="text-muted">{{ __('order.points') }}: </span> {{ $shopping_order_item->product->points }}<br>
|
||||
<span class="text-muted">{{ __('order.points') }}: </span> {{ $shopping_order_item->product->getFormattedPoints() }}<br>
|
||||
<span class="text-muted">{{ __('order.number') }}: </span> {{ $shopping_order_item->product->number }}
|
||||
</small>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@
|
|||
</div>--}}
|
||||
<div class="form-row">
|
||||
<div class="form-group col-sm-6">
|
||||
<label class="form-label">{{ __('Tag des Monats für die Fixierung/Auswertungen der Business Marketing Plans') }}*</label>
|
||||
<label class="form-label">Tag des Monats für die Fixierung/Auswertungen der Business Marketing Plans*</label>
|
||||
{{ Form::text('settings[day-exectute-business-structur][val]', \App\Models\Setting::getContentBySlug('day-exectute-business-structur'), array('class'=>'form-control')) }}
|
||||
{{ Form::hidden('settings[day-exectute-business-structur][type]', 'int') }}
|
||||
</div>
|
||||
|
|
@ -60,6 +60,20 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card mb-2">
|
||||
<div class="card-body">
|
||||
<h4>Abo Einstellungen</h4>
|
||||
<div class="form-row">
|
||||
<div class="form-group col-sm-6">
|
||||
<label class="form-label">Mindestlaufzeit des Abos in Monaten*</label>
|
||||
{{ Form::text('settings[abo-min-duration][val]', \App\Models\Setting::getContentBySlug('abo-min-duration'), array('class'=>'form-control')) }}
|
||||
{{ Form::hidden('settings[abo-min-duration][type]', 'int') }}
|
||||
</div>
|
||||
</div>
|
||||
<button type="submit" name="action" value="save_prepayment" class="btn btn-primary btn-sm mb-2"><i class="ion ion-ios-save"></i> speichern</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card mb-2">
|
||||
<div class="card-body">
|
||||
<h4>Auszeitparty</h4>
|
||||
|
|
|
|||
49
resources/views/admin/site/news/edit.blade.php
Normal file
49
resources/views/admin/site/news/edit.blade.php
Normal file
|
|
@ -0,0 +1,49 @@
|
|||
@extends('layouts.layout-2')
|
||||
|
||||
@section('content')
|
||||
|
||||
@if ($errors->any())
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="alert alert-danger">
|
||||
<ul>
|
||||
@foreach ($errors->all() as $error)
|
||||
<li>{{ $error }}</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<h4 class="font-weight-bold py-2 mb-2">
|
||||
<i class="ion ion-md-megaphone mr-2"></i>
|
||||
{{ $news->id ? __('backend.edit_news') : __('backend.add_news') }}
|
||||
</h4>
|
||||
|
||||
{!! Form::open(['action' => route('admin_dashboard_news_store', [$news->id ?: 'new']), 'class' => 'form-horizontal', 'id'=>'']) !!}
|
||||
|
||||
<div class="text-left mt-0 mb-2">
|
||||
<button type="submit" class="btn btn-submit btn-primary">
|
||||
<i class="ion ion-md-checkmark"></i> {{ __('save') }}
|
||||
</button>
|
||||
<a href="{{ route('admin_dashboard_news') }}" class="btn btn-secondary">
|
||||
<i class="ion ion-md-close"></i> {{ __('backend.cancel') }}
|
||||
</a>
|
||||
</div>
|
||||
|
||||
@include('admin.site.news.form')
|
||||
|
||||
<div class="text-left mt-0 mb-2">
|
||||
<button type="submit" class="btn btn-submit btn-primary">
|
||||
<i class="ion ion-md-checkmark"></i> {{ __('save') }}
|
||||
</button>
|
||||
<a href="{{ route('admin_dashboard_news') }}" class="btn btn-secondary">
|
||||
<i class="ion ion-md-close"></i> {{ __('backend.cancel') }}
|
||||
</a>
|
||||
</div>
|
||||
|
||||
{!! Form::close() !!}
|
||||
|
||||
@endsection
|
||||
|
||||
266
resources/views/admin/site/news/form.blade.php
Normal file
266
resources/views/admin/site/news/form.blade.php
Normal file
|
|
@ -0,0 +1,266 @@
|
|||
<div class="card mb-4">
|
||||
<h5 class="card-header">
|
||||
<i class="ion ion-md-settings mr-2"></i>
|
||||
{{ __('backend.general_settings') }}
|
||||
</h5>
|
||||
<div class="card-body">
|
||||
<div class="form-row">
|
||||
<div class="form-group col-md-6">
|
||||
<label class="custom-control custom-checkbox">
|
||||
{!! Form::checkbox('active', 1, $news->active ?? true, ['class'=>'custom-control-input']) !!}
|
||||
<span class="custom-control-label">{{ __('backend.news_active') }}</span>
|
||||
</label>
|
||||
|
||||
<small class="form-text text-muted">
|
||||
<i class="ion ion-md-information-circle"></i>
|
||||
{{ __('backend.news_active_hint') }}<br>
|
||||
<strong>{{ __('backend.news_active_single') }}</strong>
|
||||
</small>
|
||||
</div>
|
||||
<div class="form-group col-md-6">
|
||||
<label class="form-label" for="display_date">{{ __('backend.display_date') }}</label>
|
||||
{!! Form::text('display_date', $news->display_date ? $news->display_date->format('d.m.Y') : now()->format('d.m.Y'), ['class'=>'form-control datepicker-base', 'id' => 'display_date']) !!}
|
||||
|
||||
<small class="form-text text-muted">{{ __('backend.display_date_hint') }}</small>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- German (Default Language) -->
|
||||
<div class="card mb-4">
|
||||
<h5 class="card-header bg-primary text-white">
|
||||
<i class="ion ion-md-flag mr-2"></i>
|
||||
{{ __('backend.german') }} ({{ __('backend.default_language') }})
|
||||
</h5>
|
||||
<div class="card-body">
|
||||
<div class="form-row">
|
||||
<div class="form-group col">
|
||||
<label class="form-label" for="title">{{ __('backend.title') }}*</label>
|
||||
{{ Form::text('title', $news->title, ['placeholder' => __('backend.title'), 'class' => 'form-control', 'id' => 'title', 'required']) }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-row">
|
||||
<div class="form-group col">
|
||||
<label class="form-label" for="teaser">{{ __('backend.teaser') }}*</label>
|
||||
{{ Form::textarea('teaser', $news->teaser, ['placeholder' => __('backend.teaser'), 'class' => 'form-control', 'id' => 'teaser', 'rows' => 3, 'required']) }}
|
||||
<small class="form-text text-muted">{{ __('backend.teaser_hint') }}</small>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-row">
|
||||
<div class="form-group col">
|
||||
<label class="form-label" for="content">{{ __('backend.content') }}</label>
|
||||
{{ Form::textarea('content', $news->content, ['placeholder' => __('backend.content'), 'class' => 'form-control summernote-small', 'id' => 'content', 'rows' => 8]) }}
|
||||
<small class="form-text text-muted">{{ __('backend.content_hint') }}</small>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-row">
|
||||
<div class="form-group col">
|
||||
<label class="form-label">
|
||||
<i class="ion ion-md-attach mr-1"></i>
|
||||
{{ __('backend.file_links') }}
|
||||
</label>
|
||||
<div id="file-links-de" class="border p-3 rounded bg-light">
|
||||
@php
|
||||
$existingLinks = $news->file_links['de'] ?? [];
|
||||
@endphp
|
||||
@foreach($existingLinks as $index => $link)
|
||||
<div class="file-link-item mb-2" data-index="{{ $index }}">
|
||||
<div class="row">
|
||||
<div class="col-md-8">
|
||||
<input type="text" name="file_links[de][{{ $index }}][label]"
|
||||
class="form-control form-control-sm"
|
||||
placeholder="{{ __('backend.link_label') }}"
|
||||
value="{{ $link['label'] ?? '' }}">
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<select name="file_links[de][{{ $index }}][file_id]"
|
||||
class="form-control form-control-sm select2-files"
|
||||
data-placeholder="{{ __('backend.select_file') }}">
|
||||
<option value="">{{ __('backend.select_file') }}</option>
|
||||
@foreach(\App\Models\DcFile::where('active', 1)->orderBy('original_name')->get() as $file)
|
||||
<option value="{{ $file->id }}"
|
||||
{{ ($link['file_id'] ?? null) == $file->id ? 'selected' : '' }}>
|
||||
{{ $file->original_name }}
|
||||
</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-md-1">
|
||||
<button type="button" class="btn btn-sm btn-danger remove-file-link">
|
||||
<i class="ion ion-md-trash"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endforeach
|
||||
</div>
|
||||
<button type="button" class="btn btn-sm btn-outline-primary mt-2" id="add-file-link-de">
|
||||
<i class="ion ion-md-add-circle"></i> {{ __('backend.add_file_link') }}
|
||||
</button>
|
||||
<small class="form-text text-muted">{{ __('backend.file_links_hint') }}</small>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Other Languages -->
|
||||
@foreach($languages as $locale => $localeData)
|
||||
@if($locale !== 'de')
|
||||
<div class="card mb-4">
|
||||
<h5 class="card-header">
|
||||
<i class="ion ion-md-flag mr-2"></i>
|
||||
{{ $localeData['native'] }} ({{ strtoupper($locale) }})
|
||||
</h5>
|
||||
<div class="card-body">
|
||||
<div class="form-row">
|
||||
<div class="form-group col">
|
||||
<label class="form-label" for="trans_title_{{ $locale }}">{{ __('backend.title') }}</label>
|
||||
{{ Form::text('trans_title_' . $locale, $news->getTrans('title', $locale), ['placeholder' => __('backend.title'), 'class' => 'form-control ', 'id' => 'trans_title_' . $locale]) }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-row">
|
||||
<div class="form-group col">
|
||||
<label class="form-label" for="trans_teaser_{{ $locale }}">{{ __('backend.teaser') }}</label>
|
||||
{{ Form::textarea('trans_teaser_' . $locale, $news->getTrans('teaser', $locale), ['placeholder' => __('backend.teaser'), 'class' => 'form-control', 'id' => 'trans_teaser_' . $locale, 'rows' => 3]) }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-row">
|
||||
<div class="form-group col">
|
||||
<label class="form-label" for="trans_content_{{ $locale }}">{{ __('backend.content') }}</label>
|
||||
{{ Form::textarea('trans_content_' . $locale, $news->getTrans('content', $locale), ['placeholder' => __('backend.content'), 'class' => 'form-control summernote-small', 'id' => 'trans_content_' . $locale, 'rows' => 8]) }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-row">
|
||||
<div class="form-group col">
|
||||
<label class="form-label">
|
||||
<i class="ion ion-md-attach mr-1"></i>
|
||||
{{ __('backend.file_links') }}
|
||||
</label>
|
||||
<div id="file-links-{{ $locale }}" class="border p-3 rounded bg-light">
|
||||
@php
|
||||
$existingLinks = $news->file_links[$locale] ?? [];
|
||||
@endphp
|
||||
@foreach($existingLinks as $index => $link)
|
||||
<div class="file-link-item mb-2" data-index="{{ $index }}">
|
||||
<div class="row">
|
||||
<div class="col-md-8">
|
||||
<input type="text" name="file_links[{{ $locale }}][{{ $index }}][label]"
|
||||
class="form-control form-control-sm"
|
||||
placeholder="{{ __('backend.link_label') }}"
|
||||
value="{{ $link['label'] ?? '' }}">
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<select name="file_links[{{ $locale }}][{{ $index }}][file_id]"
|
||||
class="form-control form-control-sm select2-files"
|
||||
data-placeholder="{{ __('backend.select_file') }}">
|
||||
<option value="">{{ __('backend.select_file') }}</option>
|
||||
@foreach(\App\Models\DcFile::where('active', 1)->orderBy('original_name')->get() as $file)
|
||||
<option value="{{ $file->id }}"
|
||||
{{ ($link['file_id'] ?? null) == $file->id ? 'selected' : '' }}>
|
||||
{{ $file->original_name }}
|
||||
</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-md-1">
|
||||
<button type="button" class="btn btn-sm btn-danger remove-file-link">
|
||||
<i class="ion ion-md-trash"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endforeach
|
||||
</div>
|
||||
<button type="button" class="btn btn-sm btn-outline-primary mt-2 add-file-link" data-locale="{{ $locale }}">
|
||||
<i class="ion ion-md-add-circle"></i> {{ __('backend.add_file_link') }}
|
||||
</button>
|
||||
<small class="form-text text-muted">{{ __('backend.file_links_hint') }}</small>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
@endforeach
|
||||
|
||||
<script>
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
let fileOptions = `@foreach(\App\Models\DcFile::where('active', 1)->orderBy('original_name')->get() as $file)<option value="{{ $file->id }}">{{ $file->original_name }}</option>@endforeach`;
|
||||
|
||||
// Add file link for DE (default language)
|
||||
document.getElementById('add-file-link-de')?.addEventListener('click', function() {
|
||||
addFileLink('de');
|
||||
});
|
||||
|
||||
// Add file link for other languages
|
||||
document.querySelectorAll('.add-file-link').forEach(button => {
|
||||
button.addEventListener('click', function() {
|
||||
let locale = this.getAttribute('data-locale');
|
||||
addFileLink(locale);
|
||||
});
|
||||
});
|
||||
|
||||
// Remove file link
|
||||
document.addEventListener('click', function(e) {
|
||||
if (e.target.closest('.remove-file-link')) {
|
||||
e.target.closest('.file-link-item').remove();
|
||||
}
|
||||
});
|
||||
|
||||
function addFileLink(locale) {
|
||||
let container = document.getElementById('file-links-' + locale);
|
||||
let index = container.querySelectorAll('.file-link-item').length;
|
||||
|
||||
let html = `
|
||||
<div class="file-link-item mb-2" data-index="${index}">
|
||||
<div class="row">
|
||||
<div class="col-md-8">
|
||||
<input type="text" name="file_links[${locale}][${index}][label]"
|
||||
class="form-control form-control-sm"
|
||||
placeholder="{{ __('backend.link_label') }}">
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<select name="file_links[${locale}][${index}][file_id]"
|
||||
class="form-control form-control-sm select2-files"
|
||||
data-placeholder="{{ __('backend.select_file') }}">
|
||||
<option value="">{{ __('backend.select_file') }}</option>
|
||||
${fileOptions}
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-md-1">
|
||||
<button type="button" class="btn btn-sm btn-danger remove-file-link">
|
||||
<i class="ion ion-md-trash"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
`;
|
||||
|
||||
container.insertAdjacentHTML('beforeend', html);
|
||||
|
||||
// Initialize Select2 on new element
|
||||
let newSelect = container.querySelector('.file-link-item:last-child select');
|
||||
if (typeof $.fn.select2 !== 'undefined') {
|
||||
$(newSelect).select2({
|
||||
width: '100%',
|
||||
placeholder: '{{ __("backend.select_file") }}'
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
// Initialize Select2 on existing selects
|
||||
if (typeof $.fn.select2 !== 'undefined') {
|
||||
$('.select2-files').select2({
|
||||
width: '100%',
|
||||
placeholder: '{{ __("backend.select_file") }}'
|
||||
});
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
75
resources/views/admin/site/news/index.blade.php
Normal file
75
resources/views/admin/site/news/index.blade.php
Normal file
|
|
@ -0,0 +1,75 @@
|
|||
@extends('layouts.layout-2')
|
||||
|
||||
@section('content')
|
||||
|
||||
<h4 class="font-weight-bold py-2 mb-2">
|
||||
<i class="ion ion-md-megaphone mr-2"></i>
|
||||
{{ __('backend.dashboard_news') }}
|
||||
</h4>
|
||||
|
||||
<div class="text-left mt-0 mb-4">
|
||||
<a href="{{ route('admin_dashboard_news_edit', ['new']) }}" class="btn btn-primary">
|
||||
<i class="ion ion-md-add"></i> {{ __('backend.add_news') }}
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="card">
|
||||
<h5 class="card-header">
|
||||
<i class="ion ion-md-megaphone mr-2"></i>
|
||||
{{ __('backend.dashboard_news') }}
|
||||
</h5>
|
||||
<div class="card-body p-0">
|
||||
@if($news->count() > 0)
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>ID</th>
|
||||
<th>{{ __('backend.title') }}</th>
|
||||
<th>{{ __('backend.status') }}</th>
|
||||
<th>{{ __('backend.display_date') }}</th>
|
||||
<th>{{ __('backend.actions') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($news as $item)
|
||||
<tr>
|
||||
<td>{{ $item->id }}</td>
|
||||
<td>
|
||||
<strong>{{ $item->title }}</strong>
|
||||
<br>
|
||||
<small class="text-muted">{{ \Illuminate\Support\Str::limit($item->teaser, 80) }}</small>
|
||||
</td>
|
||||
<td>
|
||||
@if($item->active)
|
||||
<span class="badge badge-success">{{ __('backend.active') }}</span>
|
||||
@else
|
||||
<span class="badge badge-danger">{{ __('backend.inactive') }}</span>
|
||||
@endif
|
||||
</td>
|
||||
<td>{{ $item->getDisplayDateFormatted() }}</td>
|
||||
<td>
|
||||
<a href="{{ route('admin_dashboard_news_edit', [$item->id]) }}" class="btn btn-sm btn-primary">
|
||||
<i class="ion ion-md-create"></i> {{ __('navigation.edit') }}
|
||||
</a>
|
||||
<a href="{{ route('admin_dashboard_news_delete', [$item->id]) }}"
|
||||
class="btn btn-sm btn-danger"
|
||||
onclick="return confirm('{{ __('backend.confirm_delete') }}')">
|
||||
<i class="ion ion-md-trash"></i> {{ __('backend.delete') }}
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
@else
|
||||
<div class="alert alert-info">
|
||||
<i class="ion ion-md-information-circle"></i> {{ __('backend.no_news_yet') }}
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@endsection
|
||||
|
||||
|
|
@ -5,6 +5,19 @@
|
|||
{{ __('User') }}
|
||||
</h4>
|
||||
|
||||
@if ($errors->any())
|
||||
<div class="alert alert-danger alert-dismissible fade show">
|
||||
<button type="button" class="close" data-dismiss="alert">×</button>
|
||||
<ul>
|
||||
@foreach ($errors->all() as $error)
|
||||
<li>{!! $error !!}</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
@endif
|
||||
|
||||
<div class="card">
|
||||
<div class="card-datatable table-responsive">
|
||||
<table class="datatables-users table table-striped table-bordered">
|
||||
|
|
@ -20,8 +33,8 @@
|
|||
<th>{{ __('active') }} (seit)</th>
|
||||
<th>{{ __('tables.account') }} (bis)</th>
|
||||
<th>{{ __('tables.shop') }} (bis)</th>
|
||||
<th>{{ __('tables.shop') }} ab</th>
|
||||
<th>{{ __('Shop URL') }}</th>
|
||||
<th>{{ __('tables.shop') }} ab</th>
|
||||
<th>{{ __('Zahlungsarten') }}</th>
|
||||
<th>{{ __('Land') }}</th>
|
||||
<th>{{ __('Test Modus') }}</th>
|
||||
|
|
@ -106,7 +119,7 @@
|
|||
<div class="form-group col">
|
||||
<label for="confirmation_date" class="form-label">{{ __('Datum') }} seit</label>
|
||||
<input type="text" name="confirmation_date" class="form-control b-material-datetime-picker"
|
||||
placeholder="25.10.2020 10:30">
|
||||
placeholder="Datum">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -118,6 +131,71 @@
|
|||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- Modal restore -->
|
||||
<div class="modal fade" id="modals-restore">
|
||||
<div class="modal-dialog">
|
||||
<form class="modal-content" action="{{ route('admin_user_store') }}" method="post">
|
||||
@csrf
|
||||
<input type="hidden" class="form-control" name="id">
|
||||
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title">{{ __('User') }} <span
|
||||
class="font-weight-light">{{ __('Account reaktivieren') }}</span></h5>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">×</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
|
||||
<div class="form-row">
|
||||
<div class="form-group col">
|
||||
<label for="email" class="form-label">{{ __('E-Mail') }}</label>
|
||||
<input type="text" class="form-control" name="email" placeholder="{{ __('E-Mail') }}"
|
||||
readonly>
|
||||
</div>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="form-group">
|
||||
<label class="custom-control custom-checkbox m-0">
|
||||
<input type="checkbox" class="custom-control-input" name="restore_account" >
|
||||
<span class="custom-control-label">Soll der Account des Users wieder aktiviert werden?</span>
|
||||
</label>
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<div class="form-group col">
|
||||
<label for="payment_account" class="form-label">Wenn ja, wird der Account bis zum angegebenen Datum aktiviert.</label>
|
||||
<input type="text" name="payment_account" class="form-control b-material-datetime-picker"
|
||||
placeholder="Datum">
|
||||
</div>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="form-group">
|
||||
<label class="custom-control custom-checkbox m-0">
|
||||
<input type="checkbox" class="custom-control-input" name="restore_childs" >
|
||||
<span class="custom-control-label">Sollen die Berater dem User wieder zugewiesen werden?</span>
|
||||
</label>
|
||||
<p class="mt-2"><i>Bei der Löschung wurden alle Berater des Users auf dem Sponsor übertragen.</i></p>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="form-group">
|
||||
<label class="custom-control custom-checkbox m-0">
|
||||
<input type="checkbox" class="custom-control-input" name="restore_send_email">
|
||||
<span class="custom-control-label">Dem User eine E-Mail mit den Informationen zum Wiederherstellen senden?</span>
|
||||
</label>
|
||||
<div class="alert alert-info mt-4">
|
||||
Wiederhergestellte User müssen Ihr Passwort zurücksetzen, da das Passwort beim Löschen zurückgesetzt wurde. Auch der Shop-Name (Subdomain) muss neu vergeben werden, da dieser beim Löschen freigegeben wurde.
|
||||
</div>
|
||||
</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" name="save-restore"
|
||||
value="save-restore">{{ __('save') }}</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Modal active -->
|
||||
<div class="modal fade" id="modals-active">
|
||||
|
|
@ -150,7 +228,7 @@
|
|||
<div class="form-group col">
|
||||
<label for="active_date" class="form-label">{{ __('Datum') }} seit</label>
|
||||
<input type="text" name="active_date" class="form-control b-material-datetime-picker"
|
||||
placeholder="25.10.2020 10:30">
|
||||
placeholder="Datum">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
@ -189,7 +267,7 @@
|
|||
<div class="form-group col">
|
||||
<label for="payment_account" class="form-label">{{ __('tables.account') }} bis</label>
|
||||
<input type="text" name="payment_account" class="form-control b-material-datetime-picker"
|
||||
placeholder="25.10.2020 10:30">
|
||||
placeholder="Datum">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
@ -228,7 +306,7 @@
|
|||
<div class="form-group col">
|
||||
<label for="payment_shop" class="form-label">{{ __('tables.shop') }} bis</label>
|
||||
<input type="text" name="payment_shop" class="form-control b-material-datetime-picker"
|
||||
placeholder="25.10.2020 10:30">
|
||||
placeholder="Datum">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -400,6 +478,14 @@
|
|||
$(this).find(".modal-body input[name='active_date']").val(button.data('active_date'));
|
||||
});
|
||||
|
||||
$('#modals-restore').on('show.bs.modal', function(event) {
|
||||
var button = $(event.relatedTarget);
|
||||
$(this).find(".modal-content input[name='id']").val(button.data('id'));
|
||||
$(this).find(".modal-body input[name='email']").val(button.data('email'));
|
||||
$(this).find(".modal-body input[name='active']").prop("checked", button.data('active'));
|
||||
$(this).find(".modal-body input[name='payment_account']").val(button.data('payment_account'));
|
||||
});
|
||||
|
||||
$('#modals-account').on('show.bs.modal', function(event) {
|
||||
var button = $(event.relatedTarget);
|
||||
$(this).find(".modal-content input[name='id']").val(button.data('id'));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue