Offers by their own rules, seasonal photos per section, theme authoring tooling
- Special offers: kinds (rule, fixed dates, gap filler), package price, priority, highlight;
GapFinder detects calendar gaps (optionally waiving the minimum stay); OfferShowcase decides
what the website advertises and prices fixed dates/gaps with PriceCalculator; offers section
shows them side by side, as a list or rotating; hero can show the top offer. Appearances no
longer carry a featured offer.
- Sections get stable ids; appearances set photos per section ("Bilder je Baustein") and
sections can be limited to appearances. Photo pickers show thumbnails everywhere.
- Themes: themes:make (scaffold, never overwrites), themes:check (contract, build, markup,
colours, external resources, WCAG contrast), themes:preview (signed links per page and
appearance), signed ?theme= preview and preview action in the site form, inherited colour
tokens in the admin. Base CSS split into theme.css + reusable theme-base.css.
- docs/THEME-ERSTELLUNG.md: binding guide for building additional themes elsewhere.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
bc77b64ea7
commit
7d0bc93abc
50 files changed
+2805
-259
No files matched your search
@@ -3,6 +3,7 @@
|
||||
namespace Tests\Feature;
|
||||
|
||||
use App\Enums\BookingStatus;
|
||||
use App\Enums\OfferKind;
|
||||
use App\Filament\Resources\Bookings\BookingResource;
|
||||
use App\Filament\Resources\Bookings\Pages\CreateBooking;
|
||||
use App\Filament\Resources\Bookings\Pages\ListBookings;
|
||||
@@ -143,6 +144,36 @@ public function test_special_offer_with_euro_value_is_stored_in_cents(): void
|
||||
$this->assertSame([5950, ['5'], ['Winter']], [$offer->discount_value, array_map('strval', $offer->arrival_weekdays), $offer->season_names]);
|
||||
}
|
||||
|
||||
public function test_fixed_dates_package_and_gap_filler_are_created(): void
|
||||
{
|
||||
$manager = Livewire::test(SpecialOffersRelationManager::class, ['ownerRecord' => $this->property, 'pageClass' => EditProperty::class]);
|
||||
|
||||
$manager->callAction(TestAction::make(CreateAction::class)->table(), [
|
||||
'kind' => 'fixed_dates',
|
||||
'name' => 'Ostsee-Woche',
|
||||
'discount_type' => 'fixed_stay_price',
|
||||
'discount_value' => '499.00',
|
||||
'stay_from' => '2026-11-07',
|
||||
'stay_until' => '2026-11-14',
|
||||
'is_featured' => true,
|
||||
'priority' => 5,
|
||||
])->assertHasNoFormErrors();
|
||||
|
||||
$manager->callAction(TestAction::make(CreateAction::class)->table(), [
|
||||
'kind' => 'gap_filler',
|
||||
'name' => 'Kurzfristige Lücke',
|
||||
'discount_type' => 'percent',
|
||||
'discount_value' => 20,
|
||||
'max_gap_nights' => 4,
|
||||
'waives_min_stay' => true,
|
||||
])->assertHasNoFormErrors();
|
||||
|
||||
$package = $this->property->specialOffers()->where('name', 'Ostsee-Woche')->sole();
|
||||
$gap = $this->property->specialOffers()->where('name', 'Kurzfristige Lücke')->sole();
|
||||
$this->assertSame([OfferKind::FixedDates, 49900, '2026-11-07', '2026-11-14', true, 5], [$package->kind, $package->discount_value, $package->stay_from->toDateString(), $package->stay_until->toDateString(), $package->is_featured, $package->priority]);
|
||||
$this->assertSame([OfferKind::GapFiller, 4, true], [$gap->kind, $gap->max_gap_nights, $gap->waives_min_stay]);
|
||||
}
|
||||
|
||||
public function test_blocked_period_is_created(): void
|
||||
{
|
||||
Livewire::test(BlockedPeriodsRelationManager::class, ['ownerRecord' => $this->property, 'pageClass' => EditProperty::class])
|
||||
|
||||
Reference in new issue
Block a user