mivita/resources/views/user/team/firstlines.blade.php
Kevin 867dc21b57 Statistiken: Kundenfeedback 2026-08-19 komplett (N1-N8) + Review-Fixes + VP-/Incentive-Repair gehärtet
Statistik-Änderungen 2026-08-19 (dev/2026-07-22/entwicklungsplan-2026-08-19.md, alle 8 Pakete gemäß beantworteten F-Fragen):
- N1 Monatsstatistik: Team-Cluster (Firstlines klickbar -> neue Seite user_team_firstlines, Teampartner gesamt/Payline [nur aktive], Abos Payline mit +N) + Level-Kachel (Quali-Stufe, fehlende Payline-/persönliche Punkte, Karriere-Level); LiveCommissionService-Snapshot v3 reicht Level-/Quali-Daten durch
- N2 Abo-Kacheln auf Home monatsbezogen (aboStockCount-Rückrechnung über cancel/deleted/Status-Historie; VIP-Statistik bleibt tagesaktuell)
- N3 VIP-Statistik 'Recruiter des Monats' (Neupartner-Definition wie KPI, rekursives Ketten-Volumen als Gesamtpunkte inkl. Starterpaket) + Drilldown/CSV-Spalte 'Punkte gesamt'
- N4 Prognose-Block 'Level & Provision laut Prognose (Stand 25.)' mit unverbindlich-Kennzeichnung (ebenengenaue offene Abo-Punkte + TP-Laufstände)
- N5 Checkout-Herkunft: Dropdown raus, Pflicht-Freitext (lokalisierte Fehlermeldung)
- N6 Berater-Profilfoto (user_accounts.profile_image, Einwilligung als Sprachkey-Platzhalter, DSGVO-Löschung) + teaminterne Top-3-Karte (TopResultsService, Scope-Schalter)
- N7 USt-Optionen: 'nicht umsatzsteuerpflichtig' zuerst + '§ 19 UStG'-Textfix
- N8 Jahresgebühr-Nachfassliste je Berater (AnnualFeeDueService, überfällig/1-3 Monate, Sidenav)

Kontroll-Review (8 Perspektiven) angewendet: next-Level-Fallback im Steady-State (resolveNextLevel — sonst 'Höchstes Level erreicht' für Normalfälle), _calculated-Punktebasis bei mehr Paylines, keine Wiederbelebung deaktivierter Abos in der Monatsrückrechnung, Payline-Abo-Kachel monatskonsistent, Top-3-Nachrücker; Performance: BackofficeDashboardService als Singleton mit lineBuckets-Memo (+flushLineBucketsMemo), level_forecast 6h-Cache; Reuse: User-Scopes firstlinesOf/newPartnerIn, SalesVolumePoints::totalPointsByUser, Slim::storeCroppedImage (3 Upload-Kopien vereinigt), activeAbo-Scope statt Inline-Prädikate, Form::open-Konvention, Return-Types

Repair-Härtung (Kundenentscheide): VP-Nachtrepair dedupliziert über shopping_order_id (Live-Pfad schreibt sie jetzt mit), zählende Alt-Zeilen-Erkennung, Vormonats-Scan für Monatswechsel, Firmenaccount-Buchungen (config mivita.company_user_id) werden automatisch auf den Berater umgebucht (in place bzw. per Gegenbuchung bei geschlossenem Monat; Echtfall Anna Schall Order 58797 -> Christina Schuder), Berater-zu-Berater nur Warnung; Incentive-Repair: m_sponsor=NULL löscht nicht mehr, FK-Repair vor Stale-Bereinigung, gebatchte Lookups, zentrales Incentive::qualificationWindow(); .env aus dem Git-Tracking entfernt (Pflege per SFTP)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-21 10:44:44 +00:00

78 lines
4.1 KiB
PHP

@extends('layouts.layout-2')
@section('content')
<h4 class="font-weight-bold py-2 mb-2 d-flex justify-content-between align-items-center w-100">
<div>{{ __('team.firstlines') }}</div>
</h4>
<div class="card mb-4">
<div class="card-header">
<div class="row align-items-center">
<div class="col-md-8">
<span class="font-weight-bold">{{ __('team.firstlines') }} ({{ count($rows) }})</span>
<div class="text-muted small">{{ __('team.firstlines_copy') }}</div>
</div>
<div class="col-md-4 mt-2 mt-md-0">
{!! Form::open([
'url' => route('user_team_firstlines'),
'method' => 'GET',
'class' => 'form-inline justify-content-md-end',
]) !!}
{!! Form::select('month', $filterMonths, (int) $selectedMonth, ['class' => 'form-control custom-select form-control-sm mr-2', 'onchange' => 'this.form.submit()']) !!}
{!! Form::select('year', array_combine($filterYears, $filterYears), (int) $selectedYear, ['class' => 'form-control custom-select form-control-sm', 'onchange' => 'this.form.submit()']) !!}
<noscript><button type="submit" class="btn btn-sm btn-secondary ml-2">{{ __('abo.filter') }}</button></noscript>
{!! Form::close() !!}
</div>
</div>
</div>
@if (count($rows) === 0)
<div class="card-body">
<p class="text-muted mb-0">{{ __('team.firstlines_none') }}</p>
</div>
@else
<div class="table-responsive">
<table class="table table-hover mb-0">
<thead>
<tr class="text-muted small">
<th>{{ __('tables.adviser') }}</th>
<th>{{ __('team.career_level') }}</th>
<th class="text-right">{{ __('team.firstlines_points') }}</th>
<th>{{ __('tables.phone') }}</th>
<th>{{ __('tables.email') }}</th>
<th>{{ __('team.active_since') }}</th>
</tr>
</thead>
<tbody>
@foreach ($rows as $row)
<tr>
<td>
<div class="font-weight-semibold">{{ $row['name'] }}</div>
@unless ($row['is_active_account'])
<span class="badge badge-outline-danger">{{ __('team.account_inactive') }}</span>
@endunless
</td>
<td class="align-middle small text-muted">{{ $row['career_level'] }}</td>
<td class="align-middle text-right font-weight-bold">
{{ \App\Services\Util::formatNumber($row['total_points']) }}
</td>
<td class="align-middle">
@if ($row['phone'] !== '')
<a href="tel:{{ $row['phone'] }}">{{ $row['phone'] }}</a>
@else
<span class="text-muted">-</span>
@endif
</td>
<td class="align-middle">
<a href="mailto:{{ $row['email'] }}">{{ $row['email'] }}</a>
</td>
<td class="align-middle small text-muted">
{{ $row['active_since'] ? formatDate($row['active_since']) : '-' }}
</td>
</tr>
@endforeach
</tbody>
</table>
</div>
@endif
</div>
@endsection