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>
This commit is contained in:
parent
841d87e161
commit
867dc21b57
87 changed files with 4480 additions and 240 deletions
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
namespace App\Models;
|
||||
|
||||
use App\User;
|
||||
use Carbon\Carbon;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
|
|
@ -9,14 +10,14 @@ use Illuminate\Database\Eloquent\SoftDeletes;
|
|||
/**
|
||||
* App\Models\UserAccount
|
||||
*
|
||||
* @property-read \App\Models\Country $company_country
|
||||
* @property-read \App\Models\Country $company_pre_phone
|
||||
* @property-read \App\Models\Country $country
|
||||
* @property-read Country $company_country
|
||||
* @property-read Country $company_pre_phone
|
||||
* @property-read Country $country
|
||||
* @property mixed $birthday
|
||||
* @property-read mixed $company
|
||||
* @property-read \App\Models\Country $pre_mobil
|
||||
* @property-read \App\Models\Country $pre_phone
|
||||
* @property-read \App\User $user
|
||||
* @property-read Country $pre_mobil
|
||||
* @property-read Country $pre_phone
|
||||
* @property-read User $user
|
||||
*
|
||||
* @method static bool|null forceDelete()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\UserAccount newModelQuery()
|
||||
|
|
@ -62,8 +63,8 @@ use Illuminate\Database\Eloquent\SoftDeletes;
|
|||
* @property \Illuminate\Support\Carbon|null $created_at
|
||||
* @property \Illuminate\Support\Carbon|null $updated_at
|
||||
* @property \Illuminate\Support\Carbon|null $deleted_at
|
||||
* @property-read \App\Models\Country $shipping_country
|
||||
* @property-read \App\Models\Country|null $shipping_pre_phone
|
||||
* @property-read Country $shipping_country
|
||||
* @property-read Country|null $shipping_pre_phone
|
||||
*
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\UserAccount whereAddress($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\UserAccount whereAddress2($value)
|
||||
|
|
@ -194,6 +195,7 @@ class UserAccount extends Model
|
|||
'bank_bic',
|
||||
'notice',
|
||||
'language',
|
||||
'profile_image',
|
||||
];
|
||||
// 'reverse_charge', 'reverse_charge_valid'
|
||||
|
||||
|
|
@ -367,6 +369,25 @@ class UserAccount extends Model
|
|||
return $this->language;
|
||||
}
|
||||
|
||||
/**
|
||||
* URL zum Berater-Profilfoto (N6) oder null, wenn keins hochgeladen wurde
|
||||
* bzw. die Datei nicht (mehr) existiert — Muster wie {@see UserShop::getImage()}.
|
||||
*/
|
||||
public function getProfileImageUrl(): ?string
|
||||
{
|
||||
$filename = $this->attributes['profile_image'] ?? null;
|
||||
if (empty($filename)) {
|
||||
return null;
|
||||
}
|
||||
|
||||
$link = 'images/profile/'.$filename;
|
||||
if (! \Storage::disk('public')->has($link)) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return '/storage/'.$link.'?=lm='.\Storage::disk('public')->lastModified($link);
|
||||
}
|
||||
|
||||
/**
|
||||
* Liefert die verfügbaren Sprachen aus der Config als Array für Select-Felder.
|
||||
*
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue