Wohnungsumschalter im Verwaltungsmenue und wohnungsbezogene Listen
Oben im Seitenmenue waehlt man die Wohnung; Listen, neue Eintraege, Belegungsplan und Preise & Angebote folgen ihr. Ein geoeffneter Eintrag einer anderen Wohnung schaltet auf diese um. Galerie und Ersatz-Titelbild der Website zeigen nur Fotos der Wohnung des Bausteins und Fotos ohne Wohnung. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
e74033a958
commit
8bcda9a4bc
37 files changed
+520
-35
No files matched your search
@@ -3,6 +3,7 @@
|
||||
namespace App\Filament\Resources\Channels;
|
||||
|
||||
use App\Filament\Concerns\FollowsAdminMode;
|
||||
use App\Filament\Concerns\SelectsRecordProperty;
|
||||
use App\Filament\Resources\Channels\Pages\ChannelRules;
|
||||
use App\Filament\Resources\Channels\Pages\CreateChannel;
|
||||
use App\Filament\Resources\Channels\Pages\EditChannel;
|
||||
@@ -20,7 +21,7 @@
|
||||
|
||||
class ChannelResource extends Resource
|
||||
{
|
||||
use FollowsAdminMode;
|
||||
use FollowsAdminMode, SelectsRecordProperty;
|
||||
|
||||
protected static ?string $model = Channel::class;
|
||||
|
||||
|
||||
@@ -2,12 +2,15 @@
|
||||
|
||||
namespace App\Filament\Resources\Channels\Pages;
|
||||
|
||||
use App\Filament\Concerns\ListsCurrentProperty;
|
||||
use App\Filament\Resources\Channels\ChannelResource;
|
||||
use Filament\Actions\CreateAction;
|
||||
use Filament\Resources\Pages\ListRecords;
|
||||
|
||||
class ListChannels extends ListRecords
|
||||
{
|
||||
use ListsCurrentProperty;
|
||||
|
||||
protected static string $resource = ChannelResource::class;
|
||||
|
||||
protected function getHeaderActions(): array
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
use App\Enums\ChannelStatus;
|
||||
use App\Models\Channel;
|
||||
use App\Models\Property;
|
||||
use App\Support\CurrentProperty;
|
||||
use Filament\Forms\Components\DateTimePicker;
|
||||
use Filament\Forms\Components\Select;
|
||||
use Filament\Forms\Components\Textarea;
|
||||
@@ -30,7 +31,7 @@ public static function configure(Schema $schema, bool $selectProperty = false):
|
||||
->components([
|
||||
...($selectProperty ? [Select::make('property_id')->label('Wohnung')->required()
|
||||
->options(fn (): array => Property::query()->orderBy('name')->pluck('name', 'id')->all())
|
||||
->default(fn (): ?int => Property::query()->where('is_active', true)->value('id'))
|
||||
->default(fn (): ?int => app(CurrentProperty::class)->id())
|
||||
->disabled(fn (?Channel $record): bool => $record !== null)->dehydrated()->columnSpanFull()] : []),
|
||||
TextEntry::make('export_url')
|
||||
->label('Eigener iCal-Exportlink')
|
||||
|
||||
Reference in new issue
Block a user