Abo-Uebersichten: Team-Ansicht konsolidiert, Monatsfilter, Wachstum & Dashboard-KPIs
- /user/abos/ot: Filter nach Eingangsmonat (start_date) ueber neuen UserAbo-Scope - Konsolidierte Team-Abo-Ansicht nach Ebenen/Linien (Bestand, neue Abos im Monat, Eigen-/Kundenabos, Punkte je Ebene + Summen) via TeamAboOverviewService - team/customers leitet auf konsolidierte Ansicht um; Navigation bereinigt - Mitglieder-Detail-Modal mit Abo-Zusammenfassung (Eigen-Abo, Kundenabos, Punkte, Beginn, naechste Ausfuehrung, Ausfuehrungen) - Wachstums-Tabelle (Jahr x Monate) + Liniendiagramm (neue Eigen-/Kundenabos) - Dashboard-KPI-Kachel (Gesamtabos, Kundenabos, 1000-Punkte-Shops) - i18n de/en/es/fr, Tests (Filter, Overview, Wachstum, Modal, Redirect) Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
parent
65b867f8ee
commit
4135726772
15 changed files with 967 additions and 174 deletions
|
|
@ -13,10 +13,115 @@
|
|||
@include('user.abo._abo_chart')
|
||||
@endif
|
||||
|
||||
@if($view === 'ot' && isset($filterMonth))
|
||||
<div class="card mb-4">
|
||||
<div class="card-body py-3">
|
||||
<form method="GET" action="{{ url()->current() }}" class="form-inline">
|
||||
<label class="text-muted small mr-2 mb-0">{{ __('abo.filter_added_period') }}</label>
|
||||
<select name="month" class="form-control form-control-sm mr-2 mb-1">
|
||||
<option value="0">{{ __('tables.all') }}</option>
|
||||
@foreach($chartMonths as $monthNum => $monthName)
|
||||
<option value="{{ $monthNum }}" {{ (int) $filterMonth === (int) $monthNum ? 'selected' : '' }}>{{ $monthName }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
<select name="year" class="form-control form-control-sm mr-2 mb-1">
|
||||
@foreach($chartYears as $y)
|
||||
<option value="{{ $y }}" {{ (int) $filterYear === (int) $y ? 'selected' : '' }}>{{ $y }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
<button type="submit" class="btn btn-sm btn-secondary mb-1">{{ __('abo.filter') }}</button>
|
||||
@if($filterMonth)
|
||||
<a href="{{ url()->current() }}?year={{ $filterYear }}" class="btn btn-sm btn-outline-secondary ml-2 mb-1">{{ __('abo.reset') }}</a>
|
||||
@endif
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@if (Session::has('alert-success'))
|
||||
<div class="alert alert-success">
|
||||
{{ Session::get('alert-success') }}
|
||||
</div>
|
||||
@endif
|
||||
@if (Session::has('alert-error'))
|
||||
<div class="alert alert-danger">
|
||||
{{ Session::get('alert-error') }}
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
@php($abo_payment_links = $abo_payment_links ?? collect())
|
||||
|
||||
@if(!$user_abos || $user_abos->isEmpty())
|
||||
@if($view === 'ot' && $abo_payment_links->isNotEmpty())
|
||||
@foreach($abo_payment_links as $paymentLink)
|
||||
<div class="card mb-4 border-warning">
|
||||
<div class="card-body pb-2">
|
||||
<div class="row">
|
||||
<div class="col-sm-7">
|
||||
<h5 class="mb-1">
|
||||
<a href="{{ route('user_order_payment_links_detail', [$paymentLink->identifier]) }}">
|
||||
{{ __('navigation.abo') }} <span class="text-muted">#{{ $paymentLink->identifier }}</span>
|
||||
</a>
|
||||
{!! \App\Services\OrderPaymentService::getTypeBadge($paymentLink) !!}
|
||||
</h5>
|
||||
</div>
|
||||
<div class="col-sm-5 text-right">
|
||||
<a href="{{ route('user_order_payment_links_detail', [$paymentLink->identifier]) }}" class="btn btn-sm btn-secondary">
|
||||
<span class="fa fa-edit"></span>{{ __('abo.abo_details') }}
|
||||
</a>
|
||||
@if(\App\Services\OrderPaymentService::canDeleteInstance($paymentLink))
|
||||
{!! Form::open(['action' => route('user_abos_payment_link_delete', [$paymentLink->identifier]), 'class' => 'd-inline-block ml-1']) !!}
|
||||
<button type="submit" class="btn btn-sm btn-danger" onclick="return confirm('{{ __('confirm_delete') }}');">
|
||||
<span class="fa fa-trash"></span> {{ __('delete') }}
|
||||
</button>
|
||||
{!! Form::close() !!}
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<hr class="m-0">
|
||||
<div class="card-body pb-1">
|
||||
@if(\App\Services\OrderPaymentService::isPaymentFailed($paymentLink))
|
||||
<div class="alert alert-danger mb-3">
|
||||
<strong>{{ __('abo.pending_payment_failed_title') }}</strong><br>
|
||||
{{ __('abo.payment_link_failed_copy') }}
|
||||
</div>
|
||||
@elseif(\App\Services\OrderPaymentService::isPaymentProcessing($paymentLink))
|
||||
<div class="alert alert-info mb-3">
|
||||
<strong>{{ __('abo.pending_payment_processing_title') }}</strong><br>
|
||||
{{ __('abo.payment_link_processing_copy') }}
|
||||
</div>
|
||||
@else
|
||||
<div class="alert alert-warning mb-3">
|
||||
<strong>{{ __('abo.payment_link_sent_title') }}</strong><br>
|
||||
{{ __('abo.payment_link_sent_copy') }}
|
||||
</div>
|
||||
@endif
|
||||
<div class="row">
|
||||
<div class="col-md-3 mb-3">
|
||||
<div class="text-muted small">{{ __('tables.date') }}</div>
|
||||
<div class="font-weight-bold">{{ $paymentLink->created_at->format('d.m.Y') }}</div>
|
||||
</div>
|
||||
<div class="col-md-3 mb-3">
|
||||
<div class="text-muted small">{{ __('tables.status') }}</div>
|
||||
{!! \App\Services\OrderPaymentService::getStatusBadge($paymentLink) !!}
|
||||
</div>
|
||||
<div class="col-md-3 mb-3">
|
||||
<div class="text-muted small">{{ __('tables.amount') }}</div>
|
||||
{{ $paymentLink->getAmountFormatted() }} €
|
||||
</div>
|
||||
<div class="col-md-3 mb-3">
|
||||
<div class="text-muted small">{{ __('tables.email') }}</div>
|
||||
{{ $paymentLink->shopping_data['billing_email'] ?? '-' }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endforeach
|
||||
@endif
|
||||
|
||||
@if((!$user_abos || $user_abos->isEmpty()) && $abo_payment_links->isEmpty())
|
||||
<div class="card mb-4">
|
||||
<div class="card-body pb-2">
|
||||
<div class="row">
|
||||
|
|
@ -37,6 +142,29 @@
|
|||
|
||||
@foreach($user_abos as $user_abo)
|
||||
<div class="card mb-4">
|
||||
@if($user_abo->isPendingInitialPayment())
|
||||
<div class="card-body pb-0">
|
||||
@if($user_abo->hasFailedInitialPayment())
|
||||
<div class="alert alert-danger mb-3">
|
||||
<strong>{{ __('abo.pending_payment_failed_title') }}</strong><br>
|
||||
{{ __('abo.pending_payment_failed_copy') }}
|
||||
{!! Form::open(['action' => route('user_abos_delete_pending', [$view, $user_abo->id]), 'class' => 'd-inline-block ml-2']) !!}
|
||||
<button type="submit" class="btn btn-sm btn-danger">{{ __('abo.pending_delete_button') }}</button>
|
||||
{!! Form::close() !!}
|
||||
</div>
|
||||
@elseif($user_abo->hasInitialPaymentStatus())
|
||||
<div class="alert alert-info mb-3">
|
||||
<strong>{{ __('abo.pending_payment_processing_title') }}</strong><br>
|
||||
{{ __('abo.pending_payment_processing_copy') }}
|
||||
</div>
|
||||
@else
|
||||
<div class="alert alert-warning mb-3">
|
||||
<strong>{{ __('abo.pending_payment_waiting_title') }}</strong><br>
|
||||
{{ __('abo.pending_payment_waiting_copy') }}
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
@endif
|
||||
<div class="card-body pb-2">
|
||||
<div class="row">
|
||||
<div class="col-sm-6">
|
||||
|
|
@ -136,4 +264,4 @@
|
|||
@endforeach
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
@endsection
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue