Abo Einmalprodukte: Phasen 5-7, konfigurierbare Sperrfristen, Lokalisierung & Dashboard
Rechnung/Lieferschein: - PDF-Gruppierung Abo- vs. Einmal-Artikel (is_abo_addon), rueckwaertskompatibel - Vorschau-Command sales:preview-invoice (umgeht Test-System-Gate, ohne Rechnungsnummer) Reminder-Mail (vorbereitet, Cron inaktiv): - MailAboExecutionReminder + Template, abo:send-execution-reminder, Spalte onetime_reminder_sent_for - Berater -> Sales Center, Kunde -> Portal; Vorschau abo:preview-reminder - Datum-Fix: formatDateDB() statt formatDate() (ICU-Format) Sperrfristen konfigurierbar (Admin-Settings): - abo-lock-days-change (Liefertag + Abo-Produkte), abo-lock-days-pause-cancel - Meldungen mit :lock-Platzhalter; Pausieren/Kuendigen vom Change-Lock entkoppelt - Abo-Produkt-Aenderungen im Lock-Fenster server- + clientseitig eingefroren - Selbstbedienung: Add-only/Lock nach $view (kein Admin-Bypass), Stale-Cache-Fix beim Mengen-Update Dashboard: - Einmalprodukte-Card + Team-Abo-KPI-Card, News-Card responsiv (col-xl-6) Lokalisierung: - Sprachdateien en/es/fr vollstaendig mit de synchronisiert (inkl. marketingplan/portal) - LocalizationSyncTest sichert Key-Gleichheit ab Tests: AboOneTimeInvoiceGrouping, AboExecutionReminder, AboLockDaysSetting, AboOnetimeDashboardAndMail, PreviewInvoiceCommand, TeamAboOverview + erweiterte View-Tests Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
parent
0d4c0b640c
commit
dcd0384878
96 changed files with 4154 additions and 1189 deletions
|
|
@ -6,6 +6,8 @@ use App\Models\DashboardNews;
|
|||
use App\Models\Incentive;
|
||||
use App\Models\IncentiveParticipant;
|
||||
use App\Models\ShoppingPayment;
|
||||
use App\Models\UserAbo;
|
||||
use App\Services\AboHelper;
|
||||
use App\User;
|
||||
use Carbon\Carbon;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
|
|
@ -61,12 +63,36 @@ class HomeController extends Controller
|
|||
}
|
||||
}
|
||||
|
||||
// Eigenes Abo des Beraters für die Einmalprodukte-Dashboard-Card (nur wenn
|
||||
// das Zeitfenster offen ist und das Feature für den User sichtbar ist).
|
||||
$oneTimeAbo = null;
|
||||
$aboOneTimeId = UserAbo::where('user_id', $user->id)
|
||||
->where('is_for', 'me')
|
||||
->where('active', true)
|
||||
->where('status', 2)
|
||||
->value('id');
|
||||
|
||||
if ($aboOneTimeId) {
|
||||
$abo = UserAbo::find($aboOneTimeId);
|
||||
if ($abo && AboHelper::isOneTimeWindowOpen($abo) && AboHelper::isOneTimeFeatureVisible($abo)) {
|
||||
$oneTimeAbo = $abo;
|
||||
}
|
||||
}
|
||||
|
||||
$teamAboKpis = null;
|
||||
if ($user->isActiveAccount()) {
|
||||
$teamAboKpis = app(\App\Services\Abo\TeamAboOverviewService::class)
|
||||
->teamKpis($user, (int) Carbon::now()->month, (int) Carbon::now()->year);
|
||||
}
|
||||
|
||||
$data = [
|
||||
'user' => $user,
|
||||
'now' => Carbon::now(),
|
||||
'dashboardNews' => DashboardNews::getActiveNews(),
|
||||
'activeIncentive' => $activeIncentive,
|
||||
'incentiveParticipant' => $incentiveParticipant,
|
||||
'oneTimeAbo' => $oneTimeAbo,
|
||||
'teamAboKpis' => $teamAboKpis,
|
||||
];
|
||||
|
||||
return view('home', $data);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue