20-02-2026
This commit is contained in:
parent
a8b395e20d
commit
a00c42e770
252 changed files with 28785 additions and 8907 deletions
62
resources/views/admin/abo/_change_history.blade.php
Normal file
62
resources/views/admin/abo/_change_history.blade.php
Normal file
|
|
@ -0,0 +1,62 @@
|
|||
@php
|
||||
$changeHistory = $user_abo->getChangeHistory();
|
||||
$priceLabel = $user_abo->is_for === 'me' ? __('abo_history.price_net') : __('abo_history.price_gross');
|
||||
@endphp
|
||||
|
||||
<div class="card-body">
|
||||
<div class="d-flex justify-content-between align-items-center mb-3">
|
||||
<h5 class="font-weight-semibold mb-0">
|
||||
<i class="fas fa-history"></i> {{ __('abo_history.change_history') }}
|
||||
</h5>
|
||||
@if(isset($isAdmin) && $isAdmin && $user_abo->getInitialItems()->isNotEmpty())
|
||||
{{-- <form action="{{ route('admin_abos_rollback', [$user_abo->id]) }}" method="POST"
|
||||
onsubmit="return confirm('{{ __('abo_history.rollback_confirm') }}')">
|
||||
@csrf
|
||||
<button type="submit" class="btn btn-sm btn-outline-danger">
|
||||
<i class="fas fa-undo"></i> {{ __('abo_history.rollback_btn') }}
|
||||
</button>
|
||||
</form>
|
||||
--}}
|
||||
@endif
|
||||
</div>
|
||||
|
||||
@if($changeHistory->isEmpty())
|
||||
<p class="text-muted mb-0">
|
||||
<i class="fas fa-info-circle"></i> {{ __('abo_history.no_changes') }}
|
||||
</p>
|
||||
@else
|
||||
<div class="table-responsive">
|
||||
<table class="table table-sm table-striped mb-0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{ __('abo_history.col_date') }}</th>
|
||||
<th>{{ __('abo_history.col_action') }}</th>
|
||||
<th>{{ __('abo_history.col_product') }}</th>
|
||||
<th>{{ __('abo_history.col_details') }}</th>
|
||||
<th class="text-right">{{ __('tables.price') }} <small class="text-muted">({{ $priceLabel }})</small></th>
|
||||
<th>{{ __('abo_history.col_changed_by') }}</th>
|
||||
<th>{{ __('abo_history.col_channel') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($changeHistory as $entry)
|
||||
<tr>
|
||||
<td class="text-nowrap small">{{ $entry->getFormattedDate() }}</td>
|
||||
<td>{!! $entry->getActionBadge() !!}</td>
|
||||
<td>
|
||||
<strong>{{ $entry->product_name }}</strong>
|
||||
@if($entry->product_number)
|
||||
<br><small class="text-muted">{{ $entry->product_number }}</small>
|
||||
@endif
|
||||
</td>
|
||||
<td class="small">{{ $entry->getChangeDescription() }}</td>
|
||||
<td class="text-right text-nowrap">{{ $entry->getFormattedTotalPrice() }} €</td>
|
||||
<td class="small">{{ $entry->changed_by_name }}</td>
|
||||
<td>{!! $entry->getChannelBadge() !!}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
59
resources/views/admin/abo/_initial_composition.blade.php
Normal file
59
resources/views/admin/abo/_initial_composition.blade.php
Normal file
|
|
@ -0,0 +1,59 @@
|
|||
@php
|
||||
$initialItems = $user_abo->getInitialItems();
|
||||
$initialCompItems = $user_abo->getInitialCompItems();
|
||||
$priceLabel = $user_abo->is_for === 'me' ? __('abo_history.price_net') : __('abo_history.price_gross');
|
||||
@endphp
|
||||
|
||||
<div class="card-body">
|
||||
<h5 class="font-weight-semibold">
|
||||
<i class="fas fa-box-open"></i> {{ __('abo_history.initial_composition') }}
|
||||
</h5>
|
||||
|
||||
@if($initialItems->isEmpty() && $initialCompItems->isEmpty())
|
||||
<p class="text-muted mb-0">
|
||||
<i class="fas fa-info-circle"></i> {{ __('abo_history.no_initial_data') }}
|
||||
</p>
|
||||
@else
|
||||
<div class="table-responsive">
|
||||
<table class="table table-sm mb-0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{ __('order.article') }}</th>
|
||||
<th>{{ __('order.art_no') }}</th>
|
||||
<th class="text-center">{{ __('tables.quantity') }}</th>
|
||||
<th class="text-right">{{ __('tables.price') }} <small class="text-muted">({{ $priceLabel }})</small></th>
|
||||
<th class="text-right">{{ __('order.total_sum') }} <small class="text-muted">({{ $priceLabel }})</small></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($initialItems as $item)
|
||||
<tr>
|
||||
<td>
|
||||
<strong>{{ $item->product_name }}</strong>
|
||||
@if($item->product)
|
||||
{!! \App\Services\AboHelper::getAboTypeBadge(\App\Services\AboHelper::getAboShowOn($item->product)) !!}
|
||||
@endif
|
||||
</td>
|
||||
<td class="text-muted">{{ $item->product_number }}</td>
|
||||
<td class="text-center">{{ $item->qty_after }}</td>
|
||||
<td class="text-right text-nowrap">{{ $item->getFormattedUnitPrice() }} €</td>
|
||||
<td class="text-right text-nowrap font-weight-semibold">{{ $item->getFormattedTotalPrice() }} €</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
@foreach($initialCompItems as $item)
|
||||
<tr class="bg-light">
|
||||
<td>
|
||||
<span class="badge badge-outline-secondary">Comp</span>
|
||||
{{ $item->product_name }}
|
||||
</td>
|
||||
<td class="text-muted">{{ $item->product_number }}</td>
|
||||
<td class="text-center">{{ $item->qty_after }}</td>
|
||||
<td class="text-right text-nowrap">{{ $item->getFormattedUnitPrice() }} €</td>
|
||||
<td class="text-right text-nowrap font-weight-semibold">{{ $item->getFormattedTotalPrice() }} €</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
|
|
@ -108,9 +108,19 @@
|
|||
{{ __('abo.abo_order_hl') }}
|
||||
</h5>
|
||||
@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>
|
||||
@if($view === 'team')
|
||||
<div class="alert alert-info">{!! __('abo.abo_order_info_block_team', ['abo-min-duration' => \App\Models\Setting::getContentBySlug('abo-min-duration')]) !!}</div>
|
||||
@else
|
||||
<div class="alert alert-info">{!! __('abo.abo_order_info_block', ['abo-min-duration' => \App\Models\Setting::getContentBySlug('abo-min-duration')]) !!}</div>
|
||||
@endif
|
||||
@elseif(isset($add_only_mode) && $add_only_mode)
|
||||
@if($view === 'ot')
|
||||
<div class="alert alert-info">{!! __('abo.abo_order_info_block_customer', ['abo-min-duration' => \App\Models\Setting::getContentBySlug('abo-min-duration')]) !!}</div>
|
||||
@else
|
||||
<div class="alert alert-info">{!! __('abo.abo_order_info_add_only', ['abo-min-duration' => \App\Models\Setting::getContentBySlug('abo-min-duration')]) !!}</div>
|
||||
@endif
|
||||
@else
|
||||
<p>{{ __('abo.abo_order_info_2') }}</p>
|
||||
<div class="alert alert-info">{{ __('abo.abo_order_info_2') }}</div>
|
||||
@endif
|
||||
<hr>
|
||||
@include('user.abo.vat_info')
|
||||
|
|
@ -121,8 +131,11 @@
|
|||
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 }}">
|
||||
@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])
|
||||
@php
|
||||
$only_show_products = isset($only_show_products) ? $only_show_products : false;
|
||||
$add_only_mode = isset($add_only_mode) ? $add_only_mode : false;
|
||||
@endphp
|
||||
@include('admin.abo._order_abo_show', ['only_show_products' => $only_show_products, 'add_only_mode' => $add_only_mode])
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
@ -28,7 +28,7 @@
|
|||
<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)
|
||||
@if((!isset($only_show_products) || !$only_show_products) && (!isset($add_only_mode) || !$add_only_mode))
|
||||
<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>
|
||||
|
|
@ -38,12 +38,14 @@
|
|||
@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">
|
||||
@if(!isset($add_only_mode) || !$add_only_mode)
|
||||
<span class="input-group-prepend">
|
||||
<button type="button" class="btn btn-secondary icon-btn md-btn-extra remove-from-basket" data-order-item-id="{{$abo_item->id}}" data-product-id="{{ $abo_item->product->id }}">-</button>
|
||||
</span>
|
||||
<input type="text" class="form-control text-center input-extra table-input-event-onchange" name="product_qty_{{$abo_item->id}}" data-order-item-id="{{$abo_item->id}}" data-product-id="{{ $abo_item->product->id }}" value="{{$abo_item->qty}}">
|
||||
@endif
|
||||
<input type="text" class="form-control text-center input-extra table-input-event-onchange" name="product_qty_{{$abo_item->id}}" data-order-item-id="{{$abo_item->id}}" data-product-id="{{ $abo_item->product->id }}" value="{{$abo_item->qty}}" {{ (isset($add_only_mode) && $add_only_mode) ? 'readonly' : '' }}>
|
||||
<span class="input-group-append">
|
||||
<button type="button" class="btn btn-secondary icon-btn md-btn-extra add-from-basket" data-order-item-id="{{$abo_item->id}}" data-product-id="{{ $abo_item->product->id }}">+</button>
|
||||
<button type="button" class="btn btn-secondary icon-btn md-btn-extra add-from-basket" data-order-item-id="{{$abo_item->id}}" data-product-id="{{ $abo_item->product->id }}" data-product-name="{{ $abo_item->product->getLang('name') }}" data-product-price="{{ $abo_item->getFormattedPrice() }} €">+</button>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -41,6 +41,14 @@
|
|||
|
||||
{{ Form::close() }}
|
||||
|
||||
<div class="card mt-3">
|
||||
@include('admin.abo._initial_composition')
|
||||
</div>
|
||||
|
||||
<div class="card mt-3">
|
||||
@include('admin.abo._change_history')
|
||||
</div>
|
||||
|
||||
<div class="card mt-3">
|
||||
@include('admin.abo._executions')
|
||||
</div>
|
||||
|
|
@ -48,7 +56,45 @@
|
|||
|
||||
<a href="{{route('admin_abos')}}" class="btn btn-sm btn-default mt-2 float-right">{{ __('back') }}</a>
|
||||
|
||||
|
||||
<div class="modal fade" id="modal-confirm-add" tabindex="-1" role="dialog" aria-labelledby="modal-confirm-add-label" aria-hidden="true"
|
||||
data-title-add-only="{{ __('abo.confirm_add_title') }}"
|
||||
data-title-normal="{{ __('abo.confirm_add_title_normal') }}"
|
||||
data-warning-add-only="{{ __('abo.confirm_add_warning') }}"
|
||||
data-warning-normal="{{ __('abo.confirm_add_warning_normal') }}">
|
||||
<div class="modal-dialog" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title" id="modal-confirm-add-label"></h5>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="alert alert-warning mb-3">
|
||||
<i class="fa fa-exclamation-triangle"></i> <span id="confirm-add-warning-text"></span>
|
||||
</div>
|
||||
<table class="table table-sm mb-0">
|
||||
<tr>
|
||||
<td class="font-weight-bold">{{ __('order.article') }}:</td>
|
||||
<td id="confirm-add-product-name"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="font-weight-bold">{{ __('tables.price') }}:</td>
|
||||
<td id="confirm-add-product-price"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="font-weight-bold">{{ __('tables.quantity') }}:</td>
|
||||
<td id="confirm-add-qty-info"></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">{{ __('abo.confirm_add_cancel') }}</button>
|
||||
<button type="button" class="btn btn-primary" id="confirm-add-btn">{{ __('abo.confirm_add_ok') }}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@endsection
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue