mivita/resources/views/user/team/modal_member_abos.blade.php
Kevin 4135726772 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>
2026-06-23 14:07:29 +00:00

91 lines
4.2 KiB
PHP

<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title">
<i class="ion ion-ios-contact"></i>
{{ $summary['name'] }}
<span class="d-block text-muted small font-weight-normal">{{ $summary['email'] }}</span>
</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">&times;</button>
</div>
<div class="modal-body">
{{-- Eigen-Abo --}}
<h6 class="font-weight-semibold text-primary mb-2">
<i class="ion ion-md-refresh-circle"></i> {{ __('abo.own_abo') }}
</h6>
@if ($summary['own_abo'])
@php($own = $summary['own_abo'])
<table class="table table-sm table-borderless mb-4">
<tbody>
<tr>
<td class="text-muted" style="width: 50%;">{{ __('abo.abo_count_points') }}</td>
<td class="text-right font-weight-bold">{{ \App\Services\Util::formatNumber($own['points']) }} Pkt.</td>
</tr>
<tr>
<td class="text-muted">{{ __('abo.abo_start_date') }}</td>
<td class="text-right">{{ $own['start_date'] }}</td>
</tr>
<tr>
<td class="text-muted">{{ __('abo.next_execution') }}</td>
<td class="text-right">{{ $own['next_date'] }}</td>
</tr>
<tr>
<td class="text-muted">{{ __('abo.executions_count') }}</td>
<td class="text-right">{{ $own['executions'] }}</td>
</tr>
</tbody>
</table>
@else
<p class="text-muted mb-4">{{ __('abo.no_own_abo') }}</p>
@endif
{{-- Kunden-Abos --}}
@php($cust = $summary['customer_abos'])
<h6 class="font-weight-semibold text-primary mb-2">
<i class="ion ion-md-people"></i> {{ __('abo.team_customer_abos') }}
</h6>
<div class="row mb-3">
<div class="col-6">
<div class="bg-lightest rounded p-2 text-center">
<div class="h4 mb-0 font-weight-bold">{{ $cust['count'] }}</div>
<div class="text-muted small">{{ __('abo.customer_abos_count') }}</div>
</div>
</div>
<div class="col-6">
<div class="bg-lightest rounded p-2 text-center">
<div class="h4 mb-0 font-weight-bold text-primary">{{ \App\Services\Util::formatNumber($cust['total_points']) }}</div>
<div class="text-muted small">{{ __('abo.abo_count_points') }}</div>
</div>
</div>
</div>
@if ($cust['count'] > 0)
<table class="table table-sm mb-0">
<thead>
<tr class="text-muted small">
<th>#</th>
<th class="text-right">{{ __('abo.abo_count_points') }}</th>
<th class="text-right">{{ __('abo.abo_start_date') }}</th>
<th class="text-right">{{ __('abo.next_execution') }}</th>
<th class="text-right">{{ __('abo.executions_count') }}</th>
</tr>
</thead>
<tbody>
@foreach ($cust['items'] as $i => $item)
<tr>
<td>{{ $i + 1 }}</td>
<td class="text-right font-weight-bold">{{ \App\Services\Util::formatNumber($item['points']) }}</td>
<td class="text-right">{{ $item['start_date'] }}</td>
<td class="text-right">{{ $item['next_date'] }}</td>
<td class="text-right">{{ $item['executions'] }}</td>
</tr>
@endforeach
</tbody>
</table>
@else
<p class="text-muted mb-0">{{ __('abo.no_customer_abos') }}</p>
@endif
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">{{ __('team.close') }}</button>
</div>
</div>