user()?->hasRole(UserRole::Admin, UserRole::Rentals); } public function getSubheading(): ?string { return app(CurrentProperty::class)->hasChoice() ? Property::query()->find($this->propertyId)?->name : null; } public function mount(): void { $this->propertyId = app(CurrentProperty::class)->followUrl($this->propertyId); } public function content(Schema $schema): Schema { $property = Property::find($this->propertyId); if ($property === null) { return $schema->components([Text::make('Es ist noch keine Wohnung angelegt (Expertenansicht › Wohnungen).')]); } $context = ['ownerRecord' => $property, 'pageClass' => EditProperty::class]; return $schema->components([ Tabs::make('prices') ->persistTabInQueryString() ->tabs([ Tab::make('Saisons & Preise')->icon(Heroicon::OutlinedCalendar)->schema([ Livewire::make(SeasonsRelationManager::class, $context)->key("seasons-{$property->id}"), ]), Tab::make('Sonderangebote & Rabattcodes')->icon(Heroicon::OutlinedSparkles)->schema([ Livewire::make(SpecialOffersRelationManager::class, $context)->key("offers-{$property->id}"), ]), Tab::make('Extras')->icon(Heroicon::OutlinedGift)->schema([ Livewire::make(ExtrasRelationManager::class, $context)->key("extras-{$property->id}"), ]), ]), ]); } }