Boost-Slot-Grenzen (5/3) + Kategorie-Boost zum halben Satz

Entscheidung 13.07.: verkauft wird nur, was sichtbar ist — max. 5
gleichzeitige Boosts je Startseite, 3 je Branchenseite (= die sichtbaren
Plaetze; Hero-Slider damit vertagt). Neue Stufe Kategorie-Boost (nur
Branchenseite, 6/10/18 Credits = 50 % aufgerundet); der Startseiten-Boost
(12/20/35) erscheint weiter auf Start- UND Branchenseite.

- boosts.placement (home/category, Bestand = home) + BoostPlacement-Enum;
  Preise/Slots in config/credits.php (boost_category, boost_slots)
- BoostService::slotAvailability() je Ausgabe (Portal x Sprache, Kategorie
  zusaetzlich je Rubrik); ausgebucht -> soldOut-Exception mit fruehestem
  freien Termin; Verlaengerungen halten ihren Slot, Stufen verlaengern
  unabhaengig; Kategorie-Boost invalidiert nur Kategorie-Caches
- Startseite zeigt nur Home-Boosts; Branchenseite: Kategorie-Boosts mit
  Vorrang (ihre 3 Slots sind die Garantie), Home-Boosts fuellen den Rest
- Add-on-Panel der PM-Seite: zwei Boost-Angebote, bei vollem Inventar
  "Derzeit ausgebucht — frei ab" statt Kauf-Buttons (serverseitig gegated);
  Buchungsseiten-Preisliste um die Kategorie-Staffel ergaenzt

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Kevin Adametz 2026-07-13 12:28:03 +00:00
parent 0677728d05
commit 0474d22347
19 changed files with 702 additions and 98 deletions

View file

@ -1,5 +1,6 @@
<?php
use App\Enums\BoostPlacement;
use App\Enums\Tier;
use App\Models\Plan;
use App\Models\User;
@ -46,6 +47,16 @@ test('boost credits follow the duration staffel and reject unknown durations', f
->toThrow(InvalidArgumentException::class);
});
test('category boost credits are half the homepage staffel, rounded up', function () {
expect($this->pricing->boostCredits(7, BoostPlacement::Category))->toBe(6);
expect($this->pricing->boostCredits(14, BoostPlacement::Category))->toBe(10);
expect($this->pricing->boostCredits(30, BoostPlacement::Category))->toBe(18);
expect($this->pricing->boostOptions(BoostPlacement::Category))->toBe([7 => 6, 14 => 10, 30 => 18]);
expect(fn () => $this->pricing->boostCredits(99, BoostPlacement::Category))
->toThrow(InvalidArgumentException::class);
});
test('flat prices match the decision update', function () {
expect($this->pricing->proofPdfCredits())->toBe(3);
expect($this->pricing->depublishCredits())->toBe(35);