implemented event package addons with filament resource, event-admin purchase path and notifications, showing up in purchase history

This commit is contained in:
Codex Agent
2025-11-21 11:25:45 +01:00
parent 07fe049b8a
commit 7a8d22a238
58 changed files with 3339 additions and 60 deletions

View File

@@ -77,7 +77,7 @@ class PackageLimitEvaluator
];
}
$maxPhotos = $eventPackage->package->max_photos;
$maxPhotos = $eventPackage->effectivePhotoLimit();
if ($maxPhotos === null) {
return null;
@@ -115,17 +115,17 @@ class PackageLimitEvaluator
public function summarizeEventPackage(EventPackage $eventPackage): array
{
$package = $eventPackage->package;
$limits = $eventPackage->effectiveLimits();
$photoSummary = $this->buildUsageSummary(
(int) $eventPackage->used_photos,
$package?->max_photos,
$limits['max_photos'],
config('package-limits.photo_thresholds', [])
);
$guestSummary = $this->buildUsageSummary(
(int) $eventPackage->used_guests,
$package?->max_guests,
$limits['max_guests'],
config('package-limits.guest_thresholds', [])
);

View File

@@ -15,7 +15,7 @@ class PackageUsageTracker
public function recordPhotoUsage(EventPackage $eventPackage, int $previousUsed, int $delta = 1): void
{
$limit = $eventPackage->package?->max_photos;
$limit = $eventPackage->effectivePhotoLimit();
if ($limit === null || $limit <= 0) {
return;
@@ -51,7 +51,7 @@ class PackageUsageTracker
public function recordGuestUsage(EventPackage $eventPackage, int $previousUsed, int $delta = 1): void
{
$limit = $eventPackage->package?->max_guests;
$limit = $eventPackage->effectiveGuestLimit();
if ($limit === null || $limit <= 0) {
return;